<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/bit-rot, branch master</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>bitrot/stub: Fix memory leak gf_br_stub_mt_version_t</title>
<updated>2020-09-30T17:04:03+00:00</updated>
<author>
<name>Mohammed Rafi KC</name>
<email>rafi.kavungal@iternity.com</email>
</author>
<published>2020-08-31T19:19:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8489d42bde51455da0fedc531a5fe1df8a24a858'/>
<id>8489d42bde51455da0fedc531a5fe1df8a24a858</id>
<content type='text'>
The data type gf_br_stub_mt_version_t is leaking because the
data type has been added to the dict as static type and the memory
is not free'd from anywhere else

Change-Id: Ib10134f41f45a39be849af1708b1960c77fb62fd
Fixes: #1427
Signed-off-by: Mohammed Rafi KC &lt;rafi.kavungal@iternity.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The data type gf_br_stub_mt_version_t is leaking because the
data type has been added to the dict as static type and the memory
is not free'd from anywhere else

Change-Id: Ib10134f41f45a39be849af1708b1960c77fb62fd
Fixes: #1427
Signed-off-by: Mohammed Rafi KC &lt;rafi.kavungal@iternity.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/bit-rot: simplify and cleanup internal time management</title>
<updated>2020-08-21T14:05:13+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-08-18T09:50:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9bca9a0b42f888cb88cedc848d471dd32a6f62d0'/>
<id>9bca9a0b42f888cb88cedc848d471dd32a6f62d0</id>
<content type='text'>
Since this xlator measures time intervals in seconds, gettimeofday() may
be replaced with simpler gf_time(). Adjust comments and style as well.

Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Change-Id: I2e5900ccb5da2478656d80e5f570487e3ba70966
Updates: #1002
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since this xlator measures time intervals in seconds, gettimeofday() may
be replaced with simpler gf_time(). Adjust comments and style as well.

Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Change-Id: I2e5900ccb5da2478656d80e5f570487e3ba70966
Updates: #1002
</pre>
</div>
</content>
</entry>
<entry>
<title>Indicate timezone offsets in timestamps</title>
<updated>2020-06-15T12:41:10+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2020-03-12T07:20:31+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9a4f91abc07e77165baa7f0499a4887ec9f3e4fe'/>
<id>9a4f91abc07e77165baa7f0499a4887ec9f3e4fe</id>
<content type='text'>
Logs and other output carrying timestamps
will have now timezone offsets indicated, eg.:

[2020-03-12 07:01:05.584482 +0000] I [MSGID: 106143] [glusterd-pmap.c:388:pmap_registry_remove] 0-pmap: removing brick (null) on port 49153

To this end,

- gf_time_fmt() now inserts timezone offset via %z strftime(3) template.
- A new utility function has been added, gf_time_fmt_tv(), that
  takes a struct timeval pointer (*tv) instead of a time_t value to
  specify the time. If tv-&gt;tv_usec is negative,

  gf_time_fmt_tv(... tv ...)

  is equivalent to

  gf_time_fmt(... tv-&gt;tv_sec ...)

  Otherwise it also inserts tv-&gt;tv_usec to the formatted string.
- Building timestamps of usec precision has been converted to
  gf_time_fmt_tv, which is necessary because the method of appending
  a period and the usec value to the end of the timestamp does not work
  if the timestamp has zone offset, but it's also beneficial in terms of
  eliminating repetition.
- The buffer passed to gf_time_fmt/gf_time_fmt_tv has been unified to
  be of GF_TIMESTR_SIZE size (256). We need slightly larger buffer space
  to accommodate the zone offset and it's preferable to use a buffer
  which is undisputedly large enough.

This change does *not* do the following:

- Retaining a method of timestamp creation without timezone offset.
  As to my understanding we don't need such backward compatibility
  as the code just emits timestamps to logs and other diagnostic
  texts, and doesn't do any later processing on them that would rely
  on their format. An exception to this, ie. a case where timestamp
  is built for internal use, is graph.c:fill_uuid(). As far as I can
  see, what matters in that case is the uniqueness of the produced
  string, not the format.
- Implementing a single-token (space free) timestamp format.
  While some timestamp formats used to be single-token, now all of
  them will include a space preceding the offset indicator. Again,
  I did not see a use case where this could be significant in terms
  of representation.
- Moving the codebase to a single unified timestamp format and
  dropping the fmt argument of gf_time_fmt/gf_time_fmt_tv.
  While the gf_timefmt_FT format is almost ubiquitous, there are
  a few cases where different formats are used. I'm not convinced
  there is any reason to not use gf_timefmt_FT in those cases too,
  but I did not want to make a decision in this regard.

Change-Id: I0af73ab5d490cca7ed8d07a2ce7ac22a6df2920a
Updates: #837
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Logs and other output carrying timestamps
will have now timezone offsets indicated, eg.:

[2020-03-12 07:01:05.584482 +0000] I [MSGID: 106143] [glusterd-pmap.c:388:pmap_registry_remove] 0-pmap: removing brick (null) on port 49153

To this end,

- gf_time_fmt() now inserts timezone offset via %z strftime(3) template.
- A new utility function has been added, gf_time_fmt_tv(), that
  takes a struct timeval pointer (*tv) instead of a time_t value to
  specify the time. If tv-&gt;tv_usec is negative,

  gf_time_fmt_tv(... tv ...)

  is equivalent to

  gf_time_fmt(... tv-&gt;tv_sec ...)

  Otherwise it also inserts tv-&gt;tv_usec to the formatted string.
- Building timestamps of usec precision has been converted to
  gf_time_fmt_tv, which is necessary because the method of appending
  a period and the usec value to the end of the timestamp does not work
  if the timestamp has zone offset, but it's also beneficial in terms of
  eliminating repetition.
- The buffer passed to gf_time_fmt/gf_time_fmt_tv has been unified to
  be of GF_TIMESTR_SIZE size (256). We need slightly larger buffer space
  to accommodate the zone offset and it's preferable to use a buffer
  which is undisputedly large enough.

This change does *not* do the following:

- Retaining a method of timestamp creation without timezone offset.
  As to my understanding we don't need such backward compatibility
  as the code just emits timestamps to logs and other diagnostic
  texts, and doesn't do any later processing on them that would rely
  on their format. An exception to this, ie. a case where timestamp
  is built for internal use, is graph.c:fill_uuid(). As far as I can
  see, what matters in that case is the uniqueness of the produced
  string, not the format.
- Implementing a single-token (space free) timestamp format.
  While some timestamp formats used to be single-token, now all of
  them will include a space preceding the offset indicator. Again,
  I did not see a use case where this could be significant in terms
  of representation.
- Moving the codebase to a single unified timestamp format and
  dropping the fmt argument of gf_time_fmt/gf_time_fmt_tv.
  While the gf_timefmt_FT format is almost ubiquitous, there are
  a few cases where different formats are used. I'm not convinced
  there is any reason to not use gf_timefmt_FT in those cases too,
  but I did not want to make a decision in this regard.

Change-Id: I0af73ab5d490cca7ed8d07a2ce7ac22a6df2920a
Updates: #837
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/bit-rot: invalid snprintf() buffer size</title>
<updated>2020-05-18T07:17:40+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-05-06T05:29:48+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8e550380f7098275452fc26c46489739aa8bdae6'/>
<id>8e550380f7098275452fc26c46489739aa8bdae6</id>
<content type='text'>
Found with clang-10 -Wfortify-source:

bit-rot-scrub.c:1802:15: warning: 'snprintf' size argument is too large;
destination buffer has size 32, but size argument is 4096 [-Wfortify-source]
        len = snprintf(key, PATH_MAX, "quarantine-%d", j);
              ^
bit-rot-scrub.c:1813:9: warning: 'snprintf' size argument is too large;
destination buffer has size 32, but size argument is 4096 [-Wfortify-source]
        snprintf(main_key, PATH_MAX, "quarantine-%d", tmp_count);

Change-Id: I9b9c09ef2223ed181d81215154345de976b82f13
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Fixes: #1221
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found with clang-10 -Wfortify-source:

bit-rot-scrub.c:1802:15: warning: 'snprintf' size argument is too large;
destination buffer has size 32, but size argument is 4096 [-Wfortify-source]
        len = snprintf(key, PATH_MAX, "quarantine-%d", j);
              ^
bit-rot-scrub.c:1813:9: warning: 'snprintf' size argument is too large;
destination buffer has size 32, but size argument is 4096 [-Wfortify-source]
        snprintf(main_key, PATH_MAX, "quarantine-%d", tmp_count);

Change-Id: I9b9c09ef2223ed181d81215154345de976b82f13
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Fixes: #1221
</pre>
</div>
</content>
</entry>
<entry>
<title>bitrot: Make number of signer threads configurable</title>
<updated>2020-02-07T06:30:19+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2020-02-03T12:40:17+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8fad76650bd85463708f59d2518f5b764ae4c702'/>
<id>8fad76650bd85463708f59d2518f5b764ae4c702</id>
<content type='text'>
The number of signing process threads (glfs_brpobj)
is set to 4 by default. The recommendation is to set
it to number of cores available. This patch makes it
configurable as follows

gluster vol bitrot &lt;volname&gt; signer-threads &lt;count&gt;

fixes: bz#1797869
Change-Id: Ia883b3e5e34e0bc8d095243508d320c9c9c58adc
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The number of signing process threads (glfs_brpobj)
is set to 4 by default. The recommendation is to set
it to number of cores available. This patch makes it
configurable as follows

gluster vol bitrot &lt;volname&gt; signer-threads &lt;count&gt;

fixes: bz#1797869
Change-Id: Ia883b3e5e34e0bc8d095243508d320c9c9c58adc
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xlator/bit-rot: structure logging</title>
<updated>2020-02-04T06:33:15+00:00</updated>
<author>
<name>yatipadia</name>
<email>ypadia@redhat.com</email>
</author>
<published>2019-12-11T14:24:45+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ec2c7ddd6739afacc871a5df4c348b4c58cf153e'/>
<id>ec2c7ddd6739afacc871a5df4c348b4c58cf153e</id>
<content type='text'>
convert all gf_msg() to gf_smsg()

Change-Id: Ifa45b5089f83ddfcf69132bb8d9c0dc6d012464b
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert all gf_msg() to gf_smsg()

Change-Id: Ifa45b5089f83ddfcf69132bb8d9c0dc6d012464b
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple xlators: reduce key length</title>
<updated>2020-01-14T17:11:22+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-12-09T19:28:00+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9969d1dc2a3e815b161ce8a3dc5d08f84cfe011f'/>
<id>9969d1dc2a3e815b161ce8a3dc5d08f84cfe011f</id>
<content type='text'>
In many cases, we were freely allocating long keys with no need.
Smaller char arrays are just fine almost anywhere, so just went ahead
and looked where they we can use smaller ones.

In some cases, annotated the functions as static and the prefixes
passed as const as it was easier to read and understand.

Where relevant, converted the dict functions to use known key length.

Change-Id: I882ab33ea20d90b63278336cd1370c09ffdab7f2
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many cases, we were freely allocating long keys with no need.
Smaller char arrays are just fine almost anywhere, so just went ahead
and looked where they we can use smaller ones.

In some cases, annotated the functions as static and the prefixes
passed as const as it was easier to read and understand.

Where relevant, converted the dict functions to use known key length.

Change-Id: I882ab33ea20d90b63278336cd1370c09ffdab7f2
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xlator/bit-rot-stub-helpers: structure logging</title>
<updated>2020-01-14T03:57:13+00:00</updated>
<author>
<name>yatipadia</name>
<email>ypadia@redhat.com</email>
</author>
<published>2019-12-12T10:47:22+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=6b5068f3404c072b94e18854aab8e99d3ce54350'/>
<id>6b5068f3404c072b94e18854aab8e99d3ce54350</id>
<content type='text'>
convert gf_msg() to gf_smsg()

Change-Id: Id03b6a2f6817101650ea6eeffb10e91c09e6ef80
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert gf_msg() to gf_smsg()

Change-Id: Id03b6a2f6817101650ea6eeffb10e91c09e6ef80
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xlator/bit-rot-stub: structure logging</title>
<updated>2019-12-27T04:08:32+00:00</updated>
<author>
<name>yatipadia</name>
<email>ypadia@redhat.com</email>
</author>
<published>2019-12-12T09:10:03+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f5aafeffed3a5363ff200e9300dec5855f680d9c'/>
<id>f5aafeffed3a5363ff200e9300dec5855f680d9c</id>
<content type='text'>
convert gf_msg() to gf_smsg()

Change-Id: I3072ba4305b720bea053688d140660d7d5c2d267
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert gf_msg() to gf_smsg()

Change-Id: I3072ba4305b720bea053688d140660d7d5c2d267
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Multiple files: make root gfid a static variable</title>
<updated>2019-10-14T08:21:52+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-04T08:17:44+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=704961a39ffd019487e36ac6dbd425399cb85cf2'/>
<id>704961a39ffd019487e36ac6dbd425399cb85cf2</id>
<content type='text'>
In many places we use it, compare to it, etc. It could be a static variable,
as it really doesn't change. I think it's better than initializing to 0
and then doing gfid[15] = 1 or other tricks.

I think there are additional oppportunuties to make more variables static.
This is an attempt at an easy one.

Change-Id: I7f23a30a94056d8f043645371ab841cbd0f90d19
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many places we use it, compare to it, etc. It could be a static variable,
as it really doesn't change. I think it's better than initializing to 0
and then doing gfid[15] = 1 or other tricks.

I think there are additional oppportunuties to make more variables static.
This is an attempt at an easy one.

Change-Id: I7f23a30a94056d8f043645371ab841cbd0f90d19
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
