This is b2_1 backport of LU-639 change.
Upon umount, obd device cleanup is executed async in
obd zombie thread context. This leaves a timing window
where a new mount can be quickly attempted (like in
auto-test) and fail due to cleanup still ongoing.
Intel-bug-id: LU-639
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ic818ba8e3ff6de1ac4391be85b631b5f9ae1b015
Reviewed-on: http://review.whamcloud.com/6670
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
*/
cfs_lockdep_off();
+ /*
+ * LU-639: the obd cleanup of last mount may not finish yet, wait here.
+ */
+ obd_zombie_barrier();
+
/* Figure out the lmd from the mount options */
if (lmd_parse((char *)(lmd2->lmd2_data), lmd)) {
lustre_put_lsi(sb);