<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/performance/quick-read/src/quick-read.c, branch v3.4.3beta1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>xlator: NULL terminate volume_options struct</title>
<updated>2013-09-10T00:20:14+00:00</updated>
<author>
<name>Santosh Kumar Pradhan</name>
<email>spradhan@redhat.com</email>
</author>
<published>2013-05-22T09:56:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c28b40ebb682eee88c7afa4d64b8e6bfde529668'/>
<id>c28b40ebb682eee88c7afa4d64b8e6bfde529668</id>
<content type='text'>
Problem:
volume_options struct for open-behind and quick-read xlators
were not NULL terminated.

Fix:
Make them NULL terminated.

Change-Id: I2615a1f15c6e5674030a219a99ddf91596bf346b
BUG: 965995
Signed-off-by: Santosh Kumar Pradhan &lt;spradhan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5064
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5809
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
volume_options struct for open-behind and quick-read xlators
were not NULL terminated.

Fix:
Make them NULL terminated.

Change-Id: I2615a1f15c6e5674030a219a99ddf91596bf346b
BUG: 965995
Signed-off-by: Santosh Kumar Pradhan &lt;spradhan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5064
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5809
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quick-read: prune cache on write/[f]truncate</title>
<updated>2013-06-08T21:49:59+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@redhat.com</email>
</author>
<published>2013-05-19T03:35:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=aa51ae9d99ac5ee10849392352743d6d92cfed9f'/>
<id>aa51ae9d99ac5ee10849392352743d6d92cfed9f</id>
<content type='text'>
Cache needs to be pruned on write and [f]truncate. The lack of this
is causing Samba ping-pong test to return wierd 'data increment' values
during startup.

Change-Id: I9cd6a839bcd02de738d78638211b78f382f58e0a
BUG: 953694
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5158
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cache needs to be pruned on write and [f]truncate. The lack of this
is causing Samba ping-pong test to return wierd 'data increment' values
during startup.

Change-Id: I9cd6a839bcd02de738d78638211b78f382f58e0a
BUG: 953694
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5158
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quick-read: various fixes</title>
<updated>2013-01-29T19:56:42+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@redhat.com</email>
</author>
<published>2013-01-29T18:05:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=4cbb14cf6fc3f1b52ff0062a9fee88e2170ad454'/>
<id>4cbb14cf6fc3f1b52ff0062a9fee88e2170ad454</id>
<content type='text'>
- initialize xdata in qr_lookup even if it was NULL from top. This
  allows qr to do its job even if lookup originated from fuse-resolve.c

- extend test cases to include 1 second delay and retry

- fix bug while checking condition for cached unwind

  qr_readv_cached() unwinds if op_ret &gt; 0. Therefore qr_readv()
  must wind to subvol only if !(op_ret &gt; 0) (i.e, op_ret &lt;= 0).

- qr_readv_cached() is using uninitialized @conf pointer. Thanks
  to Raghavendra Bhat for catching this!

Change-Id: Ifaf2ea2685e452210ef9ba3c2d1f2ab51900650c
BUG: 846240
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4452
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- initialize xdata in qr_lookup even if it was NULL from top. This
  allows qr to do its job even if lookup originated from fuse-resolve.c

- extend test cases to include 1 second delay and retry

- fix bug while checking condition for cached unwind

  qr_readv_cached() unwinds if op_ret &gt; 0. Therefore qr_readv()
  must wind to subvol only if !(op_ret &gt; 0) (i.e, op_ret &lt;= 0).

- qr_readv_cached() is using uninitialized @conf pointer. Thanks
  to Raghavendra Bhat for catching this!

Change-Id: Ifaf2ea2685e452210ef9ba3c2d1f2ab51900650c
BUG: 846240
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4452
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quick-read: refactor</title>
<updated>2013-01-28T20:35:57+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@redhat.com</email>
</author>
<published>2013-01-18T22:04:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=cc96adbe4604ea5fd462d8db77486c2f963baf43'/>
<id>cc96adbe4604ea5fd462d8db77486c2f963baf43</id>
<content type='text'>
- peel out 'open behind' functionality into a separate translator
- issue where, if file size had grown by revalidate, data was not flushed
- removed unnecessary acquistion of table-&gt;lock (e.g in qr_lookup())
- keep inode ctx persistent, prune only data (effectively changing the
  order of lock acquisition from INODE -&gt; TABLE)
- validation with readdirplus
- use variable size iobufs to simply cached reads

Change-Id: If1586d0298fd1697ddff9fd7008efb3d286d436a
BUG: 846240
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4403
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- peel out 'open behind' functionality into a separate translator
- issue where, if file size had grown by revalidate, data was not flushed
- removed unnecessary acquistion of table-&gt;lock (e.g in qr_lookup())
- keep inode ctx persistent, prune only data (effectively changing the
  order of lock acquisition from INODE -&gt; TABLE)
- validation with readdirplus
- use variable size iobufs to simply cached reads

Change-Id: If1586d0298fd1697ddff9fd7008efb3d286d436a
BUG: 846240
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4403
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/quick-read: use pthread_mutex_trylock to hold mutex in statedumps</title>
<updated>2012-08-02T20:28:52+00:00</updated>
<author>
<name>Raghavendra Bhat</name>
<email>raghavendra@redhat.com</email>
</author>
<published>2012-08-01T10:58:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=36827add0f55d674768ff9c90c5fbb636ae99054'/>
<id>36827add0f55d674768ff9c90c5fbb636ae99054</id>
<content type='text'>
Do not use pthread_mutex_lock and gf_log functions while dumping information
to statedump, to avoid deadlocks.

Change-Id: I0d30b04ae322f131b7a42d277ebd4385e83769e6
BUG: 843789
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3764
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not use pthread_mutex_lock and gf_log functions while dumping information
to statedump, to avoid deadlocks.

Change-Id: I0d30b04ae322f131b7a42d277ebd4385e83769e6
BUG: 843789
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3764
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>remove useless if-before-free (and free-like) functions</title>
<updated>2012-07-13T21:03:42+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-07-13T08:29:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=7820b2c1f88b207a8b1270b8c3cb3b797b7563d2'/>
<id>7820b2c1f88b207a8b1270b8c3cb3b797b7563d2</id>
<content type='text'>
See comments in http://bugzilla.redhat.com/839925 for
the code to perform this change.

Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
BUG: 839925
Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a
Reviewed-on: http://review.gluster.com/3661
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See comments in http://bugzilla.redhat.com/839925 for
the code to perform this change.

Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
BUG: 839925
Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a
Reviewed-on: http://review.gluster.com/3661
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>localtime and ctime are not MT-SAFE</title>
<updated>2012-06-29T21:08:14+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2012-06-13T13:13:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5672e77d3102a990a2aa11e7e56ebfe6a0eee369'/>
<id>5672e77d3102a990a2aa11e7e56ebfe6a0eee369</id>
<content type='text'>
There are a number of nit-level issues throughout the source with
the use of localtime and ctime. While they apparently aren't causing
too many problems, apart from the one in bz 828058, they ought to be
fixed.  Among the "real" problems that are fixed in this patch:
 1) general localtime and ctime not MT-SAFE. There's a non-zero chance
    that another thread calling localtime (or ctime) will over-write
    the static data about to be used in another thread
 2) localtime(&amp; &lt;64-bit-type&gt;) or ctime(&amp; &lt;64-bit-type&gt;) generally
    not a problem on 64-bit or little-endian 32-bit. But even though
    we probably have zero users on big-ending 32-bit platforms, it's
    still incorrect.
 3) multiple nested calls passed as params. Last one wins, i.e. over-
    writes result of prior calls.
 4) Inconsistent error handling. Most of these calls are for logging,
    tracing, or dumping. I submit that if an error somehow occurs in
    the call to localtime or ctime, the log/trace/dump still should
    still occur.
 5) Appliances should all have their clocks set to UTC, and all log
    entries, traces, and dumps should use GMT.
 6) fix strtok(), change to strtok_r()

Other things this patch fixes/changes (that aren't bugs per se):
 1) Change "%Y-%m-%d %H:%M:%S" and similar to their equivalent shorthand,
    e.g. "%F %T"
 2) change sizeof(timestr) to sizeof timestr. sizeof is an operator,
    not a function. You don't use i +(32), why use sizeof(&lt;var&gt;).
    (And yes, you do use parens with sizeof(&lt;type&gt;).)
 3) change 'char timestr[256]' to 'char timestr[32]' where appropriate.
    Per-thread stack is limited. Time strings are never longer than ~20
    characters, so why waste 220+ bytes on the stack?

Things this patch doesn't fix:
 1) hodgepodge of %Y-%m-%d %H:%M:%S versus %Y/%m/%d-%H%M%S and other
    variations. It's not clear to me whether this ever matters, not to
    mention 3rd party log filtering tools may already rely on a
    particular format. Still it would be nice to have a single manifest
    constant and have every call to localtime/strftime consistently use
    the same format.

Change-Id: I827cad7bf53e57b69c0173f67abe72884249c1a9
BUG: 832173
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3568
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a number of nit-level issues throughout the source with
the use of localtime and ctime. While they apparently aren't causing
too many problems, apart from the one in bz 828058, they ought to be
fixed.  Among the "real" problems that are fixed in this patch:
 1) general localtime and ctime not MT-SAFE. There's a non-zero chance
    that another thread calling localtime (or ctime) will over-write
    the static data about to be used in another thread
 2) localtime(&amp; &lt;64-bit-type&gt;) or ctime(&amp; &lt;64-bit-type&gt;) generally
    not a problem on 64-bit or little-endian 32-bit. But even though
    we probably have zero users on big-ending 32-bit platforms, it's
    still incorrect.
 3) multiple nested calls passed as params. Last one wins, i.e. over-
    writes result of prior calls.
 4) Inconsistent error handling. Most of these calls are for logging,
    tracing, or dumping. I submit that if an error somehow occurs in
    the call to localtime or ctime, the log/trace/dump still should
    still occur.
 5) Appliances should all have their clocks set to UTC, and all log
    entries, traces, and dumps should use GMT.
 6) fix strtok(), change to strtok_r()

Other things this patch fixes/changes (that aren't bugs per se):
 1) Change "%Y-%m-%d %H:%M:%S" and similar to their equivalent shorthand,
    e.g. "%F %T"
 2) change sizeof(timestr) to sizeof timestr. sizeof is an operator,
    not a function. You don't use i +(32), why use sizeof(&lt;var&gt;).
    (And yes, you do use parens with sizeof(&lt;type&gt;).)
 3) change 'char timestr[256]' to 'char timestr[32]' where appropriate.
    Per-thread stack is limited. Time strings are never longer than ~20
    characters, so why waste 220+ bytes on the stack?

Things this patch doesn't fix:
 1) hodgepodge of %Y-%m-%d %H:%M:%S versus %Y/%m/%d-%H%M%S and other
    variations. It's not clear to me whether this ever matters, not to
    mention 3rd party log filtering tools may already rely on a
    particular format. Still it would be nice to have a single manifest
    constant and have every call to localtime/strftime consistently use
    the same format.

Change-Id: I827cad7bf53e57b69c0173f67abe72884249c1a9
BUG: 832173
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3568
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-cache,quick-read: bring down log level</title>
<updated>2012-06-08T00:34:04+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@redhat.com</email>
</author>
<published>2012-06-08T00:09:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=7efa697c26b31c52f0f8cc976a505ff34bfbe33d'/>
<id>7efa697c26b31c52f0f8cc976a505ff34bfbe33d</id>
<content type='text'>
log messages were unnecessarily in INFO level. The two functions
with the same name were non-static and actually the quick-read's
call landed in the io-cache's version:

2012-06-07 17:02:29.848667] I [io-cache.c:1549:check_cache_size_ok] 0-single-master-io-cache: Max cache size is 33791991808
[2012-06-07 17:02:29.848751] I [io-cache.c:1549:check_cache_size_ok] 0-single-master-quick-read: Max cache size is 33791991808

Changed them to static declaration.

Change-Id: Id9daf9593b2832e4c261f95eac6181efea8899a5
BUG: 765227
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3536
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
log messages were unnecessarily in INFO level. The two functions
with the same name were non-static and actually the quick-read's
call landed in the io-cache's version:

2012-06-07 17:02:29.848667] I [io-cache.c:1549:check_cache_size_ok] 0-single-master-io-cache: Max cache size is 33791991808
[2012-06-07 17:02:29.848751] I [io-cache.c:1549:check_cache_size_ok] 0-single-master-quick-read: Max cache size is 33791991808

Changed them to static declaration.

Change-Id: Id9daf9593b2832e4c261f95eac6181efea8899a5
BUG: 765227
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3536
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/quick-read: fix race-conditions in qr_unlink.</title>
<updated>2012-05-23T13:38:24+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>raghavendra@gluster.com</email>
</author>
<published>2012-05-19T09:19:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=2606b87470e396e3e79269764e01f572da051e41'/>
<id>2606b87470e396e3e79269764e01f572da051e41</id>
<content type='text'>
The list of fds on which open needs to be done as part of unlink,
was being modified at different places using different locks.
This resulted in a race-condition where open was marked as in-transit,
but fdctx was removed from the list of fds on which open was being
sent even before open was done. Because of this, open_in_transit would
be set forever (as an open was never actually sent, there would be no
open_cbk called and hence we could not reset the variable), blocking
all the future fd based fops on this fd.

Change-Id: Ie84a55bee578869a9a060a094ba28480e7643ae8
BUG: 819490
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3371
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The list of fds on which open needs to be done as part of unlink,
was being modified at different places using different locks.
This resulted in a race-condition where open was marked as in-transit,
but fdctx was removed from the list of fds on which open was being
sent even before open was done. Because of this, open_in_transit would
be set forever (as an open was never actually sent, there would be no
open_cbk called and hence we could not reset the variable), blocking
all the future fd based fops on this fd.

Change-Id: Ie84a55bee578869a9a060a094ba28480e7643ae8
BUG: 819490
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3371
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount/fuse: Use state-&gt;lk_lock to print lock information on EAGAIN.</title>
<updated>2012-05-15T23:53:28+00:00</updated>
<author>
<name>Mohammed Junaid</name>
<email>junaid@redhat.com</email>
</author>
<published>2012-04-25T10:09:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=4b94890c9777e7d78881d6c72ff739c91a9d3e99'/>
<id>4b94890c9777e7d78881d6c72ff739c91a9d3e99</id>
<content type='text'>
Change-Id: I24a4a0b1c8dc0b8e08b380a5bc8efc111ccdb2c3
BUG: 808400
Signed-off-by: Mohammed Junaid &lt;junaid@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3227
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I24a4a0b1c8dc0b8e08b380a5bc8efc111ccdb2c3
BUG: 808400
Signed-off-by: Mohammed Junaid &lt;junaid@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3227
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
