<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/changelog/src/changelog-misc.h, branch v7dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>libglusterfs: Move devel headers under glusterfs directory</title>
<updated>2018-12-05T21:47:04+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-11-29T19:08:06+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5'/>
<id>20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5</id>
<content type='text'>
libglusterfs devel package headers are referenced in code using
include semantics for a program, this while it works can be better
especially when dealing with out of tree xlator builds or in
general out of tree devel package usage.

Towards this, the following changes are done,
- moved all devel headers under a glusterfs directory
- Included these headers using system header notation &lt;&gt; in all
code outside of libglusterfs
- Included these headers using own program notation "" within
libglusterfs

This change although big, is just moving around the headers and
making it correct when including these headers from other sources.

This helps us correctly include libglusterfs includes without
namespace conflicts.

Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b
Updates: bz#1193929
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libglusterfs devel package headers are referenced in code using
include semantics for a program, this while it works can be better
especially when dealing with out of tree xlator builds or in
general out of tree devel package usage.

Towards this, the following changes are done,
- moved all devel headers under a glusterfs directory
- Included these headers using system header notation &lt;&gt; in all
code outside of libglusterfs
- Included these headers using own program notation "" within
libglusterfs

This change although big, is just moving around the headers and
making it correct when including these headers from other sources.

This helps us correctly include libglusterfs includes without
namespace conflicts.

Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b
Updates: bz#1193929
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Land clang-format changes</title>
<updated>2018-09-12T11:52:48+00:00</updated>
<author>
<name>Gluster Ant</name>
<email>bugzilla-bot@gluster.org</email>
</author>
<published>2018-09-12T11:52:48+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=45a71c0548b6fd2c757aa2e7b7671a1411948894'/>
<id>45a71c0548b6fd2c757aa2e7b7671a1411948894</id>
<content type='text'>
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
</pre>
</div>
</content>
</entry>
<entry>
<title>changelog xlator: strncpy()-&gt;sprintf(), reduce strlen()'s</title>
<updated>2018-08-31T06:14:47+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-08-21T16:23:01+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=dc6e6b71f87f6f89bb0b69816e92779595d716bd'/>
<id>dc6e6b71f87f6f89bb0b69816e92779595d716bd</id>
<content type='text'>
xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
xlators/features/changelog/lib/src/gf-changelog.c
xlators/features/changelog/src/changelog-helpers.c
xlators/features/changelog/src/changelog-misc.h

strncpy may not be very efficient for short strings copied into
a large buffer: If the length of src is less than n,
strncpy() writes additional null bytes to dest to ensure
that a total of n bytes are written.

Instead, use snprintf(). Where possible, ensure there's
no truncation of the output.

Also:
- save the result of strlen() and re-use it when possible.
- move from strlen to SLEN (sizeof() ) for const strings.
- switch a strncpy to a memcpy.

Compile-tested only!

Change-Id: Ia7a52bce0b243613ad910192ec163c93d944e077
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>
xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
xlators/features/changelog/lib/src/gf-changelog.c
xlators/features/changelog/src/changelog-helpers.c
xlators/features/changelog/src/changelog-misc.h

strncpy may not be very efficient for short strings copied into
a large buffer: If the length of src is less than n,
strncpy() writes additional null bytes to dest to ensure
that a total of n bytes are written.

Instead, use snprintf(). Where possible, ensure there's
no truncation of the output.

Also:
- save the result of strlen() and re-use it when possible.
- move from strlen to SLEN (sizeof() ) for const strings.
- switch a strncpy to a memcpy.

Compile-tested only!

Change-Id: Ia7a52bce0b243613ad910192ec163c93d944e077
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fips: Replace md5sum usage to enable fips support</title>
<updated>2017-12-19T14:39:04+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2017-12-19T05:05:05+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=5aca4cf569f19d235662c4fbaa04df21e5fd46c2'/>
<id>5aca4cf569f19d235662c4fbaa04df21e5fd46c2</id>
<content type='text'>
md5sum is not fips compliant. Using xxhash64 instead of
md5sum for socket file generation in glusterd and
changelog to enable fips support.

NOTE: md5sum is 128 bit hash. xxhash used is 64 bit.

Updates: #230
Change-Id: I1bf2ea05905b9151cd29fa951f903685ab0dc84c
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
md5sum is not fips compliant. Using xxhash64 instead of
md5sum for socket file generation in glusterd and
changelog to enable fips support.

NOTE: md5sum is 128 bit hash. xxhash used is 64 bit.

Updates: #230
Change-Id: I1bf2ea05905b9151cd29fa951f903685ab0dc84c
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/changelog: Add xattr as special type in changelog entry</title>
<updated>2017-05-10T12:55:46+00:00</updated>
<author>
<name>Mohammed Rafi KC</name>
<email>rkavunga@redhat.com</email>
</author>
<published>2017-05-08T15:40:50+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ed27add635263eafb581e5dd1599478d82f0f28a'/>
<id>ed27add635263eafb581e5dd1599478d82f0f28a</id>
<content type='text'>
When both SETATTR and SETXATTR fops are happening on gfid within the
rollover time then, SETXATTR were not logged.
In Which case we will miss the xattr fop in slave.

This patch will be fix the same

Change-Id: Ia75538ad1fd2797dbcf90d20dfa89f756009243d
BUG: 1448914
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17205
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When both SETATTR and SETXATTR fops are happening on gfid within the
rollover time then, SETXATTR were not logged.
In Which case we will miss the xattr fop in slave.

This patch will be fix the same

Change-Id: Ia75538ad1fd2797dbcf90d20dfa89f756009243d
BUG: 1448914
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17205
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: use syscall wrappers instead of direct syscalls</title>
<updated>2015-10-28T23:34:45+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2015-10-01T20:16:52+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=36ea43b93b8476595ac22da031bc42a807ccc852'/>
<id>36ea43b93b8476595ac22da031bc42a807ccc852</id>
<content type='text'>
various xlators and other components are invoking system calls
directly instead of using the libglusterfs/syscall.[ch] wrappers.

If not using the system call wrappers there should be a comment
in the source explaining why the wrapper isn't used.

Change-Id: I8ef94c48728666465abf126c778b70c9e5c00e47
BUG: 1267967
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12273
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>
various xlators and other components are invoking system calls
directly instead of using the libglusterfs/syscall.[ch] wrappers.

If not using the system call wrappers there should be a comment
in the source explaining why the wrapper isn't used.

Change-Id: I8ef94c48728666465abf126c778b70c9e5c00e47
BUG: 1267967
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12273
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>features/changelog: Fixing compilation issue</title>
<updated>2015-05-08T15:18:30+00:00</updated>
<author>
<name>Aravinda VK</name>
<email>avishwan@redhat.com</email>
</author>
<published>2015-05-08T15:08:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=aceecc2285ab3e5d3150f0d8c644371213c61b65'/>
<id>aceecc2285ab3e5d3150f0d8c644371213c61b65</id>
<content type='text'>
This issue introduced due to manual rebase.

Change-Id: I0589f4a0a1270190340f419b8022d6483bcf853d
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
BUG: 1219479
Reviewed-on: http://review.gluster.org/10685
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Tested-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This issue introduced due to manual rebase.

Change-Id: I0589f4a0a1270190340f419b8022d6483bcf853d
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
BUG: 1219479
Reviewed-on: http://review.gluster.org/10685
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Tested-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/changelog: Avoid creation of empty changelogs</title>
<updated>2015-05-08T11:52:51+00:00</updated>
<author>
<name>Saravanakumar Arumugam</name>
<email>sarumuga@redhat.com</email>
</author>
<published>2015-04-29T12:03:43+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=df919238505a74a9d89b308bbc6d01b797140439'/>
<id>df919238505a74a9d89b308bbc6d01b797140439</id>
<content type='text'>
An empty changelog when rolled over gets unlinked and indexed with
a modified path-name in htime file. The modification is "changelog"
not "CHANGELOG" in basename of the empty changelog file.

Change-Id: I77fd0b48b5c33c245418f5ac7a9756f08ece24d9
BUG: 1208470
Signed-off-by: Ajeet Jha &lt;ajha@redhat.com&gt;
Signed-off-by: Saravanakumar Arumugam &lt;sarumuga@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9572
Tested-by: NetBSD Build System
Reviewed-by: Aravinda VK &lt;avishwan@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-by: Venky Shankar &lt;vshankar@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An empty changelog when rolled over gets unlinked and indexed with
a modified path-name in htime file. The modification is "changelog"
not "CHANGELOG" in basename of the empty changelog file.

Change-Id: I77fd0b48b5c33c245418f5ac7a9756f08ece24d9
BUG: 1208470
Signed-off-by: Ajeet Jha &lt;ajha@redhat.com&gt;
Signed-off-by: Saravanakumar Arumugam &lt;sarumuga@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9572
Tested-by: NetBSD Build System
Reviewed-by: Aravinda VK &lt;avishwan@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-by: Venky Shankar &lt;vshankar@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/changelog: Version support for Changelog Parser</title>
<updated>2015-05-07T06:01:51+00:00</updated>
<author>
<name>Aravinda VK</name>
<email>avishwan@redhat.com</email>
</author>
<published>2015-04-08T18:44:50+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=84a0baabfb9aa29348d8b17b7517870d46023ab3'/>
<id>84a0baabfb9aa29348d8b17b7517870d46023ab3</id>
<content type='text'>
As optional feature, during unlink, full path will be recorded.
Changelog Version number to be bumped up to 1.2.

With this patch, parser checks the version number before parsing
and handles accordingly.

Change-Id: Ic1ad98259c39e417029a08e26a1d4b467817e65a
BUG: 1214561
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10166
Reviewed-by: Saravanakumar Arumugam &lt;sarumuga@redhat.com&gt;
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Venky Shankar &lt;vshankar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As optional feature, during unlink, full path will be recorded.
Changelog Version number to be bumped up to 1.2.

With this patch, parser checks the version number before parsing
and handles accordingly.

Change-Id: Ic1ad98259c39e417029a08e26a1d4b467817e65a
BUG: 1214561
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10166
Reviewed-by: Saravanakumar Arumugam &lt;sarumuga@redhat.com&gt;
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Venky Shankar &lt;vshankar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>feature/changelog: Capture path for deletes</title>
<updated>2015-05-04T15:10:12+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2015-04-14T09:12:46+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=21515b3331d8d72011fef79008bcaff8ca43647a'/>
<id>21515b3331d8d72011fef79008bcaff8ca43647a</id>
<content type='text'>
PROBLEM:
There is no way to get the path of deleted file if we
have gfid from changelog since the file is already deleted.

SOLUTION:
Do a recursive readlink on parent gfid in backend .glusterfs
path to get the complete path in I/O callpath in changelog
translator and capture it in callback.

The path captured is relative from the brick root. The field
separator used is '\0'.
e.g.,
......\0&lt;pgfid&gt;/bname\0&lt;relative-path&gt;\0&lt;next-record&gt;

ADDITIONAL REQUIRED CHANGES:

1. The changelog translator option called "changelog.capture-del-path"
   is introduced to enable or disable the capturing of deleted entry
   path.
   e.g.,
   gluster vol set &lt;vol-name&gt; changelog.capture-del-path on/off

   If capture-del-path is disabled, '\0' is captured instead of
   relative path.
   e.g.,
   ......\0&lt;pgfid&gt;/bname\0\0\0&lt;next-record&gt;

2. The minor number in the version of changelog is bumped up from v1.1
   to v1.2.

3. If recursive readlink is failed for some reason, it will capture
   \0 in place of &lt;relative path&gt;.
   e.g.,
   ......\0&lt;pgfid&gt;/bname\0\0\0&lt;next-record&gt;
   (same as when caputre-del-path option is disabled)

4. If bname argument passed to "resolve_pargfid_to_path" function
   is NULL and pargfid is ROOT, "." is returned. This is not the
   case with changelog, where bname is always passed. This is
   applicable to other consumers of "resolve_pargfid_to_path"
   routine.

NOTE:
   Changelog parser should consider the above new changes
   and should parse accordingly.

Change-Id: I040ed429b5aa7d391033fc6a540edbf07fc37827
BUG: 1214561
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10288
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Venky Shankar &lt;vshankar@redhat.com&gt;
Tested-by: NetBSD Build System
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PROBLEM:
There is no way to get the path of deleted file if we
have gfid from changelog since the file is already deleted.

SOLUTION:
Do a recursive readlink on parent gfid in backend .glusterfs
path to get the complete path in I/O callpath in changelog
translator and capture it in callback.

The path captured is relative from the brick root. The field
separator used is '\0'.
e.g.,
......\0&lt;pgfid&gt;/bname\0&lt;relative-path&gt;\0&lt;next-record&gt;

ADDITIONAL REQUIRED CHANGES:

1. The changelog translator option called "changelog.capture-del-path"
   is introduced to enable or disable the capturing of deleted entry
   path.
   e.g.,
   gluster vol set &lt;vol-name&gt; changelog.capture-del-path on/off

   If capture-del-path is disabled, '\0' is captured instead of
   relative path.
   e.g.,
   ......\0&lt;pgfid&gt;/bname\0\0\0&lt;next-record&gt;

2. The minor number in the version of changelog is bumped up from v1.1
   to v1.2.

3. If recursive readlink is failed for some reason, it will capture
   \0 in place of &lt;relative path&gt;.
   e.g.,
   ......\0&lt;pgfid&gt;/bname\0\0\0&lt;next-record&gt;
   (same as when caputre-del-path option is disabled)

4. If bname argument passed to "resolve_pargfid_to_path" function
   is NULL and pargfid is ROOT, "." is returned. This is not the
   case with changelog, where bname is always passed. This is
   applicable to other consumers of "resolve_pargfid_to_path"
   routine.

NOTE:
   Changelog parser should consider the above new changes
   and should parse accordingly.

Change-Id: I040ed429b5aa7d391033fc6a540edbf07fc37827
BUG: 1214561
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10288
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Venky Shankar &lt;vshankar@redhat.com&gt;
Tested-by: NetBSD Build System
</pre>
</div>
</content>
</entry>
</feed>
