<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/debug/io-stats/src/io-stats.c, branch v3.3.2qa2</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>localtime and ctime are not MT-SAFE</title>
<updated>2013-02-08T20:04:42+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2012-06-22T15:25:32+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=988460a9f597a489f22d39cd259fdb17fe2e5de6'/>
<id>988460a9f597a489f22d39cd259fdb17fe2e5de6</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.

BUG: 832173

Change-Id: Iee9719db4576eacc6c75694d9107954d0912cba8
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3613
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
Tested-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.

BUG: 832173

Change-Id: Iee9719db4576eacc6c75694d9107954d0912cba8
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3613
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
Tested-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: adding extra data for fops</title>
<updated>2012-03-22T23:40:27+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2012-03-20T11:52:24+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9d3af972f516b6ba38d2736ce2016e34a452d569'/>
<id>9d3af972f516b6ba38d2736ce2016e34a452d569</id>
<content type='text'>
with this change, the xlator APIs will have a dictionary as extra
argument, which is passed between all the layers. This can be
utilized for overloading in some of the operations.

Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
BUG: 782265
Reviewed-on: http://review.gluster.com/2960
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>
with this change, the xlator APIs will have a dictionary as extra
argument, which is passed between all the layers. This can be
utilized for overloading in some of the operations.

Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
BUG: 782265
Reviewed-on: http://review.gluster.com/2960
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>core: utilize mempool for frame-&gt;local allocations</title>
<updated>2012-02-21T10:42:09+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2012-02-21T09:17:48+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0ef7e763c85c045ef7937d0ca02d8c5f0333e6e8'/>
<id>0ef7e763c85c045ef7937d0ca02d8c5f0333e6e8</id>
<content type='text'>
in each translator, which uses 'frame-&gt;local', we are using
GF_CALLOC/GF_FREE, which would be costly considering the
number of allocation happening in a lifetime of 'fop'. It
would be good to utilize the mem pool framework for xlator's
local structures, so there is no allocation overhead.

Change-Id: Ida6e65039a24d9c219b380aa1c3559f36046dc94
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 765336
Reviewed-on: http://review.gluster.com/2772
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>
in each translator, which uses 'frame-&gt;local', we are using
GF_CALLOC/GF_FREE, which would be costly considering the
number of allocation happening in a lifetime of 'fop'. It
would be good to utilize the mem pool framework for xlator's
local structures, so there is no allocation overhead.

Change-Id: Ida6e65039a24d9c219b380aa1c3559f36046dc94
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 765336
Reviewed-on: http://review.gluster.com/2772
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>core: add an extra flag to readv()/writev() API</title>
<updated>2012-02-14T09:09:02+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2012-02-06T12:19:14+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0e6df0100e13123fe38f28c5a090777e894d8f52'/>
<id>0e6df0100e13123fe38f28c5a090777e894d8f52</id>
<content type='text'>
needed to implement a proper handling of open flag alterations
using fcntl() on fd.

Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 782265
Reviewed-on: http://review.gluster.com/2723
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>
needed to implement a proper handling of open flag alterations
using fcntl() on fd.

Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 782265
Reviewed-on: http://review.gluster.com/2723
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>complete the implementation of missing 'f**xattr()' fops</title>
<updated>2012-01-25T10:26:51+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2012-01-21T14:35:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=49c325d949b2df06572df7dd3825735fb9c8cd6f'/>
<id>49c325d949b2df06572df7dd3825735fb9c8cd6f</id>
<content type='text'>
in debug/* and cluster/* translators and a syncop_fsetxattr()

added a test case for testing the working of 'f-fop()' on
fuse mount.

Change-Id: I0c2aeeb30a0fb382ef2495cca1e66b00abaffd35
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 766571
Reviewed-on: http://review.gluster.com/802
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in debug/* and cluster/* translators and a syncop_fsetxattr()

added a test case for testing the working of 'f-fop()' on
fuse mount.

Change-Id: I0c2aeeb30a0fb382ef2495cca1e66b00abaffd35
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 766571
Reviewed-on: http://review.gluster.com/802
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: get xattrs also as part of readdirp</title>
<updated>2012-01-25T10:03:44+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2012-01-18T12:36:44+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cf8486cbef329ef66868f658fa35f470f97db462'/>
<id>cf8486cbef329ef66868f658fa35f470f97db462</id>
<content type='text'>
readdirp_req() call sends a dict_t * as an argument, which
contains all the xattr keys for which the entries got in
readdirp_rsp() are having xattr value filled dictionary.

Change-Id: I8b7e1290740ea3e884e67d19156ce849227167c0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 765785
Reviewed-on: http://review.gluster.com/771
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
readdirp_req() call sends a dict_t * as an argument, which
contains all the xattr keys for which the entries got in
readdirp_rsp() are having xattr value filled dictionary.

Change-Id: I8b7e1290740ea3e884e67d19156ce849227167c0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 765785
Reviewed-on: http://review.gluster.com/771
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug/io-stats: Handle fini for io-stats xlator</title>
<updated>2011-12-29T06:21:19+00:00</updated>
<author>
<name>shishir gowda</name>
<email>shishirng@gluster.com</email>
</author>
<published>2011-12-23T06:19:02+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=145b0f5a45c600c4f84f0d85adf36035a0abce5e'/>
<id>145b0f5a45c600c4f84f0d85adf36035a0abce5e</id>
<content type='text'>
Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Change-Id: I0b36a2f4836fa84ced7414fdba4d68e0cb6cac7b
BUG: 767862
Reviewed-on: http://review.gluster.com/2499
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amar@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Change-Id: I0b36a2f4836fa84ced7414fdba4d68e0cb6cac7b
BUG: 767862
Reviewed-on: http://review.gluster.com/2499
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amar@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug/io-stats: prevent setfattr crash when no value given</title>
<updated>2011-11-11T10:09:48+00:00</updated>
<author>
<name>Rajesh Amaravathi</name>
<email>rajesh@gluster.com</email>
</author>
<published>2011-11-02T09:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=bb67817cf582678685ce1207f2a1d41fb4c3649b'/>
<id>bb67817cf582678685ce1207f2a1d41fb4c3649b</id>
<content type='text'>
Check for whether the dump file is given, and proceed
on success. If dump file is not given, unwind with ENOENT.

Change-Id: If524a2b20d643e0e75d81daebe59560a78000524
BUG: 3716
Reviewed-on: http://review.gluster.com/663
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amar@gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check for whether the dump file is given, and proceed
on success. If dump file is not given, unwind with ENOENT.

Change-Id: If524a2b20d643e0e75d81daebe59560a78000524
BUG: 3716
Reviewed-on: http://review.gluster.com/663
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amar@gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-stats: improve io-stats dump output</title>
<updated>2011-10-28T12:03:48+00:00</updated>
<author>
<name>Rajesh Amaravathi</name>
<email>rajesh@gluster.com</email>
</author>
<published>2011-10-11T10:39:52+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=dbf7aa864d8f0515fe4d742fc520a4d1134dbbd4'/>
<id>dbf7aa864d8f0515fe4d742fc520a4d1134dbbd4</id>
<content type='text'>
* Cumulative statistics' output has been formatted
  to match #gluster volume profile &lt;vol&gt; info
* Fop count, latency measurements have been tabulated
  for better readability.
* Minor formatting of individual fop call counts
  and throughput info dumps.

Change-Id: I0fa524f773018be2f73077d107e34170d19fc420
BUG: 3544
Reviewed-on: http://review.gluster.com/581
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amar@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Cumulative statistics' output has been formatted
  to match #gluster volume profile &lt;vol&gt; info
* Fop count, latency measurements have been tabulated
  for better readability.
* Minor formatting of individual fop call counts
  and throughput info dumps.

Change-Id: I0fa524f773018be2f73077d107e34170d19fc420
BUG: 3544
Reviewed-on: http://review.gluster.com/581
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amar@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug/io-stats: Allow multiple children in graph</title>
<updated>2011-09-14T12:27:19+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2011-09-06T08:26:03+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=78dee45ef829296dbcb4cf28e06feb8e25458c91'/>
<id>78dee45ef829296dbcb4cf28e06feb8e25458c91</id>
<content type='text'>
Change-Id: Ie4fb75d8000ff95daa8bf9f6757926822de28a65
BUG: 2458
Reviewed-on: http://review.gluster.com/401
Reviewed-by: Vijay Bellur &lt;vijay@gluster.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>
Change-Id: Ie4fb75d8000ff95daa8bf9f6757926822de28a65
BUG: 2458
Reviewed-on: http://review.gluster.com/401
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
