diff options
| author | hannken <hannken@NetBSD.org> | 2018-10-05 09:51:55 +0000 |
|---|---|---|
| committer | hannken <hannken@NetBSD.org> | 2018-10-05 09:51:55 +0000 |
| commit | c71e1b358db5f10db830d91bf236808488e39d44 (patch) | |
| tree | 8200f2bcd311c91ff3338a81a7cd2562f3f57a0e /sys/miscfs | |
| parent | c750c00481d89810731b1627417c05d66a7b012e (diff) | |
Bring back three state file system suspension:
NORMAL -> SUSPENDING -> SUSPENDED
and add operation fstrans_start_lazy() that only blocks while SUSPENDED.
Change vndthread() support operation handle_with_rdwr() to bracket
its file system operations by fstrans_start_lazy() and fstrans_done().
PR kern/53624 (dom0 freeze on domU exit)
Diffstat (limited to 'sys/miscfs')
| -rw-r--r-- | sys/miscfs/genfs/genfs_vfsops.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/miscfs/genfs/genfs_vfsops.c b/sys/miscfs/genfs/genfs_vfsops.c index 281e5e4e11f..33e3d7e3d9e 100644 --- a/sys/miscfs/genfs/genfs_vfsops.c +++ b/sys/miscfs/genfs/genfs_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_vfsops.c,v 1.7 2017/05/24 09:53:55 hannken Exp $ */ +/* $NetBSD: genfs_vfsops.c,v 1.8 2018/10/05 09:51:55 hannken Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfs_vfsops.c,v 1.7 2017/05/24 09:53:55 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfs_vfsops.c,v 1.8 2018/10/05 09:51:55 hannken Exp $"); #include <sys/types.h> #include <sys/mount.h> @@ -83,6 +83,9 @@ genfs_suspendctl(struct mount *mp, int cmd) switch (cmd) { case SUSPEND_SUSPEND: + error = fstrans_setstate(mp, FSTRANS_SUSPENDING); + if (error) + return error; error = fstrans_setstate(mp, FSTRANS_SUSPENDED); if (error == 0) { if ((mp->mnt_iflag & IMNT_GONE) != 0) |
