diff options
author | N Balachandran <nbalacha@redhat.com> | 2018-01-23 15:03:33 +0530 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2018-02-12 10:12:05 +0000 |
commit | 51a3faf3f1c5b5eeb6572d8f9bec074fe3f6ade2 (patch) | |
tree | 31838f2b97c453804c8c5ee73dae952b3091a99b /xlators/cluster | |
parent | fa0e690f9c8cf46fb01b386b543339d68c102b6a (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>
Change-Id: I2b7470e1c5e20d87b5545160697f24d041045140
BUG: 1539516
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 5 |
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 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); |