From: huanghua Date: Wed, 3 Dec 2008 02:26:59 +0000 (+0000) Subject: Branch b1_8_gate X-Git-Tag: v1_7_150~1^57~1 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1862402b1231467371a632d1c00fd716eaf09a45;p=fs%2Flustre-release.git Branch b1_8_gate b=17589 i=yong.fan i=yury.umanets wait a bit while umount client if there is still ref count on mnt. --- diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index e4d276f..e7d457c 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -2215,9 +2215,16 @@ void ll_umount_begin(struct super_block *sb) /* Really, we'd like to wait until there are no requests outstanding, * and then continue. For now, we just invalidate the requests, - * schedule, and hope. + * sleep 1 second, and hope it is OK. */ - schedule(); + if (atomic_read(&vfsmnt->mnt_count) > 2) { + cfs_schedule_timeout(CFS_TASK_INTERRUPTIBLE, + cfs_time_seconds(1)); + if (atomic_read(&vfsmnt->mnt_count) > 2) + LCONSOLE_WARN("Mount still busy with %d refs! You " + "may try to umount it a bit later\n", + atomic_read(&vfsmnt->mnt_count)); + } EXIT; }