From 2dac3aec28cbfbbea48907a8094eff8c365ecdf0 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Fri, 8 Aug 2014 00:11:02 -0400 Subject: [PATCH] LU-5463 osc: update kms in brw_interpret() properly In brw_interpret(), we forgot page offset when calculating write offset, that leads to wrong kms for sync write. Signed-off-by: Niu Yawei Change-Id: I9be90fefa384f9738c11737580637bcec96e5126 Reviewed-on: http://review.whamcloud.com/11374 Reviewed-by: Bobi Jam Reviewed-by: Jinshan Xiong Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Li Dongyang Reviewed-by: Oleg Drokin --- lustre/osc/osc_request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 93567bc..0b52578 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1813,7 +1813,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.8.3.1