path: root/sys
diff options
authorConrad Meyer <cem@FreeBSD.org>2019-09-05 00:56:37 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-09-05 00:56:37 +0000
commit58aa4dbf4ad1ceb7373e2ce423ec2b7a47f063be (patch)
treeae59440f59d5222eee0978b826f420ce24307e9d /sys
parent2e67077700345641bf8e04705340c5f2136a79a3 (diff)
sys/mount.h: Comment on distinction between vfs_{c,}mount
Hope to save someone else a little future effort in ugly duplicated code. No functional change.
Notes: svn path=/head/; revision=351835
Diffstat (limited to 'sys')
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 50f0663537c5..77ccc438f9ef 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -651,6 +651,18 @@ struct nameidata;
struct sysctl_req;
struct mntarg;
+ * N.B., vfs_cmount is the ancient vfsop invoked by the old mount(2) syscall.
+ * The new way is vfs_mount.
+ *
+ * vfs_cmount implementations typically translate arguments from their
+ * respective old per-FS structures into the key-value list supported by
+ * nmount(2), then use kernel_mount(9) to mimic nmount(2) from kernelspace.
+ *
+ * Filesystems with mounters that use nmount(2) do not need to and should not
+ * implement vfs_cmount. Hopefully a future cleanup can remove vfs_cmount and
+ * mount(2) entirely.
+ */
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);