From 3f16f4d26df042e71865c070080f33d04a0fd4f7 Mon Sep 17 00:00:00 2001 From: Bruno Faccini Date: Mon, 17 Jun 2013 18:22:59 +0200 Subject: [PATCH] LU-2458 obdclass: wait obd cleanup before mount 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 Signed-off-by: Bruno Faccini Signed-off-by: Bob Glossman Change-Id: Ic818ba8e3ff6de1ac4391be85b631b5f9ae1b015 Reviewed-on: http://review.whamcloud.com/6670 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin --- lustre/obdclass/obd_mount.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 54fb243..998eddc 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -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); -- 1.8.3.1