From 431fd40aef7a0cbbc5403ac5789a600591395339 Mon Sep 17 00:00:00 2001 From: tegge Date: Tue, 26 Sep 2006 04:17:17 +0000 Subject: Increase mnt_noasync once in softdep_mount() to disallow async io, closing a window where a file system using softupdates could be async for a short while if both MNT_UPDATE and MNT_ASYNC were passed as flags to nmount(). Add MNTK_SOFTDEP flag to ensure that softdep_mount() doesn't increase mnt_noasync multiple times. --- sys/ufs/ffs/ffs_softdep.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/ufs/ffs') diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 6805563..b1a11be 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1426,6 +1426,11 @@ softdep_mount(devvp, mp, fs, cred) MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_ASYNC; mp->mnt_flag |= MNT_SOFTDEP; + if ((mp->mnt_kern_flag & MNTK_SOFTDEP) == 0) { + mp->mnt_kern_flag = (mp->mnt_kern_flag & ~MNTK_ASYNC) | + MNTK_SOFTDEP; + mp->mnt_noasync++; + } MNT_IUNLOCK(mp); ump = VFSTOUFS(mp); LIST_INIT(&ump->softdep_workitem_pending); -- cgit v1.1