Whamcloud - gitweb
LU-2304 lov: check enq flags when matching top lock
authorJinshan Xiong <jinshan.xiong@intel.com>
Wed, 21 Nov 2012 18:10:42 +0000 (10:10 -0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 8 Dec 2012 05:06:51 +0000 (00:06 -0500)
commitc7176318dc754deedf33fb385e47fb723a00a279
tree1e5ca3e5640a0ee864f7eb82f32e77f0e32fe378
parentfb1a1ec6300a5ec3925b725d5d2b783314dff3f8
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: I290df2fdb9453c2fd7c8c3d3e7289e60bae9b095
Reviewed-on: http://review.whamcloud.com/4651
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/lustre_dlm.h
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