Whamcloud - gitweb
LU-2304 lov: check enq flags when matching top lock
authorJinshan Xiong <jinshan.xiong@intel.com>
Thu, 13 Dec 2012 01:17:47 +0000 (17:17 -0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 14 Dec 2012 19:23:20 +0000 (14:23 -0500)
commit648873f1f27fe8b99573e88c4a3192159ea73326
tree91dd2f1fbce9c42c3b58b045a912c7d3e4c9c34b
parent88020e8e33bbd3a03761cf7da9216c47c4ae9e59
LU-2304 lov: check enq flags when matching top lock

cld_enq_flags must be checked when matching top lock, otherwise
if a sublock is missing then it will be reenqueued with wrong enq
flags.

For LU-2304, a previous truncate to zero lock(with CEF_DISCARD_DATA)
flags was matched by not-to-zero truncate and then wrongly reenqueued
with discard flag. This caused dirty pages to be discarded on the
other clients.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I0575509b3ec30982fe7e5a7ff018ff4dd3dbe911
Reviewed-on: http://review.whamcloud.com/4818
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_request.c
lustre/llite/llite_lib.c
lustre/llite/vvp_io.c
lustre/lov/lov_lock.c
lustre/osc/osc_lock.c