diff options
author | markj <markj@FreeBSD.org> | 2015-07-05 22:37:33 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-07-05 22:37:33 +0000 |
commit | d19ba3f89dbe1aa527570d4bbbcc6bf7bacd7db2 (patch) | |
tree | 2b584c1ebc21d09c5c4b2fe8539dd7d22e9cbd7c /sys/fs/tmpfs/tmpfs_vfsops.c | |
parent | c78ab1ef947f631582f0b1abd43d3568122a79e0 (diff) | |
download | FreeBSD-src-d19ba3f89dbe1aa527570d4bbbcc6bf7bacd7db2.zip FreeBSD-src-d19ba3f89dbe1aa527570d4bbbcc6bf7bacd7db2.tar.gz |
Check suspendability on the mountpoint returned by VOP_GETWRITEMOUNT.
This obviates the need for a MNTK_SUSPENDABLE flag, since passthrough
filesystems like nullfs and unionfs no longer need to inherit this
information from their lower layer(s). This change also restores the
pre-r273336 behaviour of using the presence of a susp_clean VFS method to
request suspension support.
Reviewed by: kib, mjg
Differential Revision: https://reviews.freebsd.org/D2937
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_vfsops.c')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vfsops.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 2942e5a..f1ba960 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -75,6 +75,7 @@ static int tmpfs_root(struct mount *, int flags, struct vnode **); static int tmpfs_fhtovp(struct mount *, struct fid *, int, struct vnode **); static int tmpfs_statfs(struct mount *, struct statfs *); +static void tmpfs_susp_clean(struct mount *); static const char *tmpfs_opts[] = { "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", @@ -256,7 +257,7 @@ tmpfs_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_SUSPENDABLE; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; MNT_IUNLOCK(mp); mp->mnt_data = tmp; @@ -463,6 +464,14 @@ tmpfs_sync(struct mount *mp, int waitfor) } /* + * The presence of a susp_clean method tells the VFS to track writes. + */ +static void +tmpfs_susp_clean(struct mount *mp __unused) +{ +} + +/* * tmpfs vfs operations. */ @@ -473,5 +482,6 @@ struct vfsops tmpfs_vfsops = { .vfs_statfs = tmpfs_statfs, .vfs_fhtovp = tmpfs_fhtovp, .vfs_sync = tmpfs_sync, + .vfs_susp_clean = tmpfs_susp_clean, }; VFS_SET(tmpfs_vfsops, tmpfs, VFCF_JAIL); |