diff options
author | mjg <mjg@FreeBSD.org> | 2014-10-20 18:00:50 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2014-10-20 18:00:50 +0000 |
commit | 12e0034dd069b0f2d2b0cf11d216afbe99094438 (patch) | |
tree | e51e6a7989eefd8dc56ac47c5d0db6b3380c4a81 /sys/sys/mount.h | |
parent | d6c735be7798e52e8a242ae20504aa525caf1b00 (diff) | |
download | FreeBSD-src-12e0034dd069b0f2d2b0cf11d216afbe99094438.zip FreeBSD-src-12e0034dd069b0f2d2b0cf11d216afbe99094438.tar.gz |
Provide vfs suspension support only for filesystems which need it, take
two.
nullfs and unionfs need to request suspension if underlying filesystem(s)
use it. Utilize mnt_kern_flag for this purpose.
This is a fixup for 273271.
No strong objections from: kib
Pointy hat to: mjg
MFC after: 2 weeks
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r-- | sys/sys/mount.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 633c6db..c4e1145 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -361,7 +361,7 @@ void __mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *); #define MNTK_SUSPEND 0x08000000 /* request write suspension */ #define MNTK_SUSPEND2 0x04000000 /* block secondary writes */ #define MNTK_SUSPENDED 0x10000000 /* write operations are suspended */ -#define MNTK_UNUSED25 0x20000000 /* --available-- */ +#define MNTK_SUSPENDABLE 0x20000000 /* writes can be suspended */ #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ #define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ @@ -754,10 +754,11 @@ vfs_statfs_t __vfs_statfs; _rc; }) #define VFS_SUSP_CLEAN(MP) do { \ - MPASS(*(MP)->mnt_op->vfs_susp_clean != NULL); \ - VFS_PROLOGUE(MP); \ - (*(MP)->mnt_op->vfs_susp_clean)(MP); \ - VFS_EPILOGUE(MP); \ + if (*(MP)->mnt_op->vfs_susp_clean != NULL) { \ + VFS_PROLOGUE(MP); \ + (*(MP)->mnt_op->vfs_susp_clean)(MP); \ + VFS_EPILOGUE(MP); \ + } \ } while (0) #define VFS_RECLAIM_LOWERVP(MP, VP) do { \ |