aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorJason A. Harmening <jah@FreeBSD.org>2021-05-11 15:54:58 +0000
committerJason A. Harmening <jah@FreeBSD.org>2021-05-29 21:05:39 +0000
commit6d3e78ad6c11849ad3d36feeb10c412c93b56073 (patch)
treea9449581c777f18a55907e1dcd5cdc33e3c293b7 /sys/sys
parent811e645d286d0b97c02d1b66a59a76c327d46c35 (diff)
downloadsrc-6d3e78ad6c11849ad3d36feeb10c412c93b56073.tar.gz
src-6d3e78ad6c11849ad3d36feeb10c412c93b56073.zip
VFS_QUOTACTL(9): allow implementation to indicate busy state changes
Instead of requiring all implementations of vfs_quotactl to unbusy the mount for Q_QUOTAON and Q_QUOTAOFF, add an "mp_busy" in/out param to VFS_QUOTACTL(9). The implementation may then indicate to the caller whether it needed to unbusy the mount. Reviewed By: kib, markj Differential Revision: https://reviews.freebsd.org/D30218
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/mount.h7
-rw-r--r--sys/sys/param.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index a1d4bfd15ddb..684d8c3eb780 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -759,7 +759,8 @@ struct mntarg;
typedef int vfs_cmount_t(struct mntarg *ma, void *data, uint64_t flags);
typedef int vfs_unmount_t(struct mount *mp, int mntflags);
typedef int vfs_root_t(struct mount *mp, int flags, struct vnode **vpp);
-typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid, void *arg);
+typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid, void *arg,
+ bool *mp_busy);
typedef int vfs_statfs_t(struct mount *mp, struct statfs *sbp);
typedef int vfs_sync_t(struct mount *mp, int waitfor);
typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags,
@@ -832,10 +833,10 @@ vfs_statfs_t __vfs_statfs;
_rc = (*(MP)->mnt_op->vfs_cachedroot)(MP, FLAGS, VPP); \
_rc; })
-#define VFS_QUOTACTL(MP, C, U, A) ({ \
+#define VFS_QUOTACTL(MP, C, U, A, MP_BUSY) ({ \
int _rc; \
\
- _rc = (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A); \
+ _rc = (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, MP_BUSY); \
_rc; })
#define VFS_STATFS(MP, SBP) ({ \
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 959f0b94ca70..c63452973daf 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -76,7 +76,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1400017
+#define __FreeBSD_version 1400018
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,