Whamcloud - gitweb
LU-4320 mdt: fixup MDS_SWAP_LAYOUTS ELC handling 29/9329/2
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 20 Feb 2014 15:58:51 +0000 (09:58 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 12 Mar 2014 15:21:48 +0000 (15:21 +0000)
commitbdc7dbd3ee45731b321f3b0708e14a05df6b58cd
treeed4e19b2e16ae3c4b7761f07206deeb9fab7da43
parent742d4ee68aaf3407ac4b8f86c9bddbece4beaa6e
LU-4320 mdt: fixup MDS_SWAP_LAYOUTS ELC handling

In mdc_ioc_swap_layouts() cancel *any* unused locks with LAYOUT or
XATTR IBITS set on the two files. (This matches the locks acquired in
mdt_swap_layouts(). Previously only locks that conflicted with a CR
LAYOUT lock were cancelled.) Add HABEO_CLAVIS to the target handler
flags for MDS_SWAP_LAYOUTS and call ldlm_request_cancel() from
mdt_swap_layouts() to do the intended early lock cancellation before
the handler acquires its own locks.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I9d7ba9ac660b136dafa7e307177b92204a1257c3
Reviewed-on: http://review.whamcloud.com/9329
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c