From 51a3faf3f1c5b5eeb6572d8f9bec074fe3f6ade2 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Tue, 23 Jan 2018 15:03:33 +0530 Subject: 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 Change-Id: I2b7470e1c5e20d87b5545160697f24d041045140 BUG: 1539516 Signed-off-by: N Balachandran --- xlators/cluster/dht/src/dht-common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index f7bc4675630..0db8379cf41 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -5120,6 +5120,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; + } + gf_uuid_copy (loc.gfid, orig_entry->d_stat.ia_gfid); loc.inode = inode_ref (orig_entry->inode); -- cgit