<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/cluster/dht/src, branch v3.8.11</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>cluster/dht: Modify local-&gt;loc.gfid in thread safe manner</title>
<updated>2017-04-07T12:08:00+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2017-03-30T09:28:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a01d6f460c09c67f647aa529fc38a229e8461d4e'/>
<id>a01d6f460c09c67f647aa529fc38a229e8461d4e</id>
<content type='text'>
	Backport of https://review.gluster.org/16986

Problem:
local-&gt;loc.gfid in dht_lookup_directory() will be null-gfid for a fresh lookup.
dht_lookup_dir_cbk() updates local-&gt;loc.gfid while in other thread dht_lookup_directory()
is still winding lookup calls to subvolumes so there is a chance of partial gfid being
seen by EC.

We saw in 12x(4+2) volume, ec is receiving an loc where the gfid has last 10 bytes matching
with the gfid of the directory and the first 4 bytes are all-zeros. This is leading to EC
erroring out the lookup with EINVAL which leads to NFS failing lookup with EIO.

snip from gdb:
$37 = (dht_local_t *) 0x7fde5de5b3cc
(gdb) p /x $37-&gt;loc.gfid
$39 = {0x3b, 0x82, 0x10, 0x5e, 0x40, 0x65, 0x43, 0x14, 0xa0, 0xc6, 0x8, 0xf5,
0x6c, 0x2c, 0xb8, 0x56}
(gdb) fr 7
state=&lt;optimized out&gt;) at ec-generic.c:837
837	                ec_lookup_rebuild(fop-&gt;xl-&gt;private, fop, cbk);
(gdb) p /x fop-&gt;loc[0].gfid
$40 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x43, 0x14, 0xa0, 0xc6, 0x8, 0xf5, 0x6c,
0x2c, 0xb8, 0x56}

snip from log:
[2017-01-29 03:22:30.132328] W [MSGID: 122019]
[ec-helpers.c:354:ec_loc_gfid_check] 0-butcher-disperse-4: Mismatching GFID's
in loc [2017-01-29 03:22:30.132709] W [MSGID: 112199]
[nfs3-helpers.c:3515:nfs3_log_newfh_res] 0-nfs-nfsv3:
/linux-4.9.5/Documentation =&gt; (XID: b27b9474, MKDIR: NFS: 5(I/O error), POSIX:
5(Input/output error)), FH: exportid 00000000-0000-0000-0000-000000000000, gfid
00000000-0000-0000-0000-000000000000, mountid
00000000-0000-0000-0000-000000000000 [Invalid argument]

Fix:
update local-&gt;loc.gfid in last-call to make sure there are no races.

 &gt;BUG: 1438411
 &gt;Change-Id: Ifcb7e911568c1f1f83123da6ff0cf742b91800a0
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;

BUG: 1438424
Change-Id: If039956205cfac5e798c2c90e92a9a47b404e804
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16988
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Backport of https://review.gluster.org/16986

Problem:
local-&gt;loc.gfid in dht_lookup_directory() will be null-gfid for a fresh lookup.
dht_lookup_dir_cbk() updates local-&gt;loc.gfid while in other thread dht_lookup_directory()
is still winding lookup calls to subvolumes so there is a chance of partial gfid being
seen by EC.

We saw in 12x(4+2) volume, ec is receiving an loc where the gfid has last 10 bytes matching
with the gfid of the directory and the first 4 bytes are all-zeros. This is leading to EC
erroring out the lookup with EINVAL which leads to NFS failing lookup with EIO.

snip from gdb:
$37 = (dht_local_t *) 0x7fde5de5b3cc
(gdb) p /x $37-&gt;loc.gfid
$39 = {0x3b, 0x82, 0x10, 0x5e, 0x40, 0x65, 0x43, 0x14, 0xa0, 0xc6, 0x8, 0xf5,
0x6c, 0x2c, 0xb8, 0x56}
(gdb) fr 7
state=&lt;optimized out&gt;) at ec-generic.c:837
837	                ec_lookup_rebuild(fop-&gt;xl-&gt;private, fop, cbk);
(gdb) p /x fop-&gt;loc[0].gfid
$40 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x43, 0x14, 0xa0, 0xc6, 0x8, 0xf5, 0x6c,
0x2c, 0xb8, 0x56}

snip from log:
[2017-01-29 03:22:30.132328] W [MSGID: 122019]
[ec-helpers.c:354:ec_loc_gfid_check] 0-butcher-disperse-4: Mismatching GFID's
in loc [2017-01-29 03:22:30.132709] W [MSGID: 112199]
[nfs3-helpers.c:3515:nfs3_log_newfh_res] 0-nfs-nfsv3:
/linux-4.9.5/Documentation =&gt; (XID: b27b9474, MKDIR: NFS: 5(I/O error), POSIX:
5(Input/output error)), FH: exportid 00000000-0000-0000-0000-000000000000, gfid
00000000-0000-0000-0000-000000000000, mountid
00000000-0000-0000-0000-000000000000 [Invalid argument]

Fix:
update local-&gt;loc.gfid in last-call to make sure there are no races.

 &gt;BUG: 1438411
 &gt;Change-Id: Ifcb7e911568c1f1f83123da6ff0cf742b91800a0
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;

BUG: 1438424
Change-Id: If039956205cfac5e798c2c90e92a9a47b404e804
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16988
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Fix crash in "nuke-dir" feature</title>
<updated>2017-03-10T23:00:58+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2017-03-02T09:57:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=2b65e69bf7adcd6176c24ef1439bd06aa445deae'/>
<id>2b65e69bf7adcd6176c24ef1439bd06aa445deae</id>
<content type='text'>
        Backport of: https://review.gluster.org/16829

My patch at https://review.gluster.org/16419 is resulting
in core dumps everytime I run tests/features/nuke.t.

Turns out dht, upon successfully "nuking" a directory,
which was initiated through a setxattr, unwinds the operation
with rmdir fop signature, resulting in readdir-ahead casting
a struct iatt (preparent) to dict_t, leading to a crash.

Change-Id: Ib970b3198185a6c641092b00e115a672cb3f9111
BUG: 1428743
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16840
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&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: https://review.gluster.org/16829

My patch at https://review.gluster.org/16419 is resulting
in core dumps everytime I run tests/features/nuke.t.

Turns out dht, upon successfully "nuking" a directory,
which was initiated through a setxattr, unwinds the operation
with rmdir fop signature, resulting in readdir-ahead casting
a struct iatt (preparent) to dict_t, leading to a crash.

Change-Id: Ib970b3198185a6c641092b00e115a672cb3f9111
BUG: 1428743
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16840
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht Fix error assignment in dht_*xattr2 functions</title>
<updated>2017-03-10T22:42:42+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2017-02-13T11:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f4ad9c9eb7f062198189801ddc8cfd958bb413d9'/>
<id>f4ad9c9eb7f062198189801ddc8cfd958bb413d9</id>
<content type='text'>
Corrected the op_errno assignments and NULL checks in
the dht_sexattr2 and dht_removexattr2 functions. Earlier,
they unwound with the default EINVAL op_errno if the
file had been deleted.

&gt; Change-Id: Iaf837a473d769cea40132487a966c7f452990071
&gt; BUG: 1421653
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/16610
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: MOHIT AGRAWAL &lt;moagrawa@redhat.com&gt;
&gt; Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
(cherry picked from commit 028626a86ea409f908783b9007c02877f20be43e)
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: Id2e91df47bcd734dda18700fb075608c1627a608
BUG: 1424915
Reviewed-on: https://review.gluster.org/16678
Tested-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Corrected the op_errno assignments and NULL checks in
the dht_sexattr2 and dht_removexattr2 functions. Earlier,
they unwound with the default EINVAL op_errno if the
file had been deleted.

&gt; Change-Id: Iaf837a473d769cea40132487a966c7f452990071
&gt; BUG: 1421653
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/16610
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: MOHIT AGRAWAL &lt;moagrawa@redhat.com&gt;
&gt; Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
(cherry picked from commit 028626a86ea409f908783b9007c02877f20be43e)
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: Id2e91df47bcd734dda18700fb075608c1627a608
BUG: 1424915
Reviewed-on: https://review.gluster.org/16678
Tested-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Don't update layout in rebalance_task_completion</title>
<updated>2017-02-13T08:32:11+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2017-01-23T16:49:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=301f1a2f7762ee40dedf5a09a394f1f5670f6d60'/>
<id>301f1a2f7762ee40dedf5a09a394f1f5670f6d60</id>
<content type='text'>
Updating the layout in the dht inode_ctx in
rebalance_task_completion after the file is migrated
is erroneous in case of files with hardlinks.
This step can be skipped as the layout will be set
in the syncop_lookup call post the migration in
dht_migrate_file.

&gt; Change-Id: I24ac798a919585d91a117d6a207e6a31b88486c6
&gt; BUG: 1415761
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/16457
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; Reviewed-by: Susant Palai &lt;spalai@redhat.com&gt;
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: Ifccffd67b8bc12208efb23101366a1ac7a8c60f5
BUG: 1420184
Reviewed-on: https://review.gluster.org/16561
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: N Balachandran &lt;nbalacha@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Susant Palai &lt;spalai@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updating the layout in the dht inode_ctx in
rebalance_task_completion after the file is migrated
is erroneous in case of files with hardlinks.
This step can be skipped as the layout will be set
in the syncop_lookup call post the migration in
dht_migrate_file.

&gt; Change-Id: I24ac798a919585d91a117d6a207e6a31b88486c6
&gt; BUG: 1415761
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/16457
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; Reviewed-by: Susant Palai &lt;spalai@redhat.com&gt;
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: Ifccffd67b8bc12208efb23101366a1ac7a8c60f5
BUG: 1420184
Reviewed-on: https://review.gluster.org/16561
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: N Balachandran &lt;nbalacha@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Susant Palai &lt;spalai@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Incorrect migration checks in fsync</title>
<updated>2017-01-23T04:15:17+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2017-01-06T15:36:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b21c51e6f0baa5145923637f54e79d221ca59cff'/>
<id>b21c51e6f0baa5145923637f54e79d221ca59cff</id>
<content type='text'>
Fixed the order of the migration phase checks
in dht_fsync_cbk. Phase1 should never be hit if op_ret
is non zero.

&gt; Change-Id: I9222692e04868bffa93498059440f0aa553c83ec
&gt; BUG: 1410777
&gt; Reviewed-on: http://review.gluster.org/16350
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
&gt; Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit 83117c71482c9f87a0b6812094cbb22497eb3faa)

Change-Id: I0455871aef230371db5ecb1b2e6b1468e8a6d079
BUG: 1412119
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16374
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed the order of the migration phase checks
in dht_fsync_cbk. Phase1 should never be hit if op_ret
is non zero.

&gt; Change-Id: I9222692e04868bffa93498059440f0aa553c83ec
&gt; BUG: 1410777
&gt; Reviewed-on: http://review.gluster.org/16350
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
&gt; Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit 83117c71482c9f87a0b6812094cbb22497eb3faa)

Change-Id: I0455871aef230371db5ecb1b2e6b1468e8a6d079
BUG: 1412119
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16374
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Do rename cleanup as root</title>
<updated>2017-01-18T04:03:30+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2017-01-03T07:20:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5ff6af5c5955bc885925c15e34c9bc0862168c02'/>
<id>5ff6af5c5955bc885925c15e34c9bc0862168c02</id>
<content type='text'>
Problem:
Rename linkfile cleanup is done as non-root which may not have priviliges to do
the rename so it fails with EACCESS. MKDIR on that name in future will start to
hole on this subvolume. It is not easy to hit on fuse mounts because vfs takes
care of the permission checks even before rename fop is wound. But with
nfs-ganesha mounts it happens.

Fix:
Do rename cleanup as root

 &gt;BUG: 1409727
 &gt;Change-Id: I414c1eb6dce76b4516a6c940557b249e6c3f22f4
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/16317
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
 &gt;Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;

BUG: 1412913
Change-Id: I7f891034150d7a0e3210202fb0788040c91e1c09
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16390
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Rename linkfile cleanup is done as non-root which may not have priviliges to do
the rename so it fails with EACCESS. MKDIR on that name in future will start to
hole on this subvolume. It is not easy to hit on fuse mounts because vfs takes
care of the permission checks even before rename fop is wound. But with
nfs-ganesha mounts it happens.

Fix:
Do rename cleanup as root

 &gt;BUG: 1409727
 &gt;Change-Id: I414c1eb6dce76b4516a6c940557b249e6c3f22f4
 &gt;Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/16317
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
 &gt;Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;

BUG: 1412913
Change-Id: I7f891034150d7a0e3210202fb0788040c91e1c09
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16390
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht/rebalance: remove errno check for failure detection</title>
<updated>2017-01-08T11:03:50+00:00</updated>
<author>
<name>Susant Palai</name>
<email>spalai@redhat.com</email>
</author>
<published>2017-01-05T06:16:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e509aebc2d6aacd25d9b7530c8722c3475eea055'/>
<id>e509aebc2d6aacd25d9b7530c8722c3475eea055</id>
<content type='text'>
&gt; BUG: 1410355
&gt; Change-Id: I867419ca36a81ef7209e6911a46c1c2c898b8eab
&gt; Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/16328
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit 451ca272d12f2d49522c845d53585520f71525f8)

Change-Id: If05094346fc1fc48f4982db6a195740171ae2fad
BUG: 1410764
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16348
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&gt; BUG: 1410355
&gt; Change-Id: I867419ca36a81ef7209e6911a46c1c2c898b8eab
&gt; Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/16328
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit 451ca272d12f2d49522c845d53585520f71525f8)

Change-Id: If05094346fc1fc48f4982db6a195740171ae2fad
BUG: 1410764
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16348
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Fix dict_leak in migration check tasks</title>
<updated>2017-01-08T10:53:49+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2016-12-30T05:03:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8e67e8a74a9a64844cc7ffc0528771fca3321965'/>
<id>8e67e8a74a9a64844cc7ffc0528771fca3321965</id>
<content type='text'>
Fixed a memleak where dict was not being unrefed
in the dht_migration_complete_check_task and
dht_rebalance_inprogress_task functions.

BUG: 1410369
&gt; Change-Id: I3d42e9a2e5c8596c985bf6431a68fd3905227383
&gt; BUG: 1409186
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/16308
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: MOHIT AGRAWAL &lt;moagrawa@redhat.com&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
&gt; (cherry picked from commit 11b6a2c9fc5232b58774cab29873406c0fbfef19)

Change-Id: I4e92e4c87b52f6f5ffb859005aa3d525225b4bda
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16331
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed a memleak where dict was not being unrefed
in the dht_migration_complete_check_task and
dht_rebalance_inprogress_task functions.

BUG: 1410369
&gt; Change-Id: I3d42e9a2e5c8596c985bf6431a68fd3905227383
&gt; BUG: 1409186
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/16308
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: MOHIT AGRAWAL &lt;moagrawa@redhat.com&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
&gt; (cherry picked from commit 11b6a2c9fc5232b58774cab29873406c0fbfef19)

Change-Id: I4e92e4c87b52f6f5ffb859005aa3d525225b4bda
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16331
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Fix memory corruption while accessing regex stored in</title>
<updated>2017-01-04T03:41:24+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2016-11-08T06:39:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=2b34adff73897ff6086b640fe7f7c592a9ed54b7'/>
<id>2b34adff73897ff6086b640fe7f7c592a9ed54b7</id>
<content type='text'>
private

If reconfigure is executed parallely (or concurrently with dht_init),
there are races that can corrupt memory. One such race is modification
of regexes stored in conf (conf-&gt;rsync_regex_valid and
conf-&gt;extra_regex_valid) through dht_init_regex. With change [1],
reconfigure codepath can get executed parallely (with itself or with
dht_init) and this fix is needed.

Also, a reconfigure can race with any thread doing dht_layout_search,
resulting in dht_layout_search accessing regex freed up by reconfigure
(like in bz 1399134).

[1] http://review.gluster.org/15046

&gt;Change-Id: I039422a65374cf0ccbe0073441f0e8c442ebf830
&gt;BUG: 1399134
&gt;Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt;Reviewed-on: http://review.gluster.org/15945
&gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;

Change-Id: I039422a65374cf0ccbe0073441f0e8c442ebf830
BUG: 1399423
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit 64451d0f25e7cc7aafc1b6589122648281e4310a)
Reviewed-on: http://review.gluster.org/15793
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
private

If reconfigure is executed parallely (or concurrently with dht_init),
there are races that can corrupt memory. One such race is modification
of regexes stored in conf (conf-&gt;rsync_regex_valid and
conf-&gt;extra_regex_valid) through dht_init_regex. With change [1],
reconfigure codepath can get executed parallely (with itself or with
dht_init) and this fix is needed.

Also, a reconfigure can race with any thread doing dht_layout_search,
resulting in dht_layout_search accessing regex freed up by reconfigure
(like in bz 1399134).

[1] http://review.gluster.org/15046

&gt;Change-Id: I039422a65374cf0ccbe0073441f0e8c442ebf830
&gt;BUG: 1399134
&gt;Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt;Reviewed-on: http://review.gluster.org/15945
&gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;

Change-Id: I039422a65374cf0ccbe0073441f0e8c442ebf830
BUG: 1399423
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit 64451d0f25e7cc7aafc1b6589122648281e4310a)
Reviewed-on: http://review.gluster.org/15793
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht/rename : Incase of failure remove linkto file properly</title>
<updated>2017-01-02T13:07:25+00:00</updated>
<author>
<name>Jiffin Tony Thottan</name>
<email>jthottan@redhat.com</email>
</author>
<published>2016-11-21T12:38:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=aaf2a2897080754aceb42245e92b0269556d6f38'/>
<id>aaf2a2897080754aceb42245e92b0269556d6f38</id>
<content type='text'>
Generally linkto file is created using root user. Consider following
case, a user is trying to rename a file which he is not permitted.
So the rename fails with EACESS and when rename tries to cleanup the
linkto file, it fails.

The above issue happens when rename/00.t test executed on nfs-ganesha
clients :
Steps executed in script
* create a file "abc" using root
* rename the file "abc" to "xyz" using a non root user, it fails with EACESS
* delete "abc"
* create directory "abc" using root
* again try ot rename "abc" to "xyz" using non root user, test hungs here
which slowly leds to OOM kill of ganesha process

RCA put forwarded by Du for OOM kill of ganesha
Note that when we hit this bug, we've a scenario of a dentry being
present as:
    * a linkto file on one subvol
    * a directory on rest of subvols

When a lookup happens on the dentry in such a scenario, the control flow
goes into an infinite loop of:

    dht_lookup_everywhere
    dht_lookup_everywhere_cbk
    dht_lookup_unlink_cbk
    dht_lookup_everywhere_done
    dht_lookup_directory (as local-&gt;dir_count &gt; 0)
    dht_lookup_dir_cbk (sets to local-&gt;need_selfheal = 1 as the entry is a linkto file on one of the subvol)
    dht_lookup_everywhere (as need_selfheal = 1).

This infinite loop can cause increased consumption of memory due to:
1) dht_lookup_directory assigns a new layout to local-&gt;layout unconditionally
2)  Most of the functions in this loop do a stack_wind of various fops.

This results in growing of call stack (note that call-stack is destroyed only after lookup response is
received by fuse - which never happens in this case)

Thanks Du for root causing the oom kill and Sushant for suggesting the fix

Upstream reference :
&gt;Change-Id: I1e16bc14aa685542afbd21188426ecb61fd2689d
&gt;BUG: 1397052
&gt;Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
&gt;Reviewed-on: http://review.gluster.org/15894
&gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt;(cherry picked from commit 57d59f4be205ae0c7888758366dc0049bdcfe449)

Change-Id: I1e16bc14aa685542afbd21188426ecb61fd2689d
BUG: 1401029
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16015
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generally linkto file is created using root user. Consider following
case, a user is trying to rename a file which he is not permitted.
So the rename fails with EACESS and when rename tries to cleanup the
linkto file, it fails.

The above issue happens when rename/00.t test executed on nfs-ganesha
clients :
Steps executed in script
* create a file "abc" using root
* rename the file "abc" to "xyz" using a non root user, it fails with EACESS
* delete "abc"
* create directory "abc" using root
* again try ot rename "abc" to "xyz" using non root user, test hungs here
which slowly leds to OOM kill of ganesha process

RCA put forwarded by Du for OOM kill of ganesha
Note that when we hit this bug, we've a scenario of a dentry being
present as:
    * a linkto file on one subvol
    * a directory on rest of subvols

When a lookup happens on the dentry in such a scenario, the control flow
goes into an infinite loop of:

    dht_lookup_everywhere
    dht_lookup_everywhere_cbk
    dht_lookup_unlink_cbk
    dht_lookup_everywhere_done
    dht_lookup_directory (as local-&gt;dir_count &gt; 0)
    dht_lookup_dir_cbk (sets to local-&gt;need_selfheal = 1 as the entry is a linkto file on one of the subvol)
    dht_lookup_everywhere (as need_selfheal = 1).

This infinite loop can cause increased consumption of memory due to:
1) dht_lookup_directory assigns a new layout to local-&gt;layout unconditionally
2)  Most of the functions in this loop do a stack_wind of various fops.

This results in growing of call stack (note that call-stack is destroyed only after lookup response is
received by fuse - which never happens in this case)

Thanks Du for root causing the oom kill and Sushant for suggesting the fix

Upstream reference :
&gt;Change-Id: I1e16bc14aa685542afbd21188426ecb61fd2689d
&gt;BUG: 1397052
&gt;Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
&gt;Reviewed-on: http://review.gluster.org/15894
&gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt;Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt;(cherry picked from commit 57d59f4be205ae0c7888758366dc0049bdcfe449)

Change-Id: I1e16bc14aa685542afbd21188426ecb61fd2689d
BUG: 1401029
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16015
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
