Obd device cleanup is executed by obd zombie thread, and umount thread
can return successfully before obd zomebie finishes its job. In some
cases, especially in test cases, a test may starts before last tests
finishes obd cleanup, this patch makes mount thread wait for obd
zombie finishes its job.
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I881be5de18960867c36e8c4e4180c0c594d88a01
Reviewed-on: http://review.whamcloud.com/1896
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.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);