diff options
author | Kotresh HR <khiremat@redhat.com> | 2017-03-06 10:34:05 -0500 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2017-03-10 00:16:59 -0500 |
commit | b9e1c911833ca1916055622e5265672d5935d925 (patch) | |
tree | e2e14719582aaa988c478f0629058d6b05b86d57 /xlators | |
parent | 64442122958011a3e7e73c5d205f37ac0da46736 (diff) |
performance/write-behind: Honor the client pid set
write-behind xlator does not honor the client pid being
set. It doesn't pass down the client pid saved in
'frame->root->pid'. This patch fixes the same.
Change-Id: I838dcf43f56d6d0aa1d2c88811a2b271d9e88d05
BUG: 1430608
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: https://review.gluster.org/16854
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index d63c8b5c1d5..d1a95c97d7a 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -147,6 +147,7 @@ typedef struct wb_request { wb_inode_t *wb_inode; glusterfs_fop_t fop; gf_lkowner_t lk_owner; + pid_t client_pid; struct iobref *iobref; uint64_t gen; /* inode liability state at the time of request arrival */ @@ -526,6 +527,7 @@ wb_enqueue_common (wb_inode_t *wb_inode, call_stub_t *stub, int tempted) } req->lk_owner = stub->frame->root->lk_owner; + req->client_pid = stub->frame->root->pid; switch (stub->fop) { case GF_FOP_WRITE: @@ -1095,6 +1097,7 @@ wb_fulfill_head (wb_inode_t *wb_inode, wb_request_t *head) goto err; frame->root->lk_owner = head->lk_owner; + frame->root->pid = head->client_pid; frame->local = head; LOCK (&wb_inode->lock); |