From 11d258632de7255ae8282b0615a19bd5c9cf707a Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Tue, 20 Dec 2011 17:59:07 +0800 Subject: [PATCH] LU-639 obdclass: wait obd cleanup before mount 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 Change-Id: I881be5de18960867c36e8c4e4180c0c594d88a01 Reviewed-on: http://review.whamcloud.com/1896 Tested-by: Hudson Tested-by: Maloo Reviewed-by: James Simmons 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 8c50cfb..39fe240 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -2267,6 +2267,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