From: nathan Date: Mon, 15 May 2006 20:43:08 +0000 (+0000) Subject: Branch b1_5 X-Git-Tag: v1_7_100~1^90~8^2~241 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a59be8d1fbb88bcabafa4b2a21ef7d5ef6d0cf45;p=fs%2Flustre-release.git Branch b1_5 b=8007 Fix "Mount still busy with 1802201963 refs" bug --- diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 44c6a87..e64e3a0 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1297,7 +1297,7 @@ static void server_wait_finished(struct vfsmount *mnt) init_waitqueue_head(&waitq); - while ((atomic_read(&mnt->mnt_count) > 0) && retries--) { + while ((atomic_read(&mnt->mnt_count) > 1) && retries--) { LCONSOLE_WARN("Mount still busy with %d refs, waiting for " "%d secs...\n", atomic_read(&mnt->mnt_count), 2 * retries); @@ -1306,8 +1306,8 @@ static void server_wait_finished(struct vfsmount *mnt) lwi = LWI_TIMEOUT(2 * HZ, NULL, NULL); l_wait_event(waitq, 0, &lwi); } - if (atomic_read(&mnt->mnt_count)) { - CERROR("Mount %p is still busy(%d refs), giving up.\n", + if (atomic_read(&mnt->mnt_count) > 1) { + CERROR("Mount %p is still busy (%d refs), giving up.\n", mnt, atomic_read(&mnt->mnt_count)); } } @@ -1364,17 +1364,17 @@ static void server_put_super(struct super_block *sb) server_stop_mgs(sb); } - /* clean the mgc and sb */ + /* Clean the mgc and sb */ rc = lustre_common_put_super(sb); - // FIXME how do I return a failure? - - /* drop the One True Mount */ - unlock_mntput(mnt); + /* FIXME how can I report a failure to umount? */ /* Wait for the targets to really clean up - can't exit (and let the sb get destroyed) while the mount is still in use */ server_wait_finished(mnt); + /* drop the One True Mount */ + unlock_mntput(mnt); + /* Stop the servers (MDS, OSS) if no longer needed. We must wait until the target is really gone so that our type refcount check is right. */