Whamcloud - gitweb
LU-2458 obdclass: wait obd cleanup before mount 70/6670/3
authorBruno Faccini <bruno.faccini@intel.com>
Mon, 17 Jun 2013 16:22:59 +0000 (18:22 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 19 Jun 2013 03:33:56 +0000 (03:33 +0000)
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>
lustre/obdclass/obd_mount.c

index 54fb243..998eddc 100644 (file)
@@ -2154,6 +2154,11 @@ int lustre_fill_super(struct super_block *sb, void *data, int silent)
          */
         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);