<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/cluster/dht/src/dht-common.c, branch v3.12.7</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>cluster/dht: Handle single dht child in dht_lookup</title>
<updated>2018-03-05T04:53:14+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-02-19T04:14:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=311d8fa104d27523439d6b2048a403e058f8f0ae'/>
<id>311d8fa104d27523439d6b2048a403e058f8f0ae</id>
<content type='text'>
This patch limits itself to only handling the case
where no file (data or linkto) exists on the subvol.

Additional cases to be handled:
1. A linkto file was found on the only child subvol. This currently
calls dht_lookup_everywhere which eventually deletes it. It can be
deleted directly as it will not be pointing to a valid subvol.
2. Directory lookups - locking might be unnecessary in some cases.

&gt; Change-Id: I940ba34531f2aaee1d36fd9ca45ecfd46be662a4
&gt; BUG: 1546620
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I940ba34531f2aaee1d36fd9ca45ecfd46be662a4
BUG: 1548270
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch limits itself to only handling the case
where no file (data or linkto) exists on the subvol.

Additional cases to be handled:
1. A linkto file was found on the only child subvol. This currently
calls dht_lookup_everywhere which eventually deletes it. It can be
deleted directly as it will not be pointing to a valid subvol.
2. Directory lookups - locking might be unnecessary in some cases.

&gt; Change-Id: I940ba34531f2aaee1d36fd9ca45ecfd46be662a4
&gt; BUG: 1546620
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I940ba34531f2aaee1d36fd9ca45ecfd46be662a4
BUG: 1548270
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Skip '..' for the volume root dir</title>
<updated>2018-02-12T10:12:05+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-01-23T09:33:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=51a3faf3f1c5b5eeb6572d8f9bec074fe3f6ade2'/>
<id>51a3faf3f1c5b5eeb6572d8f9bec074fe3f6ade2</id>
<content type='text'>
dht_populate_inode_for_dentry tries to update the layout
for the '..' entry when listing the root of the volume.
This entry does not correspond to an entry in the volume
and therefore does not have a gfid or a layout on disk,
causing layout processing to fail.

&gt; Change-Id: I2b7470e1c5e20d87b5545160697f24d041045140
&gt; BUG: 1537457
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I2b7470e1c5e20d87b5545160697f24d041045140
BUG: 1539516
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dht_populate_inode_for_dentry tries to update the layout
for the '..' entry when listing the root of the volume.
This entry does not correspond to an entry in the volume
and therefore does not have a gfid or a layout on disk,
causing layout processing to fail.

&gt; Change-Id: I2b7470e1c5e20d87b5545160697f24d041045140
&gt; BUG: 1537457
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I2b7470e1c5e20d87b5545160697f24d041045140
BUG: 1539516
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Unlink linkto files as root</title>
<updated>2018-02-08T04:30:08+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-02-06T09:50:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b0544a8f7257660e9c9a24284f262a5a384ee6cd'/>
<id>b0544a8f7257660e9c9a24284f262a5a384ee6cd</id>
<content type='text'>
Non-privileged users cannot delete linkto
files. However the failure to unlink a stale linkto
causes DHT to fail the lookup with EIO and hence
prevent access to the file.

&gt; Change-Id: Id295362d41e52263790694602f36f1219f0646a2
&gt; BUG: 1542318
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: Id295362d41e52263790694602f36f1219f0646a2
BUG: 1543016
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Non-privileged users cannot delete linkto
files. However the failure to unlink a stale linkto
causes DHT to fail the lookup with EIO and hence
prevent access to the file.

&gt; Change-Id: Id295362d41e52263790694602f36f1219f0646a2
&gt; BUG: 1542318
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: Id295362d41e52263790694602f36f1219f0646a2
BUG: 1543016
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Fixed leak in dht_populate_inode_for_dentry</title>
<updated>2018-02-07T06:24:57+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-02-02T07:05:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=187e8e8d879675048b1b133e5eb8a06ad3cc6f2a'/>
<id>187e8e8d879675048b1b133e5eb8a06ad3cc6f2a</id>
<content type='text'>
Fixed an issue in dht_populate_inode_for_dentry where a layout is
set in the inode without checking if it is already set. This overwrites
the value each time without freeing the already existing layout.

Also includes the changes in https://review.gluster.org/19471

&gt; Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd
&gt; BUG: 1541264
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd
BUG: 1541267
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed an issue in dht_populate_inode_for_dentry where a layout is
set in the inode without checking if it is already set. This overwrites
the value each time without freeing the already existing layout.

Also includes the changes in https://review.gluster.org/19471

&gt; Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd
&gt; BUG: 1541264
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd
BUG: 1541267
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Add migration checks to dht_(f)xattrop</title>
<updated>2018-02-06T07:06:47+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-01-19T06:12:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e64cc2afe0f8111cf14ebe5a2d6a7c6e70af764b'/>
<id>e64cc2afe0f8111cf14ebe5a2d6a7c6e70af764b</id>
<content type='text'>
The dht_(f)xattrop implementation did not implement
migration phase1/phase2 checks which could cause issues
with rebalance on sharded volumes.
This does not solve the issue where fops may reach the target
out of order.

&gt; Change-Id: I2416fc35115e60659e35b4b717fd51f20746586c
&gt; BUG: 1471031
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I2416fc35115e60659e35b4b717fd51f20746586c
BUG: 1540224
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dht_(f)xattrop implementation did not implement
migration phase1/phase2 checks which could cause issues
with rebalance on sharded volumes.
This does not solve the issue where fops may reach the target
out of order.

&gt; Change-Id: I2416fc35115e60659e35b4b717fd51f20746586c
&gt; BUG: 1471031
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I2416fc35115e60659e35b4b717fd51f20746586c
BUG: 1540224
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: don't overfill the buffer in readdir(p)</title>
<updated>2017-12-08T05:36:52+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2017-09-18T10:31:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=fd3448c4a70c0c4ed2b8053ebe5bbe4d261086ee'/>
<id>fd3448c4a70c0c4ed2b8053ebe5bbe4d261086ee</id>
<content type='text'>
Superflous dentries that cannot be fit in the buffer size provided by
kernel are thrown away by fuse-bridge. This means,

* the next readdir(p) seen by readdir-ahead would have an offset of a
dentry returned in a previous readdir(p) response. When readdir-ahead
detects non-monotonic offset it turns itself off which can result in
poor readdir performance.

* readdirp can be cpu-intensive on brick and there is no point to read
 all those dentries just to be thrown away by fuse-bridge.

So, the best strategy would be to fill the buffer optimally - neither
overfill nor underfill.

&gt; Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84
&gt; BUG: 1492625
&gt; Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit e785faead91f74dce7c832848f2e8f3f43bd0be5)
Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84
BUG: 1478411
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Superflous dentries that cannot be fit in the buffer size provided by
kernel are thrown away by fuse-bridge. This means,

* the next readdir(p) seen by readdir-ahead would have an offset of a
dentry returned in a previous readdir(p) response. When readdir-ahead
detects non-monotonic offset it turns itself off which can result in
poor readdir performance.

* readdirp can be cpu-intensive on brick and there is no point to read
 all those dentries just to be thrown away by fuse-bridge.

So, the best strategy would be to fill the buffer optimally - neither
overfill nor underfill.

&gt; Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84
&gt; BUG: 1492625
&gt; Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit e785faead91f74dce7c832848f2e8f3f43bd0be5)
Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84
BUG: 1478411
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: populate inode in dentry for single subvolume dht</title>
<updated>2017-12-06T10:08:54+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2017-09-19T04:14:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f85154306277fbd0510109dc67c9a85e67223028'/>
<id>f85154306277fbd0510109dc67c9a85e67223028</id>
<content type='text'>
... in readdirp response if dentry points to a directory inode. This
is a special case where the entire layout is stored in one single
subvolume and hence no need for lookup to construct the layout

&gt;Change-Id: I44fd951e2393ec9dac2af120469be47081a32185
&gt;BUG: 1492625
&gt;Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;

(cherry picked from commit 59d1cc720f52357f7a6f20bb630febc6a622c99c)
Change-Id: I44fd951e2393ec9dac2af120469be47081a32185
BUG: 1478411
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... in readdirp response if dentry points to a directory inode. This
is a special case where the entire layout is stored in one single
subvolume and hence no need for lookup to construct the layout

&gt;Change-Id: I44fd951e2393ec9dac2af120469be47081a32185
&gt;BUG: 1492625
&gt;Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;

(cherry picked from commit 59d1cc720f52357f7a6f20bb630febc6a622c99c)
Change-Id: I44fd951e2393ec9dac2af120469be47081a32185
BUG: 1478411
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: fix crash when deleting directories</title>
<updated>2017-10-25T11:36:23+00:00</updated>
<author>
<name>Zhang Huan</name>
<email>zhanghuan@open-fs.com</email>
</author>
<published>2017-09-05T03:36:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5b6989dee28b64ddf2e184708c8d53762d665963'/>
<id>5b6989dee28b64ddf2e184708c8d53762d665963</id>
<content type='text'>
In DHT, after locks on all subvolumes are acquired, it would perform the
following steps sequentially,
1. send remove dir on all other subvolumes except the hashed one in a loop;
2. wait for all pending rmdir to be done
3. remove dir on the hashed subvolume

The problem is that in step 1 there is a check to skip hashed subvolume
in the loop. If the last subvolume to check is actually the
hashed one, and step 3 is quickly done before the last and hashed
subvolume is checked, by accessing shared context data be destroyed in
step 3, would cause a crash.

Fix by saving shared data in a local variable to access later in the
loop.

&gt; BUG: 1490642
&gt; Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
(cherry picked from commit 206120126d455417a81a48ae473d49be337e9463)
Change-Id: I8db7cf7cb262d74efcb58eb00f02ea37df4be4e2
BUG: 1505221
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In DHT, after locks on all subvolumes are acquired, it would perform the
following steps sequentially,
1. send remove dir on all other subvolumes except the hashed one in a loop;
2. wait for all pending rmdir to be done
3. remove dir on the hashed subvolume

The problem is that in step 1 there is a check to skip hashed subvolume
in the loop. If the last subvolume to check is actually the
hashed one, and step 3 is quickly done before the last and hashed
subvolume is checked, by accessing shared context data be destroyed in
step 3, would cause a crash.

Fix by saving shared data in a local variable to access later in the
loop.

&gt; BUG: 1490642
&gt; Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
(cherry picked from commit 206120126d455417a81a48ae473d49be337e9463)
Change-Id: I8db7cf7cb262d74efcb58eb00f02ea37df4be4e2
BUG: 1505221
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Don't store the entire uuid for subvols</title>
<updated>2017-10-12T18:25:29+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2017-10-10T16:15:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=417088fbac3e44d87802cfc988a51e2ad7968d70'/>
<id>417088fbac3e44d87802cfc988a51e2ad7968d70</id>
<content type='text'>
Comparing the uuid string of the local node against that stored in the
local_subvol information is inefficient, especially as it is
done for every file to be migrated. The code has now been changed
to set the value of info to 1 if the nodeuuid is that of the node
making the comparison so this becomes an integer comparison.

&gt; BUG: 1451434
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; https://review.gluster.org/#/c/17851

(cherry picked from commit c4a608799a577a4f38139f6bb8a47da8efb0fec3)
Change-Id: I7491d59caad3b71dbf5facc94dcde0cd53962775
BUG: 1500472
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Comparing the uuid string of the local node against that stored in the
local_subvol information is inefficient, especially as it is
done for every file to be migrated. The code has now been changed
to set the value of info to 1 if the nodeuuid is that of the node
making the comparison so this becomes an integer comparison.

&gt; BUG: 1451434
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; https://review.gluster.org/#/c/17851

(cherry picked from commit c4a608799a577a4f38139f6bb8a47da8efb0fec3)
Change-Id: I7491d59caad3b71dbf5facc94dcde0cd53962775
BUG: 1500472
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Aggregate xattrs only for dirs in dht_discover_cbk</title>
<updated>2017-09-07T07:07:55+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2017-08-30T05:06:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=268bb635aca729a24242412c6f9dd9d5ba2a2654'/>
<id>268bb635aca729a24242412c6f9dd9d5ba2a2654</id>
<content type='text'>
If dht_discover finds data files on more than one subvol,
racing calls to dht_discover_cbk could end up calling
dht_aggregate_xattr which could delete dictionary data
that is being accessed by higher layer translators.
Fixed to call dht_aggregate_xattr only for directories and
consider only the first file to be found.

&gt; BUG: 1484709
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/18137
&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;

Change-Id: I4f3d2a405ec735d4f1bb33a04b7255eb2d179f8a
BUG: 1486538
(cherry picked from commit 9420022df0962b1fa4f3ea3774249be81bc945cc)
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: https://review.gluster.org/18146
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If dht_discover finds data files on more than one subvol,
racing calls to dht_discover_cbk could end up calling
dht_aggregate_xattr which could delete dictionary data
that is being accessed by higher layer translators.
Fixed to call dht_aggregate_xattr only for directories and
consider only the first file to be found.

&gt; BUG: 1484709
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/18137
&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;

Change-Id: I4f3d2a405ec735d4f1bb33a04b7255eb2d179f8a
BUG: 1486538
(cherry picked from commit 9420022df0962b1fa4f3ea3774249be81bc945cc)
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: https://review.gluster.org/18146
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
