Whamcloud - gitweb
LU-6904 mdd: prepare linkea before declare 24/15724/6
authorwang di <di.wang@intel.com>
Fri, 24 Jul 2015 11:08:59 +0000 (04:08 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 3 Aug 2015 02:02:19 +0000 (02:02 +0000)
commitaf46754e1e9c3e66928e13b2301890cfa94ac059
treed6edc6086a2c08a36c59b08c3d2e619a9cf3951a
parentbf0b93a88479c3cb0bf2dc7cf890f60ae15ee05a
LU-6904 mdd: prepare linkea before declare

In mdd_rename, it should prepare linkea before journal
start, otherwise, it may send RPC to other MDT while
holding the journal(see mdd_prepare_linkea). So if the
other MDT is in recovery, then this thread will be
blocked with the started journal handle, then it will
block other journal thread.

For the same reason, mdd_rename_order, which will send
RPC to the remote MDT (mdd_is_parent()), should also
move ahead of mdd_trans_start().

Because mdd_sobj can not be null in mdd_rename, this
patch also cleanup this API a bit.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Id2426ef5d0d83c704403aa3f762596284576df6d
Reviewed-on: http://review.whamcloud.com/15724
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_dir.c