Date: Thu, 19 Feb 1998 15:46:28 +0900 From: tetsuya@secom-sis.co.jp To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/5787: Failure of unmounting asyncronous file system causes it to be non-asyncronous Message-ID: <98Feb19.154708jst.27791@spiral.secom-sis.co.jp>
next in thread | raw e-mail | index | archive | help
>Number: 5787 >Category: kern >Synopsis: Failure of unmounting asyncronous file system causes it to be non-asyncronous >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 18 22:50:02 PST 1998 >Last-Modified: >Originator: Tetsuya Furukawa >Organization: SECOM Information System Co.,Ltd. >Release: FreeBSD 3.0-CURRENT i386 >Environment: 3.0-CURRENT on Dec 8 1997 >Description: After unmounting a file system which has been mounted with the flag MNT_ASYNC fails for it is busy, the flag will be lost. >How-To-Repeat: # /sbin/mount /dev/sd0a on / (local) /dev/sd0s2e on /var (local) /dev/sd0s2f on /usr (local) /dev/sd0s2g on /async (asynchronous, local) procfs on /proc (local) # /sbin/umount /async umount: /async: Device busy # /sbin/mount /dev/sd0a on / (local) /dev/sd0s2e on /var (local) /dev/sd0s2f on /usr (local) /dev/sd0s2g on /async (local) procfs on /proc (local) >Fix: --- kern/vfs_syscalls.c.orig Thu Feb 19 14:56:16 1998 +++ kern/vfs_syscalls.c Thu Feb 19 14:58:59 1998 @@ -416,6 +416,7 @@ { struct vnode *coveredvp; int error; + int asyncflag; simple_lock(&mountlist_slock); mp->mnt_kern_flag |= MNTK_UNMOUNT; @@ -424,6 +425,7 @@ if (mp->mnt_flag & MNT_EXPUBLIC) vfs_setpublicfs(NULL, NULL, NULL); + asyncflag = mp->mnt_flag & MNT_ASYNC; mp->mnt_flag &=~ MNT_ASYNC; vfs_msync(mp, MNT_NOWAIT); vnode_pager_umount(mp); /* release cached vnodes */ @@ -434,6 +436,8 @@ error = VFS_UNMOUNT(mp, flags, p); simple_lock(&mountlist_slock); if (error) { + if (asyncflag) + mp->mnt_flag |= MNT_ASYNC; mp->mnt_kern_flag &= ~MNTK_UNMOUNT; lockmgr(&mp->mnt_lock, LK_RELEASE | LK_INTERLOCK | LK_REENABLE, &mountlist_slock, p); >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98Feb19.154708jst.27791>