path: root/xlators/features/locks
diff options
authorRavishankar N <>2016-03-08 16:43:12 +0530
committerVijay Bellur <>2016-03-08 18:16:32 -0800
commite9fa7aeb1a32e22ff0749d67995e689028ca5a19 (patch)
treeadda41eb8093e6b9d988b3a7248412c58486389a /xlators/features/locks
parent30d9fcc3b2426a0edeb20d6925e7ac63bae83354 (diff)
afr: misc performance improvements
Backport of 1. In afr_getxattr_cbk, consider the errno value before blindly launching an inode refresh and a subsequent retry on other children. 2. We want to accuse small files only when we know for sure that there is no IO happening on that inode. Otherwise, the ia_sizes obtained in the post-inode-refresh replies may mismatch due to a race between inode-refresh and ongoing writes, causing spurious heal launches. Change-Id: I9858485d1061db67353ccf99c59530731649c847 BUG: 1309462 Signed-off-by: Ravishankar N <> Reviewed-on: Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> Reviewed-by: Pranith Kumar Karampuri <> Reviewed-by: Krutika Dhananjay <> CentOS-regression: Gluster Build System <>
Diffstat (limited to 'xlators/features/locks')
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 3d79c57..76c7c4e 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -2189,6 +2189,23 @@ pl_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
return 0;
+pl_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
+ int32_t op_errno, struct iatt *buf, dict_t *xdata)
+ PL_STACK_UNWIND (fstat, xdata, frame, op_ret, op_errno, buf, xdata);
+ return 0;
+pl_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
+ PL_LOCAL_GET_REQUESTS (frame, this, xdata, fd, NULL);
+ STACK_WIND (frame, pl_fstat_cbk, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->fstat, fd, xdata);
+ return 0;
pl_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, gf_dirent_t *entries, dict_t *xdata)
@@ -2776,6 +2793,7 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this,
struct xlator_fops fops = {
.lookup = pl_lookup,
.create = pl_create,
+ .fstat = pl_fstat,
.truncate = pl_truncate,
.ftruncate = pl_ftruncate,
.open = pl_open,