<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/storage, branch v3.5.6</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>build: drop incorrect usage of 'inline'</title>
<updated>2015-07-23T14:33:03+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2015-07-17T10:09:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8f2c7e67a8fa9cbf9f3b62ab0de930d921e3d362'/>
<id>8f2c7e67a8fa9cbf9f3b62ab0de930d921e3d362</id>
<content type='text'>
Newer versions of gcc complain loudly about the incorrect usage of
'inline'.

These changes have been part of commit a3cb38e3 in other branches. There
is no need to backport everything from that commit, but silencing the
warnings would be good.

Change-Id: I2319d9682b47e8533e9c179056a5152f75aeddc3
BUG: 1244147
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11711
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Newer versions of gcc complain loudly about the incorrect usage of
'inline'.

These changes have been part of commit a3cb38e3 in other branches. There
is no need to backport everything from that commit, but silencing the
warnings would be good.

Change-Id: I2319d9682b47e8533e9c179056a5152f75aeddc3
BUG: 1244147
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11711
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: handle failure from posix_resolve</title>
<updated>2015-06-28T19:51:01+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-04-30T10:56:03+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=734f68f4116fd32066aa49cda93707b02ba194cf'/>
<id>734f68f4116fd32066aa49cda93707b02ba194cf</id>
<content type='text'>
This is backport of http://review.gluster.org/#/c/9941/

&gt; When building ancestory, posix_resolve gets the inode
&gt; from the gfid. We need to handle the failure case from
&gt; this function
&gt;
&gt; Change-Id: I19f0f0c739686b1b0ef96309212aa1c7911b3589
&gt; BUG: 1203629
&gt; Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/9941
&gt; Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
&gt; Tested-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;

Change-Id: If3f9a910be3d08293199748c9e04b3be2d8633c7
BUG: 1217432
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10471
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>
This is backport of http://review.gluster.org/#/c/9941/

&gt; When building ancestory, posix_resolve gets the inode
&gt; from the gfid. We need to handle the failure case from
&gt; this function
&gt;
&gt; Change-Id: I19f0f0c739686b1b0ef96309212aa1c7911b3589
&gt; BUG: 1203629
&gt; Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/9941
&gt; Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
&gt; Tested-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;

Change-Id: If3f9a910be3d08293199748c9e04b3be2d8633c7
BUG: 1217432
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10471
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: 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://dev.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://dev.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://dev.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>Posix: Brick failure detection fix for ext4 filesystem</title>
<updated>2014-10-28T16:33:48+00:00</updated>
<author>
<name>Lalatendu Mohanty</name>
<email>lmohanty@redhat.com</email>
</author>
<published>2014-10-28T11:57:25+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d8c40d37a5850bf1021288c91d75a66c494c9c98'/>
<id>d8c40d37a5850bf1021288c91d75a66c494c9c98</id>
<content type='text'>
Issue: stat() on XFS has a check for the filesystem status but
ext4 does not.

Fix: Replacing stat() call with open, write and read  to a new file under the
"brick/.glusterfs" directory. This change will work for xfs, ext4 and other
fileystems.

Change-Id: Id03c4bc07df4ee22916a293442bd74819b051839
BUG: 1130204
"Signed-off-by: Lalatendu Mohanty &lt;lmohanty@redhat.com&gt;"
"Reviewed-on: http://review.gluster.org/8213"
"Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;"
"Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;"
(cherry picked from commit a7ef6eea4d43afdba9d0453c095e71e6bf22cdb7)
Signed-off-by: Lalatendu Mohanty &lt;lmohanty@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8989
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>
Issue: stat() on XFS has a check for the filesystem status but
ext4 does not.

Fix: Replacing stat() call with open, write and read  to a new file under the
"brick/.glusterfs" directory. This change will work for xfs, ext4 and other
fileystems.

Change-Id: Id03c4bc07df4ee22916a293442bd74819b051839
BUG: 1130204
"Signed-off-by: Lalatendu Mohanty &lt;lmohanty@redhat.com&gt;"
"Reviewed-on: http://review.gluster.org/8213"
"Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;"
"Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;"
(cherry picked from commit a7ef6eea4d43afdba9d0453c095e71e6bf22cdb7)
Signed-off-by: Lalatendu Mohanty &lt;lmohanty@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8989
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://dev.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://dev.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://dev.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://dev.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>
</feed>
