Commit 60deafea authored by Niu Yawei's avatar Niu Yawei Committed by Greg Kroah-Hartman

staging: lustre: 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: default avatarNiu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5463
Reviewed-on: http://review.whamcloud.com/11374Reviewed-by: default avatarBobi Jam <bobijam@gmail.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarLi Dongyang <dongyang.li@anu.edu.au>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 212f6c7f
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment