From b9e1c911833ca1916055622e5265672d5935d925 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 6 Mar 2017 10:34:05 -0500 Subject: 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 Reviewed-on: https://review.gluster.org/16854 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Vijay Bellur Reviewed-by: Raghavendra G --- xlators/performance/write-behind/src/write-behind.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators') 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); -- cgit