From: Niu Yawei Date: Fri, 8 Aug 2014 04:11:02 +0000 (-0400) Subject: LU-5463 osc: update kms in brw_interpret() properly X-Git-Tag: 2.6.51~29 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2dac3aec28cbfbbea48907a8094eff8c365ecdf0 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 --- 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 */