Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2019 00:56:38 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351835 - head/sys/sys
Message-ID:  <201909050056.x850uccn019615@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Thu Sep  5 00:56:37 2019
New Revision: 351835
URL: https://svnweb.freebsd.org/changeset/base/351835

Log:
  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.

Modified:
  head/sys/sys/mount.h

Modified: head/sys/sys/mount.h
==============================================================================
--- head/sys/sys/mount.h	Wed Sep  4 22:37:28 2019	(r351834)
+++ head/sys/sys/mount.h	Thu Sep  5 00:56:37 2019	(r351835)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909050056.x850uccn019615>