Add four more filesystem flags:

VFCF_NETWORK (this FS goes over the net)
	VFCF_READONLY (read-write mounts do not make any sense)
	VFCF_SYNTHETIC (data in this FS is not real)
	VFCF_LOOPBACK (this FS aliases something else)

cd9660 is readonly; nullfs, umapfs, and union are loopback; NFS is netowkr;
procfs, kernfs, and fdesc are synthetic.
This commit is contained in:
Garrett Wollman 1995-03-16 20:23:48 +00:00
parent f1b2407b0b
commit bbf3a56610
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7095
18 changed files with 43 additions and 35 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_vfsops.c 8.3 (Berkeley) 1/31/94
* $Id: cd9660_vfsops.c,v 1.9 1994/11/14 07:01:58 bde Exp $
* $Id: cd9660_vfsops.c,v 1.10 1995/01/16 17:03:27 joerg Exp $
*/
#include <sys/param.h>
@ -70,7 +70,7 @@ struct vfsops cd9660_vfsops = {
cd9660_vptofh,
cd9660_init,
};
VFS_SET(cd9660_vfsops, cd9660, MOUNT_CD9660, 0);
VFS_SET(cd9660_vfsops, cd9660, MOUNT_CD9660, VFCF_READONLY);
/*

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94
*
* $Id: fdesc_vfsops.c,v 1.2 1994/09/21 03:46:55 wollman Exp $
* $Id: fdesc_vfsops.c,v 1.3 1995/03/16 18:13:05 bde Exp $
*/
/*
@ -287,4 +287,4 @@ struct vfsops fdesc_vfsops = {
fdesc_init,
};
VFS_SET(fdesc_vfsops, fdesc, MOUNT_FDESC, 0);
VFS_SET(fdesc_vfsops, fdesc, MOUNT_FDESC, VFCF_SYNTHETIC);

View File

@ -36,7 +36,7 @@
* @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
*
* @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
* $Id: null_vfsops.c,v 1.4 1994/10/10 07:55:28 phk Exp $
* $Id: null_vfsops.c,v 1.5 1995/03/16 18:13:31 bde Exp $
*/
/*
@ -368,4 +368,4 @@ struct vfsops null_vfsops = {
nullfs_init,
};
VFS_SET(null_vfsops, null, MOUNT_NULL, 0);
VFS_SET(null_vfsops, null, MOUNT_NULL, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vfsops.c 8.6 (Berkeley) 1/21/94
*
* $Id: portal_vfsops.c,v 1.5 1994/10/10 07:55:35 phk Exp $
* $Id: portal_vfsops.c,v 1.6 1995/03/16 18:13:38 bde Exp $
*/
/*
@ -315,4 +315,4 @@ struct vfsops portal_vfsops = {
portal_init,
};
VFS_SET(portal_vfsops, portal, MOUNT_PORTAL, 0);
VFS_SET(portal_vfsops, portal, MOUNT_PORTAL, VFCF_SYNTHETIC);

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vfsops.c 8.4 (Berkeley) 1/21/94
*
* $Id: procfs_vfsops.c,v 1.7 1995/02/20 15:53:33 davidg Exp $
* $Id: procfs_vfsops.c,v 1.8 1995/03/16 18:13:47 bde Exp $
*/
/*
@ -253,4 +253,4 @@ struct vfsops procfs_vfsops = {
procfs_init,
};
VFS_SET(procfs_vfsops, procfs, MOUNT_PROCFS, 0);
VFS_SET(procfs_vfsops, procfs, MOUNT_PROCFS, VFCF_SYNTHETIC);

View File

@ -35,7 +35,7 @@
*
* @(#)umap_vfsops.c 8.3 (Berkeley) 1/21/94
*
* $Id: umap_vfsops.c,v 1.5 1994/10/10 07:55:43 phk Exp $
* $Id: umap_vfsops.c,v 1.6 1995/03/16 18:13:55 bde Exp $
*/
/*
@ -409,5 +409,5 @@ struct vfsops umap_vfsops = {
umapfs_init,
};
VFS_SET(umap_vfsops, umap, MOUNT_UMAP, 0);
VFS_SET(umap_vfsops, umap, MOUNT_UMAP, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vfsops.c 8.7 (Berkeley) 3/5/94
* $Id: union_vfsops.c,v 1.7 1994/11/04 14:41:43 davidg Exp $
* $Id: union_vfsops.c,v 1.8 1995/03/16 18:14:02 bde Exp $
*/
/*
@ -559,4 +559,4 @@ struct vfsops union_vfsops = {
union_init,
};
VFS_SET(union_vfsops, union, MOUNT_UNION, 0);
VFS_SET(union_vfsops, union, MOUNT_UNION, VFCF_LOOPBACK);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_vfsops.c 8.3 (Berkeley) 1/31/94
* $Id: cd9660_vfsops.c,v 1.9 1994/11/14 07:01:58 bde Exp $
* $Id: cd9660_vfsops.c,v 1.10 1995/01/16 17:03:27 joerg Exp $
*/
#include <sys/param.h>
@ -70,7 +70,7 @@ struct vfsops cd9660_vfsops = {
cd9660_vptofh,
cd9660_init,
};
VFS_SET(cd9660_vfsops, cd9660, MOUNT_CD9660, 0);
VFS_SET(cd9660_vfsops, cd9660, MOUNT_CD9660, VFCF_READONLY);
/*

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94
*
* $Id: fdesc_vfsops.c,v 1.2 1994/09/21 03:46:55 wollman Exp $
* $Id: fdesc_vfsops.c,v 1.3 1995/03/16 18:13:05 bde Exp $
*/
/*
@ -287,4 +287,4 @@ struct vfsops fdesc_vfsops = {
fdesc_init,
};
VFS_SET(fdesc_vfsops, fdesc, MOUNT_FDESC, 0);
VFS_SET(fdesc_vfsops, fdesc, MOUNT_FDESC, VFCF_SYNTHETIC);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)kernfs_vfsops.c 8.4 (Berkeley) 1/21/94
* $Id: kernfs_vfsops.c,v 1.6 1994/10/02 17:48:08 phk Exp $
* $Id: kernfs_vfsops.c,v 1.7 1995/03/16 18:13:23 bde Exp $
*/
/*
@ -343,4 +343,4 @@ struct vfsops kernfs_vfsops = {
kernfs_init,
};
VFS_SET(kernfs_vfsops, kernfs, MOUNT_KERNFS, 0);
VFS_SET(kernfs_vfsops, kernfs, MOUNT_KERNFS, VFCF_SYNTHETIC);

View File

@ -36,7 +36,7 @@
* @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
*
* @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
* $Id: null_vfsops.c,v 1.4 1994/10/10 07:55:28 phk Exp $
* $Id: null_vfsops.c,v 1.5 1995/03/16 18:13:31 bde Exp $
*/
/*
@ -368,4 +368,4 @@ struct vfsops null_vfsops = {
nullfs_init,
};
VFS_SET(null_vfsops, null, MOUNT_NULL, 0);
VFS_SET(null_vfsops, null, MOUNT_NULL, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vfsops.c 8.6 (Berkeley) 1/21/94
*
* $Id: portal_vfsops.c,v 1.5 1994/10/10 07:55:35 phk Exp $
* $Id: portal_vfsops.c,v 1.6 1995/03/16 18:13:38 bde Exp $
*/
/*
@ -315,4 +315,4 @@ struct vfsops portal_vfsops = {
portal_init,
};
VFS_SET(portal_vfsops, portal, MOUNT_PORTAL, 0);
VFS_SET(portal_vfsops, portal, MOUNT_PORTAL, VFCF_SYNTHETIC);

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vfsops.c 8.4 (Berkeley) 1/21/94
*
* $Id: procfs_vfsops.c,v 1.7 1995/02/20 15:53:33 davidg Exp $
* $Id: procfs_vfsops.c,v 1.8 1995/03/16 18:13:47 bde Exp $
*/
/*
@ -253,4 +253,4 @@ struct vfsops procfs_vfsops = {
procfs_init,
};
VFS_SET(procfs_vfsops, procfs, MOUNT_PROCFS, 0);
VFS_SET(procfs_vfsops, procfs, MOUNT_PROCFS, VFCF_SYNTHETIC);

View File

@ -35,7 +35,7 @@
*
* @(#)umap_vfsops.c 8.3 (Berkeley) 1/21/94
*
* $Id: umap_vfsops.c,v 1.5 1994/10/10 07:55:43 phk Exp $
* $Id: umap_vfsops.c,v 1.6 1995/03/16 18:13:55 bde Exp $
*/
/*
@ -409,5 +409,5 @@ struct vfsops umap_vfsops = {
umapfs_init,
};
VFS_SET(umap_vfsops, umap, MOUNT_UMAP, 0);
VFS_SET(umap_vfsops, umap, MOUNT_UMAP, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vfsops.c 8.7 (Berkeley) 3/5/94
* $Id: union_vfsops.c,v 1.7 1994/11/04 14:41:43 davidg Exp $
* $Id: union_vfsops.c,v 1.8 1995/03/16 18:14:02 bde Exp $
*/
/*
@ -559,4 +559,4 @@ struct vfsops union_vfsops = {
union_init,
};
VFS_SET(union_vfsops, union, MOUNT_UNION, 0);
VFS_SET(union_vfsops, union, MOUNT_UNION, VFCF_LOOPBACK);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_vfsops.c,v 1.10 1995/01/03 07:44:10 jkh Exp $
* $Id: nfs_vfsops.c,v 1.11 1995/03/16 18:15:40 bde Exp $
*/
#include <sys/param.h>
@ -89,7 +89,7 @@ struct vfsops nfs_vfsops = {
nfs_init,
nfs_sysctl
};
VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, 0);
VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, VFCF_NETWORK);
/*
* This structure must be filled in by a primary bootstrap or bootstrap

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_vfsops.c,v 1.10 1995/01/03 07:44:10 jkh Exp $
* $Id: nfs_vfsops.c,v 1.11 1995/03/16 18:15:40 bde Exp $
*/
#include <sys/param.h>
@ -89,7 +89,7 @@ struct vfsops nfs_vfsops = {
nfs_init,
nfs_sysctl
};
VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, 0);
VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, VFCF_NETWORK);
/*
* This structure must be filled in by a primary bootstrap or bootstrap

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mount.h 8.13 (Berkeley) 3/27/94
* $Id: mount.h,v 1.13 1995/03/16 18:16:20 bde Exp $
* $Id: mount.h,v 1.14 1995/03/16 18:31:00 wollman Exp $
*/
#ifndef _SYS_MOUNT_H_
@ -203,7 +203,15 @@ struct vfsconf {
int vfc_flags;
};
/*
* NB: these flags refer to IMPLEMENTATION properties, not properties of
* any actual mounts; i.e., it does not make sense to change the flags.
*/
#define VFCF_STATIC 1 /* FS is statically compiled into kernel */
#define VFCF_NETWORK 2 /* FS may get data over the network */
#define VFCF_READONLY 4 /* writes are not implemented by FS */
#define VFCF_SYNTHETIC 8 /* data in FS does not represent real files */
#define VFCF_LOOPBACK 16 /* FS aliases some other mounted FS */
/*
* Operations supported on mounted file system.