summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-01-23 15:03:33 +0530
committerN Balachandran <nbalacha@redhat.com>2018-01-24 11:11:09 +0000
commitcb98b495a90da1fda452f118275f52053e8305e9 (patch)
tree6118a5c99aa68615365de8b643f873e66c0f6e39 /xlators/cluster/dht/src
parent0c57232ae07f48bd6483bfe88a182f832377ef52 (diff)
cluster/dht: Skip '..' for the volume root dir
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. Change-Id: I2b7470e1c5e20d87b5545160697f24d041045140 BUG: 1537457 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index d54d54c5fc4..36ee3eeb8c5 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -6332,6 +6332,11 @@ dht_populate_inode_for_dentry (xlator_t *this, xlator_t *subvol,
int ret = 0;
loc_t loc = {0, };
+ if (gf_uuid_is_null (orig_entry->d_stat.ia_gfid)) {
+ /* this skips the '..' entry for the root of the volume */
+ return;
+ }
+
layout = dht_layout_new (this, 1);
if (!layout)
goto out;