Whamcloud - gitweb
LU-5463 osc: update kms in brw_interpret() properly 74/11374/4
authorNiu Yawei <yawei.niu@intel.com>
Fri, 8 Aug 2014 04:11:02 +0000 (00:11 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 Aug 2014 05:36:59 +0000 (05:36 +0000)
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>
Change-Id: I9be90fefa384f9738c11737580637bcec96e5126
Reviewed-on: http://review.whamcloud.com/11374
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Dongyang <dongyang.li@anu.edu.au>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osc/osc_request.c

index 93567bc..0b52578 100644 (file)
@@ -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 */