Whamcloud - gitweb
LU-7433 ldlm: xattr locks are lost on mdt 20/17220/10
authorVitaly Fertman <vitaly.fertman@seagate.com>
Thu, 28 Jul 2016 21:44:14 +0000 (00:44 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 10 Sep 2016 03:23:11 +0000 (03:23 +0000)
commit1cb9e85039c8df5fbe061aad3b0666c59ff7aa4e
treeb2c5fff52fbf749ef1d8060db5697070fd3ad4b4
parent09b0ef0c85ad73f06e517632f1b4ffa3a7174c2b
LU-7433 ldlm: xattr locks are lost on mdt

mdt_intent_getxattr() can return EFAULT if a buffer cannot be found,
it is returned after lock_replace, where a new lock is installed into
lockp. An error forces ldlm_lock_enqueue() to destroy the original
lock, but ldlm_handle_enqueue0() drops the reference on the new lock.
xattr client code implied intent error is returned under a lock,
which is immediately cancelled. Check if a lock obtained and cancel
it properly for error cases. Note: we should support both cases for
interop needs, an intent error under a lock and with a lock abort.
Keep returning a lock with an intent error for interop purposes for
now, to be dropped later when client will get old enough.
make all intent ops to work through md_intent_lock: getxattr
and layout, which should extract the intent error.

Signed-off-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Change-Id: I7b628b50448c4bdb26a3a8758fc16a44212ad9ac
Seagate-bug-id: MRP-3072 MRP-3137
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Tested-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Reviewed-on: http://review.whamcloud.com/17220
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
13 files changed:
lustre/include/obd.h
lustre/include/obd_class.h
lustre/include/obd_support.h
lustre/llite/file.c
lustre/llite/xattr_cache.c
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_obd.c
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_locks.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_xattr.c
lustre/tests/sanity.sh
lustre/tests/sanityn.sh