Whamcloud - gitweb
LU-4152 mdt: Don't enqueue two locks on the same resource 83/8083/7
authorOleg Drokin <oleg.drokin@intel.com>
Tue, 29 Oct 2013 02:15:03 +0000 (22:15 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 19 Dec 2013 02:43:10 +0000 (02:43 +0000)
commit64fb5f52a2d5a1e6a7e24ffff8fd7d60007a351e
tree736ab1fed240a67abf202a429f401b04e27ade6f
parentd428a204a1cd923b96eb66710ea6c96389a00a12
LU-4152 mdt: Don't enqueue two locks on the same resource

Due to mechanics of ldlm internals, enqueueing two different ibits
lock on the same resource is deadlock prone.
As such change mdt_object_open_lock to release open lock if it becomes
necessary to get exclusive layout lock (to create objects).
It's ok to release the open lock right away as it's never guaranteed to
be issued anyway.

Change-Id: Ib669e68323ea72c75a0a8bea289d8bea079309b0
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/8083
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/mdt/mdt_open.c