Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1485954 > unrolled thread

[PATCH 013/124] staging: lustre: osc: update kms in brw_interpret() properly

Started byJames Simmons <jsimmons@infradead.org>
First post2016-09-18 22:50 +0200
Last post2016-09-18 22:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 013/124] staging: lustre: osc: update kms in brw_interpret() properly James Simmons <jsimmons@infradead.org> - 2016-09-18 22:50 +0200

#1485954 — [PATCH 013/124] staging: lustre: osc: update kms in brw_interpret() properly

FromJames Simmons <jsimmons@infradead.org>
Date2016-09-18 22:50 +0200
Subject[PATCH 013/124] staging: lustre: osc: update kms in brw_interpret() properly
Message-ID<siRce-4sg-41@gated-at.bofh.it>
From: Niu Yawei <yawei.niu@intel.com>

In brw_interpret(), we forgot page offset when calculating
write offset, that leads to wrong kms for sync write.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5463
Reviewed-on: http://review.whamcloud.com/11374
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Li Dongyang <dongyang.li@anu.edu.au>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/osc/osc_request.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index e861973..e44b4fa 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -1796,7 +1796,8 @@ static int brw_interpret(const struct lu_env *env,
 
 		if (lustre_msg_get_opc(req->rq_reqmsg) == OST_WRITE) {
 			struct lov_oinfo *loi = cl2osc(obj)->oo_oinfo;
-			loff_t last_off = last->oap_count + last->oap_obj_off;
+			loff_t last_off = last->oap_count + last->oap_obj_off +
+					  last->oap_page_off;
 
 			/* Change file size if this is an out of quota or
 			 * direct IO write and it extends the file size
-- 
1.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web