<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/index/src/index.c, branch v3.7.18</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>features/index: Exclude gfid-type for '.', '..'</title>
<updated>2016-07-11T04:56:35+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2016-05-31T16:21:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d3a93ff7a9a8d102cc13063dec33dd652d69d719'/>
<id>d3a93ff7a9a8d102cc13063dec33dd652d69d719</id>
<content type='text'>
index_get_gfid_type is assuming all names are gfids where as some of these
entry-&gt;d_names can be '.' or '..'

Thanks a lot to Nithya for RC

 &gt;BUG: 1336630
 &gt;Change-Id: I06ad688a5865ab25b4f6c8a91af8c7fb2ed62186
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/14589
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;Reviewed-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
 &gt;Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;(cherry picked from commit a89a9d266c439800286f281655d67f4e362dec32)

Change-Id: I2a3d13ee76846c38e965f8a98bacc8755a8debfd
BUG: 1341482
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14598
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
index_get_gfid_type is assuming all names are gfids where as some of these
entry-&gt;d_names can be '.' or '..'

Thanks a lot to Nithya for RC

 &gt;BUG: 1336630
 &gt;Change-Id: I06ad688a5865ab25b4f6c8a91af8c7fb2ed62186
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/14589
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;Reviewed-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
 &gt;Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;(cherry picked from commit a89a9d266c439800286f281655d67f4e362dec32)

Change-Id: I2a3d13ee76846c38e965f8a98bacc8755a8debfd
BUG: 1341482
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14598
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/index: Get gfid type in readdir</title>
<updated>2016-03-31T07:03:26+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2016-02-25T13:15:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=9e6a9199b1dbd58e558d69f6c92ff6b948d3b7b3'/>
<id>9e6a9199b1dbd58e558d69f6c92ff6b948d3b7b3</id>
<content type='text'>
 &gt;Change-Id: I2a6174e1af70a94a52b0b735fd8504800a7ea173
 &gt;BUG: 1313135
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/13553
 &gt;Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Anuradha Talur &lt;atalur@redhat.com&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;(cherry picked from commit 459d0a5e173f9d9f597aec89f81e5377425eb8fb)

Change-Id: I3384906201129d3e03a56bc4b071302028f6953b
BUG: 1322516
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13858
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Anuradha Talur &lt;atalur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 &gt;Change-Id: I2a6174e1af70a94a52b0b735fd8504800a7ea173
 &gt;BUG: 1313135
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/13553
 &gt;Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Anuradha Talur &lt;atalur@redhat.com&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
 &gt;(cherry picked from commit 459d0a5e173f9d9f597aec89f81e5377425eb8fb)

Change-Id: I3384906201129d3e03a56bc4b071302028f6953b
BUG: 1322516
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13858
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Anuradha Talur &lt;atalur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: reduce "inline" usage</title>
<updated>2016-01-18T09:02:34+00:00</updated>
<author>
<name>Kaleb S KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2015-11-18T17:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=50ae3e67e4f294925fc840d3f83b77f7072af54d'/>
<id>50ae3e67e4f294925fc840d3f83b77f7072af54d</id>
<content type='text'>
There are three kinds of inline functions: plain inline, extern inline,
and static inline.  All three have been removed from .c files, except
those in "contrib" which aren't our problem.  Inlines in .h files, which
are overwhelmingly "static inline" already, have generally been left
alone.  Over time we should be able to "lower" these into .c files, but
that has to be done in a case-by-case fashion requiring more manual
effort.  This part was easy to do automatically without (as far as I can
tell) any ill effect.

In the process, several pieces of dead code were flagged by the
compiler, and were removed.

backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155,
http://review.gluster.org/11769, BUG: 1245331

Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44
BUG: 1283302
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12646
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are three kinds of inline functions: plain inline, extern inline,
and static inline.  All three have been removed from .c files, except
those in "contrib" which aren't our problem.  Inlines in .h files, which
are overwhelmingly "static inline" already, have generally been left
alone.  Over time we should be able to "lower" these into .c files, but
that has to be done in a case-by-case fashion requiring more manual
effort.  This part was easy to do automatically without (as far as I can
tell) any ill effect.

In the process, several pieces of dead code were flagged by the
compiler, and were removed.

backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155,
http://review.gluster.org/11769, BUG: 1245331

Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44
BUG: 1283302
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12646
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>afr: refresh inode using fstat</title>
<updated>2015-12-29T07:25:23+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2015-12-07T12:33:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f88369e75fc2482eec68da798d849acaa30c5de8'/>
<id>f88369e75fc2482eec68da798d849acaa30c5de8</id>
<content type='text'>
Backport of http://review.gluster.org/12894

For fd based operations (fgetxattr, readv etc.) if an inode refresh is
required, do so using fstat instead of lookup. This is because the file
might have been deleted by another client before refresh but posix
mandates that FOPS using already open fds must still succeed.

Change-Id: Id5f71c3af4892b648eb747f363dffe6208e7ac09
BUG: 1290363
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13040
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of http://review.gluster.org/12894

For fd based operations (fgetxattr, readv etc.) if an inode refresh is
required, do so using fstat instead of lookup. This is because the file
might have been deleted by another client before refresh but posix
mandates that FOPS using already open fds must still succeed.

Change-Id: Id5f71c3af4892b648eb747f363dffe6208e7ac09
BUG: 1290363
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13040
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/index : Prevent logging due to NULL dict</title>
<updated>2015-12-21T09:19:19+00:00</updated>
<author>
<name>Anuradha Talur</name>
<email>atalur@redhat.com</email>
</author>
<published>2015-12-08T11:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=871bfc1c1418290c30484015f11a8c476489ca2a'/>
<id>871bfc1c1418290c30484015f11a8c476489ca2a</id>
<content type='text'>
      Backport of http://review.gluster.org/12910

Added a check for non-NULLness of dict before
performing dict_foreach_match on it.

Change-Id: I77d83559934006425ed33745b8a244b2f5d90cb1
BUG: 1287531
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12910
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12971
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
      Backport of http://review.gluster.org/12910

Added a check for non-NULLness of dict before
performing dict_foreach_match on it.

Change-Id: I77d83559934006425ed33745b8a244b2f5d90cb1
BUG: 1287531
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12910
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12971
</pre>
</div>
</content>
</entry>
<entry>
<title>heal : Changed heal info to process all indices directories</title>
<updated>2015-12-21T09:19:05+00:00</updated>
<author>
<name>Anuradha Talur</name>
<email>atalur@redhat.com</email>
</author>
<published>2015-11-23T10:26:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=fbcd691b593cba29ba9c54d3da2c685787f719be'/>
<id>fbcd691b593cba29ba9c54d3da2c685787f719be</id>
<content type='text'>
        Backport of http://review.gluster.org/#/c/12658/

Change-Id: Ida863844e14309b6526c1b8434273fbf05c410d2
BUG: 1287531
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12854
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of http://review.gluster.org/#/c/12658/

Change-Id: Ida863844e14309b6526c1b8434273fbf05c410d2
BUG: 1287531
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12854
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/index : Readdirp performance improvement</title>
<updated>2015-12-21T09:16:20+00:00</updated>
<author>
<name>Anuradha Talur</name>
<email>atalur@redhat.com</email>
</author>
<published>2015-11-12T14:11:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=95a576dec754af6609c5356e07003c54058eb675'/>
<id>95a576dec754af6609c5356e07003c54058eb675</id>
<content type='text'>
       Backport of: http://review.gluster.org/#/c/12468

Things done :
Index now maintains two different directories :
1) for pending xattrs (trusted.afr.volname-client-n,
                       trusted.ec.dirty)

2) for on going xattrs (trusted.afr.dirty)

Based on the xattr, index decides the directory
to add/del entry in/from.

Change-Id: Ie04c02ea2d862cf80426a871a9a1e80b0773d9fd
BUG: 1287531
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12468
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12852
Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
       Backport of: http://review.gluster.org/#/c/12468

Things done :
Index now maintains two different directories :
1) for pending xattrs (trusted.afr.volname-client-n,
                       trusted.ec.dirty)

2) for on going xattrs (trusted.afr.dirty)

Based on the xattr, index decides the directory
to add/del entry in/from.

Change-Id: Ie04c02ea2d862cf80426a871a9a1e80b0773d9fd
BUG: 1287531
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12468
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12852
Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid conflict between contrib/uuid and system uuid</title>
<updated>2015-04-04T17:48:35+00:00</updated>
<author>
<name>Emmanuel Dreyfus</name>
<email>manu@netbsd.org</email>
</author>
<published>2015-04-02T13:51:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=28397cae4102ac3f08576ebaf071ad92683097e8'/>
<id>28397cae4102ac3f08576ebaf071ad92683097e8</id>
<content type='text'>
glusterfs relies on Linux uuid implementation, which
API is incompatible with most other systems's uuid. As
a result, libglusterfs has to embed contrib/uuid,
which is the Linux implementation, on non Linux systems.
This implementation is incompatible with systtem's
built in, but the symbols have the same names.

Usually this is not a problem because when we link
with -lglusterfs, libc's symbols are trumped. However
there is a problem when a program not linked with
-lglusterfs will dlopen() glusterfs component. In
such a case, libc's uuid implementation is already
loaded in the calling program, and it will be used
instead of libglusterfs's implementation, causing
crashes.

A possible workaround is to use pre-load libglusterfs
in the calling program (using LD_PRELOAD on NetBSD for
instance), but such a mechanism is not portable, nor
is it flexible. A much better approach is to rename
libglusterfs's uuid_* functions to gf_uuid_* to avoid
any possible conflict. This is what this change attempts.

BUG: 1206587
Change-Id: I9ccd3e13afed1c7fc18508e92c7beb0f5d49f31a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/10017
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
glusterfs relies on Linux uuid implementation, which
API is incompatible with most other systems's uuid. As
a result, libglusterfs has to embed contrib/uuid,
which is the Linux implementation, on non Linux systems.
This implementation is incompatible with systtem's
built in, but the symbols have the same names.

Usually this is not a problem because when we link
with -lglusterfs, libc's symbols are trumped. However
there is a problem when a program not linked with
-lglusterfs will dlopen() glusterfs component. In
such a case, libc's uuid implementation is already
loaded in the calling program, and it will be used
instead of libglusterfs's implementation, causing
crashes.

A possible workaround is to use pre-load libglusterfs
in the calling program (using LD_PRELOAD on NetBSD for
instance), but such a mechanism is not portable, nor
is it flexible. A much better approach is to rename
libglusterfs's uuid_* functions to gf_uuid_* to avoid
any possible conflict. This is what this change attempts.

BUG: 1206587
Change-Id: I9ccd3e13afed1c7fc18508e92c7beb0f5d49f31a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/10017
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/index: Add option to track specific xattrs for xattrop64</title>
<updated>2015-02-25T05:57:53+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2015-02-06T11:36:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5d59402af8397da1a8eb5f822e1e650ce3285833'/>
<id>5d59402af8397da1a8eb5f822e1e650ce3285833</id>
<content type='text'>
This enables trusted.ec.dirty to be tracked in index

Change-Id: Ief1619110859f6f9ccee3da229f0688b73e2124b
BUG: 1177601
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9602
Reviewed-by: Krutika Dhananjay &lt;kdhananj@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>
This enables trusted.ec.dirty to be tracked in index

Change-Id: Ief1619110859f6f9ccee3da229f0688b73e2124b
BUG: 1177601
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9602
Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>telldir()/seekdir() portability fixes</title>
<updated>2014-12-17T11:48:22+00:00</updated>
<author>
<name>Emmanuel Dreyfus</name>
<email>manu@netbsd.org</email>
</author>
<published>2014-12-17T09:41:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e398f99d9ac7ca5c83004b814a4e8561916187f0'/>
<id>e398f99d9ac7ca5c83004b814a4e8561916187f0</id>
<content type='text'>
POSIX says that an offset obtained from telldir() can only be used
on the same DIR *. Linux is abls to reuse the offset accross
closedir()/opendir() for a given directory, but this is not portable
and such a behavior should be fixed.

An incomplete fix for the posix xlator was merged in
http://review.gluster.com/8926
This change set completes it.

- Perform the same fix index xlator.
- Use appropriate casts and variable types so that 32 bit signed
  offsets obtained by telldir() do not get clobbered when copied into
  64 bit signed types.
- modify glfs-heal.c and afr-self-heald.c so that they do not use
  anonymous fd, since this will cause closedir()/opendir() between
  each syncop_readdir(). On failure we fallback to anonymous fs
  only for Linux so that we can cope with updated client vs not
  updated brick.
- Avoid sending an EINVAL when the client request for the EOF offset.
  Here we fix an error in previous fix for posix xlator: since we
  fill each directory entry with the offset of the next entry, we
  must consider as EOF the offset of the last entry, and not the
  value of telldir() after we read it.
- Add checks in regression tests that we do not hit cases where
  offsets fed to seekdir() are wrong. Introduce log_newer() shell
  function to check for messages produced by the current script.

This fix gather changes from http://review.gluster.org/9047
and http://review.gluster.org/8936 making them obsolete.

BUG: 1129939
Change-Id: I59fb7f06a872c4f98987105792d648141c258c6a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/9071
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Tested-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
POSIX says that an offset obtained from telldir() can only be used
on the same DIR *. Linux is abls to reuse the offset accross
closedir()/opendir() for a given directory, but this is not portable
and such a behavior should be fixed.

An incomplete fix for the posix xlator was merged in
http://review.gluster.com/8926
This change set completes it.

- Perform the same fix index xlator.
- Use appropriate casts and variable types so that 32 bit signed
  offsets obtained by telldir() do not get clobbered when copied into
  64 bit signed types.
- modify glfs-heal.c and afr-self-heald.c so that they do not use
  anonymous fd, since this will cause closedir()/opendir() between
  each syncop_readdir(). On failure we fallback to anonymous fs
  only for Linux so that we can cope with updated client vs not
  updated brick.
- Avoid sending an EINVAL when the client request for the EOF offset.
  Here we fix an error in previous fix for posix xlator: since we
  fill each directory entry with the offset of the next entry, we
  must consider as EOF the offset of the last entry, and not the
  value of telldir() after we read it.
- Add checks in regression tests that we do not hit cases where
  offsets fed to seekdir() are wrong. Introduce log_newer() shell
  function to check for messages produced by the current script.

This fix gather changes from http://review.gluster.org/9047
and http://review.gluster.org/8936 making them obsolete.

BUG: 1129939
Change-Id: I59fb7f06a872c4f98987105792d648141c258c6a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/9071
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Tested-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
