diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2014-07-17 21:59:26 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-07-30 02:17:52 -0700 |
commit | 45fbf99cb669e891a84a8228cef27973f5e774bf (patch) | |
tree | fdb9dd498c21045f787b8db68bfdea40d3c2f509 /xlators/storage/posix/src/posix-helpers.c | |
parent | b56719fc478590815b6b8bc1e5a7dee5194555df (diff) |
storage/posix: removing deleting entries in case of creation failures
The code is not atomic enough to not to delete a dentry created by a
prallel dentry creation operation.
Change-Id: I9bd6d2aa9e7a1c0688c0a937b02a4b4f56d7aa3d
BUG: 1117851
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/8327
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 9ba95bc4941..5f8984cc8a7 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -654,6 +654,24 @@ out: return xattr; } +void +posix_gfid_unset (xlator_t *this, dict_t *xdata) +{ + uuid_t uuid = {0, }; + int ret = 0; + + if (xdata == NULL) + goto out; + + ret = dict_get_ptr (xdata, "gfid-req", (void **)&uuid); + if (ret) { + goto out; + } + + posix_handle_unset (this, uuid, NULL); +out: + return; +} int posix_gfid_set (xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req) |