diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-01-23 17:40:40 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-02-27 03:26:42 -0500 |
commit | b5c26a462caf97bfc5380c81092f5c331ccaf1ae (patch) | |
tree | 8828f7bd3d08b6d5294ce915a5592c15bf630c88 /xlators/storage/posix/src/posix-handle.c | |
parent | 8aee74f25cfa9dc676e116e9882723254b0509a9 (diff) |
storage/posix: Execute syscalls in xattrop under different locks
... and not inode->lock. This is to prevent the epoll thread from
*potentially* being blocked on this lock in the worst case for
extended period elsewhere in the brick stack, while the syscalls
in xattrop are being performed under the same lock by a different
thread. This could potentially lead to ping-timeout, if the only
available epoll thread is busy waiting on the inode->lock, thereby
preventing it from picking up the ping request from the client(s).
Also removed some unused functions.
Change-Id: I2054a06701ecab11aed1c04e80ee57bbe2e52564
BUG: 1421938
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/16462
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/storage/posix/src/posix-handle.c')
-rw-r--r-- | xlators/storage/posix/src/posix-handle.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c index c8524a69fe5..ef56d105d7e 100644 --- a/xlators/storage/posix/src/posix-handle.c +++ b/xlators/storage/posix/src/posix-handle.c @@ -952,6 +952,7 @@ posix_create_link_if_gfid_exists (xlator_t *this, uuid_t gfid, char *real_path, inode_t *inode = NULL; struct stat stbuf = {0,}; struct posix_private *priv = NULL; + posix_inode_ctx_t *ctx = NULL; priv = this->private; @@ -973,11 +974,11 @@ posix_create_link_if_gfid_exists (xlator_t *this, uuid_t gfid, char *real_path, LOCK (&inode->lock); { - ret = __inode_ctx_get0 (inode, this, &ctx_int); + ret = __posix_inode_ctx_get_all (inode, this, &ctx); if (ret) goto unlock; - if (ctx_int != GF_UNLINK_TRUE) + if (ctx->unlink_flag != GF_UNLINK_TRUE) goto unlock; POSIX_GET_FILE_UNLINK_PATH (priv->base_path, gfid, @@ -997,7 +998,8 @@ posix_create_link_if_gfid_exists (xlator_t *this, uuid_t gfid, char *real_path, goto unlock; } ctx_int = GF_UNLINK_FALSE; - ret = __inode_ctx_set0 (inode, this, &ctx_int); + ret = __posix_inode_ctx_set_unlink_flag (inode, this, + ctx_int); } unlock: UNLOCK (&inode->lock); |