Whamcloud - gitweb
LU-6997 mdt: enqueue nonblocking locks in migration 70/15970/4
authorwang di <di.wang@intel.com>
Wed, 12 Aug 2015 06:37:20 +0000 (23:37 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 24 Aug 2015 14:12:38 +0000 (14:12 +0000)
commit76e38a7f80f5180e5ab1ac7dd518a4bd1a43cf87
tree1ba003b14e517dfd5ea56f1d141a442743f7fb26
parentf2cd05463982e2fc17d30c927065266850d55446
LU-6997 mdt: enqueue nonblocking locks in migration

During migration, it needs to lock all of parent objects
in the linkea of the migrating object, so these parent
objects can change the name entry after the migration.

But it is not easy to order these objects(in linkEA) in
parent-child order. To avoid deadlock, let's use
mdt_object_lock_try(), which will enqueue nonblocking
locks, i.e. once there are conflicting locks, the
migration will release all of locks then return -EBUSY.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Id657cfd9d9caefaa7c699d5a5ca90604cf707ac0
Reviewed-on: http://review.whamcloud.com/15970
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_dlm.h
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_reint.c
lustre/osp/osp_md_object.c