<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/storage/posix/src/posix.c, branch v3.5.4beta1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>storage/posix: Don't try to set gfid in case of INTERNAL-mknod</title>
<updated>2015-02-09T11:50:28+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2015-01-14T11:40:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=10667b43a628af2ce3045126b80763b97fa299e7'/>
<id>10667b43a628af2ce3045126b80763b97fa299e7</id>
<content type='text'>
        Backport of http://review.gluster.org/9446

BUG: 1184528
Change-Id: I4131baf5cf6f6ca6deb5b4f426b34c980a065a9e
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9474
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>
        Backport of http://review.gluster.org/9446

BUG: 1184528
Change-Id: I4131baf5cf6f6ca6deb5b4f426b34c980a065a9e
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9474
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>storage/posix: Set gfid after all xattrs, uid/gid are set</title>
<updated>2015-02-09T11:49:26+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2015-01-12T07:20:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0594edfb3c9e2aa5a199ce1e2722b269636b4d4b'/>
<id>0594edfb3c9e2aa5a199ce1e2722b269636b4d4b</id>
<content type='text'>
        Backport of http://review.gluster.com/9434

Problem:
When a new entry is created gfid is set even before uid/gid, xattrs
are set on the entry. This can lead to dht/afr healing that file/dir
with the uid/gid it sees just after the gfid is set, i.e. root/root.
Sometimes setattr/setxattr are failing on that file/dir.

Fix:
Set gfid of the file/directory only after uid/gid, xattrs are setup
properly. Readdirp, lookup either wait for the gfid to be assigned
to the entry or not update the in-memory inode ctx in posix-acl
xlator which was producing lot EACCESS/EPERM to the application
or dht/afr self-heals.

BUG: 1184528
Change-Id: I66459bbf595746ede6869447fb68a7dd23a38b7f
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9473
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>
        Backport of http://review.gluster.com/9434

Problem:
When a new entry is created gfid is set even before uid/gid, xattrs
are set on the entry. This can lead to dht/afr healing that file/dir
with the uid/gid it sees just after the gfid is set, i.e. root/root.
Sometimes setattr/setxattr are failing on that file/dir.

Fix:
Set gfid of the file/directory only after uid/gid, xattrs are setup
properly. Readdirp, lookup either wait for the gfid to be assigned
to the entry or not update the in-memory inode ctx in posix-acl
xlator which was producing lot EACCESS/EPERM to the application
or dht/afr self-heals.

BUG: 1184528
Change-Id: I66459bbf595746ede6869447fb68a7dd23a38b7f
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9473
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>storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr</title>
<updated>2014-11-13T09:29:10+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2014-11-05T03:34:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=9b590b457210ca45246ee461d845e57932fda84a'/>
<id>9b590b457210ca45246ee461d845e57932fda84a</id>
<content type='text'>
        Backport of http://review.gluster.org/9049

Bulk remove xattr is internal fop in gluster. Some of the xattrs may have
special behavior. Ex: removexattr("posix.system_acl_access"), removes more than
one xattr on the file that could be present in the bulk-removal request.
Removexattr of these deleted xattrs will fail with either ENODATA/ENOATTR.
As all this fop cares is removal of the xattrs in bulk-remove request and
if they are already deleted, it can be treated as success.

BUG: 1162226
Change-Id: I0629b48b854cda923c47bc5f50558bf42c60149b
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9089
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
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>
        Backport of http://review.gluster.org/9049

Bulk remove xattr is internal fop in gluster. Some of the xattrs may have
special behavior. Ex: removexattr("posix.system_acl_access"), removes more than
one xattr on the file that could be present in the bulk-removal request.
Removexattr of these deleted xattrs will fail with either ENODATA/ENOATTR.
As all this fop cares is removal of the xattrs in bulk-remove request and
if they are already deleted, it can be treated as success.

BUG: 1162226
Change-Id: I0629b48b854cda923c47bc5f50558bf42c60149b
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9089
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
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>glusterd/quota: Heal pgfid xattr on existing data when the quota is</title>
<updated>2014-10-20T16:13:34+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2014-09-29T07:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b0ed286e9b53c5ad24f04686cd6ddfad940b87f3'/>
<id>b0ed286e9b53c5ad24f04686cd6ddfad940b87f3</id>
<content type='text'>
enable

        Backport of: http://review.gluster.org/8878

The pgfid extended attributes are used to construct the ancestry path
(from the file to the volume root) for nameless lookups on files.
As NFS relies on nameless lookups heavily, quota enforcement through NFS
would be inconsistent if quota were to be enabled on a volume with
existing data.

Solution is to heal the pgfid extended attributes as a part of lookup
perfomed by quota-crawl process. In a posix lookup check for pgfid xattr
and if it is missing set the xattr.

Change-Id: I956128907aa1d975cd5719ed3ab2f4f9b37d4c31
BUG: 1153900
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8938
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>
enable

        Backport of: http://review.gluster.org/8878

The pgfid extended attributes are used to construct the ancestry path
(from the file to the volume root) for nameless lookups on files.
As NFS relies on nameless lookups heavily, quota enforcement through NFS
would be inconsistent if quota were to be enabled on a volume with
existing data.

Solution is to heal the pgfid extended attributes as a part of lookup
perfomed by quota-crawl process. In a posix lookup check for pgfid xattr
and if it is missing set the xattr.

Change-Id: I956128907aa1d975cd5719ed3ab2f4f9b37d4c31
BUG: 1153900
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8938
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>cluster/dht: Added code to capture races in dht-lookup path</title>
<updated>2014-10-01T10:37:12+00:00</updated>
<author>
<name>Venkatesh Somyajulu</name>
<email>vsomyaju@redhat.com</email>
</author>
<published>2014-09-11T08:48:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0a4119e321be46bf274e1ee4251a15609ad09df7'/>
<id>0a4119e321be46bf274e1ee4251a15609ad09df7</id>
<content type='text'>
Change-Id: I9270d2d40ebd4b113ff961583dfda7754741f15b
BUG: 1129541
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8430
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit bb2d5f49b5684e6484af16a580870cfe104aecd2)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8731
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I9270d2d40ebd4b113ff961583dfda7754741f15b
BUG: 1129541
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8430
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit bb2d5f49b5684e6484af16a580870cfe104aecd2)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8731
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>storage/posix: Don't unlink .glusterfs-hardlink before linkto check</title>
<updated>2014-10-01T10:35:14+00:00</updated>
<author>
<name>Venkatesh Somyajulu</name>
<email>vsomyaju@redhat.com</email>
</author>
<published>2014-09-10T18:08:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=98e8883787dc6943c4a3fc8282f91a8c73fb0803'/>
<id>98e8883787dc6943c4a3fc8282f91a8c73fb0803</id>
<content type='text'>
BUG: 1129541
Change-Id: I90a10ac54123fbd8c7383ddcbd04e8879ae51232
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8559
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit b23be2e7581c6aa295053dc8866cab841ae374b6)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8725
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: 1129541
Change-Id: I90a10ac54123fbd8c7383ddcbd04e8879ae51232
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8559
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit b23be2e7581c6aa295053dc8866cab841ae374b6)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8725
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Modified logic of linkto file deletion on non-hashed</title>
<updated>2014-09-17T15:34:54+00:00</updated>
<author>
<name>Venkatesh Somyajulu</name>
<email>vsomyaju@redhat.com</email>
</author>
<published>2014-09-10T17:22:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e24e812d25f10c008b80d72bc8b1fb2c401bd892'/>
<id>e24e812d25f10c008b80d72bc8b1fb2c401bd892</id>
<content type='text'>
Currently whenever dht_lookup_everywhere gets called, if in
dht_lookup_everywhere_cbk, a linkto file is found on non-hashed
subvolume, file is unlinked. But there are cases when this file
is under migration. Under such condition, we should avoid deletion
of file.

When  some other rebalance process changes the layout of parent
such that dst_file (w.r.t. migration) falls on non-hashed node,
then may be lookup could have found it as linkto file but just
before unlink, file  is under migration or already migrated
In such cased unlink can be avoided.

Race:
-------
If we have two bricks (brick-1 and brick-2) with initial file "a"
under BaseDir which is hashed as well as cached on (brick-1).

Assume "a"  hashing gives 44.

                              Brick-1              Brick-2

Initial Setup:               BaseDir/a             BaseDir
                             [1-50]                [51-100]

Now add new-brick Brick-3.

1. Rebalance-1 on node Node-1 (Brick-1 node) will reset
the BaseDir Layout.

2. After that it will perform
a)  Create linkto file on  new-hashed (brick-2)
b)  Perform file migration.

1.Rebalance-1 Fixes the base-layout:
                 Brick-1             Brick-2           Brick-3
                 ---------         ----------         ------------
                 BaseDir/a            BaseDir           BaseDir
                  [1-33]              [34-66]           [67-100]

2. Only a) is     BaseDir/a          BaseDir/a(linkto)   BaseDir
   performed                         Create linktofile

Now rebalance 2 on node-2 jumped in and it will perform
step 1 and 2-a.

After (rebal-2, step-1), it changes the layout of the BaseDir.
                    BaseDir/a     BaseDir/a(link)    BaseDir
                    [67-100]           [1-33]        [34-66]

For  (rebale-2, step-2), It will perform lookup at Brick-3 as w.r.t new
layout 44 falls for brick-3. But lookup will fail.
So  dht_lookup_everywhere gets called.

NOTE: On brick-2 by rebalance-1, a linkto file was created.

Currently that linkto files gets deleted by rebalance-2 lookup as it
is considered as stale linkto file.  But  with patch if rebalance is
already in progress or rebalance is over,  linkto file will not be
unlinked. If rebalance is in progress fd will be  open and if rebalance
is over then linkto file wont be set.

Change-Id: I3fee0d28de3c76197325536a9e30099d2413f079
BUG: 1129541
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8345
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 966997992bdbd5fffc632bf705678e287ed50bf7)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8719
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently whenever dht_lookup_everywhere gets called, if in
dht_lookup_everywhere_cbk, a linkto file is found on non-hashed
subvolume, file is unlinked. But there are cases when this file
is under migration. Under such condition, we should avoid deletion
of file.

When  some other rebalance process changes the layout of parent
such that dst_file (w.r.t. migration) falls on non-hashed node,
then may be lookup could have found it as linkto file but just
before unlink, file  is under migration or already migrated
In such cased unlink can be avoided.

Race:
-------
If we have two bricks (brick-1 and brick-2) with initial file "a"
under BaseDir which is hashed as well as cached on (brick-1).

Assume "a"  hashing gives 44.

                              Brick-1              Brick-2

Initial Setup:               BaseDir/a             BaseDir
                             [1-50]                [51-100]

Now add new-brick Brick-3.

1. Rebalance-1 on node Node-1 (Brick-1 node) will reset
the BaseDir Layout.

2. After that it will perform
a)  Create linkto file on  new-hashed (brick-2)
b)  Perform file migration.

1.Rebalance-1 Fixes the base-layout:
                 Brick-1             Brick-2           Brick-3
                 ---------         ----------         ------------
                 BaseDir/a            BaseDir           BaseDir
                  [1-33]              [34-66]           [67-100]

2. Only a) is     BaseDir/a          BaseDir/a(linkto)   BaseDir
   performed                         Create linktofile

Now rebalance 2 on node-2 jumped in and it will perform
step 1 and 2-a.

After (rebal-2, step-1), it changes the layout of the BaseDir.
                    BaseDir/a     BaseDir/a(link)    BaseDir
                    [67-100]           [1-33]        [34-66]

For  (rebale-2, step-2), It will perform lookup at Brick-3 as w.r.t new
layout 44 falls for brick-3. But lookup will fail.
So  dht_lookup_everywhere gets called.

NOTE: On brick-2 by rebalance-1, a linkto file was created.

Currently that linkto files gets deleted by rebalance-2 lookup as it
is considered as stale linkto file.  But  with patch if rebalance is
already in progress or rebalance is over,  linkto file will not be
unlinked. If rebalance is in progress fd will be  open and if rebalance
is over then linkto file wont be set.

Change-Id: I3fee0d28de3c76197325536a9e30099d2413f079
BUG: 1129541
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8345
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 966997992bdbd5fffc632bf705678e287ed50bf7)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8719
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Fix races to avoid deletion of linkto file</title>
<updated>2014-09-17T15:34:33+00:00</updated>
<author>
<name>Venkatesh Somyajulu</name>
<email>vsomyaju@redhat.com</email>
</author>
<published>2014-09-10T16:48:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=3f3e57cef2cd11f336a6d6496de37c89a3e90789'/>
<id>3f3e57cef2cd11f336a6d6496de37c89a3e90789</id>
<content type='text'>
Explanation of Race between rebalance processes:
https://bugzilla.redhat.com/show_bug.cgi?id=1110694#c4

STATE 1:                          BRICK-1
only one brick                   Cached File
in the system

STATE 2:
Add brick-2                       BRICK-1                BRICK-2

STATE 3:                                       Lookup of File on brick-2
                                               by this node's rebalance
                                               will fail because hashed
                                               file is not created yet.
                                               So dht_lookup_everywhere is
                                               about to get called.

STATE 4:                         As part of lookup
                                 link file at brick-2
                                 will be created.

STATE 5:                         getxattr to check that
                                 cached file belongs to
                                 this node is done

STATE 6:

                                            dht_lookup_everywhere_cbk detects
                                            the link created by rebalance-1.
                                            It will unlink it.

STATE 7:                        getxattr at the link
                                file with "pathinfo" key
                                will be called will fail
                                as the link file is deleted
                                by rebalance on node-2

Fix:
So in the STATE 6, we should avoid the deletion of link file. Every time
dht_lookup_everywhere gets called, lookup will be performed on all the nodes.
So to avoid STATE 6, if linkto file is found, it is not deleted until valid
case is found in dht_lookup_everywhere_done.

Case 1: if linkto file points to cached node, and cached file exists,
        uwind with success.

Case 2: if linkto does not point to current cached node, and cached file
        exists:
        a) Unlink stale link file
        b) Create new link file

Case 3: Only linkto file exists:
        Delete linkto file

Case 4: Only cached file
        Create link file (Handled event without patch)

Case 5: Neither cached nor hashed file is present
        Return with ENOENT (handled even without patch)

Change-Id: Ibf53671410d8d613b8e2e7e5d0ec30fc7dcc0298
BUG: 1129541
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8231
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Tested-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 74d92e322e3c9f4f70ddfbf9b0e2140922009658)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8717
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>
Explanation of Race between rebalance processes:
https://bugzilla.redhat.com/show_bug.cgi?id=1110694#c4

STATE 1:                          BRICK-1
only one brick                   Cached File
in the system

STATE 2:
Add brick-2                       BRICK-1                BRICK-2

STATE 3:                                       Lookup of File on brick-2
                                               by this node's rebalance
                                               will fail because hashed
                                               file is not created yet.
                                               So dht_lookup_everywhere is
                                               about to get called.

STATE 4:                         As part of lookup
                                 link file at brick-2
                                 will be created.

STATE 5:                         getxattr to check that
                                 cached file belongs to
                                 this node is done

STATE 6:

                                            dht_lookup_everywhere_cbk detects
                                            the link created by rebalance-1.
                                            It will unlink it.

STATE 7:                        getxattr at the link
                                file with "pathinfo" key
                                will be called will fail
                                as the link file is deleted
                                by rebalance on node-2

Fix:
So in the STATE 6, we should avoid the deletion of link file. Every time
dht_lookup_everywhere gets called, lookup will be performed on all the nodes.
So to avoid STATE 6, if linkto file is found, it is not deleted until valid
case is found in dht_lookup_everywhere_done.

Case 1: if linkto file points to cached node, and cached file exists,
        uwind with success.

Case 2: if linkto does not point to current cached node, and cached file
        exists:
        a) Unlink stale link file
        b) Create new link file

Case 3: Only linkto file exists:
        Delete linkto file

Case 4: Only cached file
        Create link file (Handled event without patch)

Case 5: Neither cached nor hashed file is present
        Return with ENOENT (handled even without patch)

Change-Id: Ibf53671410d8d613b8e2e7e5d0ec30fc7dcc0298
BUG: 1129541
Signed-off-by: Venkatesh Somyajulu &lt;vsomyaju@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8231
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Tested-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 74d92e322e3c9f4f70ddfbf9b0e2140922009658)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8717
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>storage/posix: removing deleting entries in case of creation failures</title>
<updated>2014-09-17T15:34:17+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2014-09-10T16:10:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c0cc62c144c560dcbfe9c89a139f51fd5274e33f'/>
<id>c0cc62c144c560dcbfe9c89a139f51fd5274e33f</id>
<content type='text'>
The code is not atomic enough to not to delete a dentry created by a
prallel dentry creation operation.

Change-Id: I9bd6d2aa9e7a1c0688c0a937b02a4b4f56d7aa3d
BUG: 1129527
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8327
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 45fbf99cb669e891a84a8228cef27973f5e774bf)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8716
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code is not atomic enough to not to delete a dentry created by a
prallel dentry creation operation.

Change-Id: I9bd6d2aa9e7a1c0688c0a937b02a4b4f56d7aa3d
BUG: 1129527
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8327
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 45fbf99cb669e891a84a8228cef27973f5e774bf)
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8716
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/server: send ENOENT instead of ESTALE for older clients</title>
<updated>2014-06-20T09:45:54+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2014-06-14T06:08:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=239a1dfca881d155811a170587fb00342765670f'/>
<id>239a1dfca881d155811a170587fb00342765670f</id>
<content type='text'>
Modify protocol/server and storage/posix to send ENOENT to older clients
instead of ESTALE

http://goo.gl/t83hmL

Change-Id: Ie63e91e73e33769ce9dc3d964938cfd6eb4c4be5
BUG: 1109832
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8080
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
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>
Modify protocol/server and storage/posix to send ENOENT to older clients
instead of ESTALE

http://goo.gl/t83hmL

Change-Id: Ie63e91e73e33769ce9dc3d964938cfd6eb4c4be5
BUG: 1109832
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8080
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
