summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-10-15 12:01:14 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-11-09 02:52:34 -0800
commit87c877c93c399863b6afcc642d015627217b79f8 (patch)
tree6e9e2cb41cb110cb26b3505e990dcc77f65084cf /xlators/storage/posix
parent42e23211fcc1f7da320a318a6b212e2af60214f6 (diff)
dht: heal directory path if the directory is not present
back port of http://review.gluster.org/#/c/12376/ After a successful nameless lookup if the directory is not present on any of the subvol, then we will get the path of the directory and will recursively send a named lookp on each parent directory. This will help particularly for the scenarios like add brick and attach-tier. Change-Id: I97f3178adb08b88910f709f0acf1d86c147be017 BUG: 1279095 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12539 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r--xlators/storage/posix/src/posix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index eded392dca9..4a01e9f036f 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3814,14 +3814,14 @@ posix_get_ancestry (xlator_t *this, inode_t *leaf_inode,
priv = this->private;
- if (!priv->update_pgfid_nlinks)
- goto out;
-
if (IA_ISDIR (leaf_inode->ia_type)) {
ret = posix_get_ancestry_directory (this, leaf_inode,
head, path, type, op_errno,
xdata);
} else {
+
+ if (!priv->update_pgfid_nlinks)
+ goto out;
ret = posix_get_ancestry_non_directory (this, leaf_inode,
head, path, type,
op_errno, xdata);