summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2014-07-22 18:49:44 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-02-19 03:33:21 -0800
commit7847db9a6dc560cb0078bdfdb0ac0187e8a79443 (patch)
treed48bcd20f51fe230e67a114aa5faac5902514bd0 /xlators/storage/posix
parentee9b0aab614b56aa8f3c8ed56ced88f769c0ee47 (diff)
posix: Fix unlink failing under specific condition
PROBLEM: Files are undeletable when these three conditions are met: 1. File does not have trusted.pgfid.<gfid> xattr set. This won't be set when build-pgfid is off (default). 2. File has hardlink count > 1. 3. build-pgfid option is turned on. FIX: Allow unlink on files not having trusted.pgfid.<gfid> xattr. Change-Id: I58a9d9a1b29a0cb07f4959daabbd6dd04fab2b34 BUG: 1122028 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/8352 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r--xlators/storage/posix/src/posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index b712ab3..04b75d0 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -1586,7 +1586,9 @@ posix_unlink (call_frame_t *frame, xlator_t *this,
gf_log (this->name, GF_LOG_WARNING, "modification of "
"parent gfid xattr failed (path:%s gfid:%s)",
real_path, uuid_utoa (loc->inode->gfid));
- goto out;
+ if (op_errno != ENOATTR)
+ /* Allow unlink if pgfid xattr is not set. */
+ goto out;
}
}