Whamcloud - gitweb
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>