Deleted Added
full compact
mount.h (222167) mount.h (224290)
1/*-
2 * Copyright (c) 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)mount.h 8.21 (Berkeley) 5/20/95
1/*-
2 * Copyright (c) 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)mount.h 8.21 (Berkeley) 5/20/95
30 * $FreeBSD: head/sys/sys/mount.h 222167 2011-05-22 01:07:54Z rmacklem $
30 * $FreeBSD: head/sys/sys/mount.h 224290 2011-07-24 17:43:09Z mckusick $
31 */
32
33#ifndef _SYS_MOUNT_H_
34#define _SYS_MOUNT_H_
35
36#include <sys/ucred.h>
37#include <sys/queue.h>
38#ifdef _KERNEL

--- 122 unchanged lines hidden (view full) ---

161 struct vfsconf *mnt_vfc; /* configuration info */
162 struct vnode *mnt_vnodecovered; /* vnode we mounted on */
163 struct vnode *mnt_syncer; /* syncer vnode */
164 int mnt_ref; /* (i) Reference count */
165 struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */
166 int mnt_nvnodelistsize; /* (i) # of vnodes */
167 int mnt_writeopcount; /* (i) write syscalls pending */
168 int mnt_kern_flag; /* (i) kernel only flags */
31 */
32
33#ifndef _SYS_MOUNT_H_
34#define _SYS_MOUNT_H_
35
36#include <sys/ucred.h>
37#include <sys/queue.h>
38#ifdef _KERNEL

--- 122 unchanged lines hidden (view full) ---

161 struct vfsconf *mnt_vfc; /* configuration info */
162 struct vnode *mnt_vnodecovered; /* vnode we mounted on */
163 struct vnode *mnt_syncer; /* syncer vnode */
164 int mnt_ref; /* (i) Reference count */
165 struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */
166 int mnt_nvnodelistsize; /* (i) # of vnodes */
167 int mnt_writeopcount; /* (i) write syscalls pending */
168 int mnt_kern_flag; /* (i) kernel only flags */
169 u_int mnt_flag; /* (i) flags shared with user */
170 u_int mnt_xflag; /* (i) more flags shared with user */
169 uint64_t mnt_flag; /* (i) flags shared with user */
171 u_int mnt_noasync; /* (i) # noasync overrides */
172 struct vfsoptlist *mnt_opt; /* current mount options */
173 struct vfsoptlist *mnt_optnew; /* new options passed to fs */
174 int mnt_maxsymlinklen; /* max size of short symlink */
175 struct statfs mnt_stat; /* cache of filesystem stats */
176 struct ucred *mnt_cred; /* credentials of mounter */
177 void * mnt_data; /* private data */
178 time_t mnt_time; /* last time written*/

--- 40 unchanged lines hidden (view full) ---

219 wakeup((mp)); \
220} while (0)
221
222#endif /* _KERNEL */
223
224/*
225 * User specifiable flags, stored in mnt_flag.
226 */
170 u_int mnt_noasync; /* (i) # noasync overrides */
171 struct vfsoptlist *mnt_opt; /* current mount options */
172 struct vfsoptlist *mnt_optnew; /* new options passed to fs */
173 int mnt_maxsymlinklen; /* max size of short symlink */
174 struct statfs mnt_stat; /* cache of filesystem stats */
175 struct ucred *mnt_cred; /* credentials of mounter */
176 void * mnt_data; /* private data */
177 time_t mnt_time; /* last time written*/

--- 40 unchanged lines hidden (view full) ---

218 wakeup((mp)); \
219} while (0)
220
221#endif /* _KERNEL */
222
223/*
224 * User specifiable flags, stored in mnt_flag.
225 */
227#define MNT_RDONLY 0x00000001 /* read only filesystem */
228#define MNT_SYNCHRONOUS 0x00000002 /* filesystem written synchronously */
229#define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */
230#define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */
231#define MNT_UNION 0x00000020 /* union with underlying filesystem */
232#define MNT_ASYNC 0x00000040 /* filesystem written asynchronously */
233#define MNT_SUIDDIR 0x00100000 /* special handling of SUID on dirs */
234#define MNT_SOFTDEP 0x00200000 /* soft updates being done */
235#define MNT_NOSYMFOLLOW 0x00400000 /* do not follow symlinks */
236#define MNT_GJOURNAL 0x02000000 /* GEOM journal support enabled */
237#define MNT_MULTILABEL 0x04000000 /* MAC support for individual objects */
238#define MNT_ACLS 0x08000000 /* ACL support enabled */
239#define MNT_NOATIME 0x10000000 /* disable update of file access time */
240#define MNT_NOCLUSTERR 0x40000000 /* disable cluster read */
241#define MNT_NOCLUSTERW 0x80000000 /* disable cluster write */
242#define MNT_NFS4ACLS 0x00000010
226#define MNT_RDONLY 0x0000000000000001ULL /* read only filesystem */
227#define MNT_SYNCHRONOUS 0x0000000000000002ULL /* fs written synchronously */
228#define MNT_NOEXEC 0x0000000000000004ULL /* can't exec from filesystem */
229#define MNT_NOSUID 0x0000000000000008ULL /* don't honor setuid fs bits */
230#define MNT_NFS4ACLS 0x0000000000000010ULL /* enable NFS version 4 ACLs */
231#define MNT_UNION 0x0000000000000020ULL /* union with underlying fs */
232#define MNT_ASYNC 0x0000000000000040ULL /* fs written asynchronously */
233#define MNT_SUIDDIR 0x0000000000100000ULL /* special SUID dir handling */
234#define MNT_SOFTDEP 0x0000000000200000ULL /* using soft updates */
235#define MNT_NOSYMFOLLOW 0x0000000000400000ULL /* do not follow symlinks */
236#define MNT_GJOURNAL 0x0000000002000000ULL /* GEOM journal support enabled */
237#define MNT_MULTILABEL 0x0000000004000000ULL /* MAC support for objects */
238#define MNT_ACLS 0x0000000008000000ULL /* ACL support enabled */
239#define MNT_NOATIME 0x0000000010000000ULL /* dont update file access time */
240#define MNT_NOCLUSTERR 0x0000000040000000ULL /* disable cluster read */
241#define MNT_NOCLUSTERW 0x0000000080000000ULL /* disable cluster write */
243
244/*
245 * NFS export related mount flags.
246 */
242
243/*
244 * NFS export related mount flags.
245 */
247#define MNT_EXRDONLY 0x00000080 /* exported read only */
248#define MNT_EXPORTED 0x00000100 /* filesystem is exported */
249#define MNT_DEFEXPORTED 0x00000200 /* exported to the world */
250#define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */
251#define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */
252#define MNT_EXPUBLIC 0x20000000 /* public export (WebNFS) */
246#define MNT_EXRDONLY 0x0000000000000080ULL /* exported read only */
247#define MNT_EXPORTED 0x0000000000000100ULL /* filesystem is exported */
248#define MNT_DEFEXPORTED 0x0000000000000200ULL /* exported to the world */
249#define MNT_EXPORTANON 0x0000000000000400ULL /* anon uid mapping for all */
250#define MNT_EXKERB 0x0000000000000800ULL /* exported with Kerberos */
251#define MNT_EXPUBLIC 0x0000000020000000ULL /* public export (WebNFS) */
253
254/*
255 * Flags set by internal operations,
256 * but visible to the user.
257 * XXX some of these are not quite right.. (I've never seen the root flag set)
258 */
252
253/*
254 * Flags set by internal operations,
255 * but visible to the user.
256 * XXX some of these are not quite right.. (I've never seen the root flag set)
257 */
259#define MNT_LOCAL 0x00001000 /* filesystem is stored locally */
260#define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */
261#define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */
262#define MNT_USER 0x00008000 /* mounted by a user */
263#define MNT_IGNORE 0x00800000 /* do not show entry in df */
258#define MNT_LOCAL 0x0000000000001000ULL /* filesystem is stored locally */
259#define MNT_QUOTA 0x0000000000002000ULL /* quotas are enabled on fs */
260#define MNT_ROOTFS 0x0000000000004000ULL /* identifies the root fs */
261#define MNT_USER 0x0000000000008000ULL /* mounted by a user */
262#define MNT_IGNORE 0x0000000000800000ULL /* do not show entry in df */
264
265/*
266 * Mask of flags that are visible to statfs().
267 * XXX I think that this could now become (~(MNT_CMDFLAGS))
268 * but the 'mount' program may need changing to handle this.
269 */
270#define MNT_VISFLAGMASK (MNT_RDONLY | MNT_SYNCHRONOUS | MNT_NOEXEC | \
271 MNT_NOSUID | MNT_UNION | \

--- 16 unchanged lines hidden (view full) ---

288
289/*
290 * External filesystem command modifier flags.
291 * Unmount can use the MNT_FORCE flag.
292 * XXX: These are not STATES and really should be somewhere else.
293 * XXX: MNT_BYFSID collides with MNT_ACLS, but because MNT_ACLS is only used for
294 * mount(2) and MNT_BYFSID is only used for unmount(2) it's harmless.
295 */
263
264/*
265 * Mask of flags that are visible to statfs().
266 * XXX I think that this could now become (~(MNT_CMDFLAGS))
267 * but the 'mount' program may need changing to handle this.
268 */
269#define MNT_VISFLAGMASK (MNT_RDONLY | MNT_SYNCHRONOUS | MNT_NOEXEC | \
270 MNT_NOSUID | MNT_UNION | \

--- 16 unchanged lines hidden (view full) ---

287
288/*
289 * External filesystem command modifier flags.
290 * Unmount can use the MNT_FORCE flag.
291 * XXX: These are not STATES and really should be somewhere else.
292 * XXX: MNT_BYFSID collides with MNT_ACLS, but because MNT_ACLS is only used for
293 * mount(2) and MNT_BYFSID is only used for unmount(2) it's harmless.
294 */
296#define MNT_UPDATE 0x00010000 /* not a real mount, just an update */
297#define MNT_DELEXPORT 0x00020000 /* delete export host lists */
298#define MNT_RELOAD 0x00040000 /* reload filesystem data */
299#define MNT_FORCE 0x00080000 /* force unmount or readonly change */
300#define MNT_SNAPSHOT 0x01000000 /* snapshot the filesystem */
301#define MNT_BYFSID 0x08000000 /* specify filesystem by ID. */
295#define MNT_UPDATE 0x0000000000010000ULL /* not real mount, just update */
296#define MNT_DELEXPORT 0x0000000000020000ULL /* delete export host lists */
297#define MNT_RELOAD 0x0000000000040000ULL /* reload filesystem data */
298#define MNT_FORCE 0x0000000000080000ULL /* force unmount or readonly */
299#define MNT_SNAPSHOT 0x0000000001000000ULL /* snapshot the filesystem */
300#define MNT_BYFSID 0x0000000008000000ULL /* specify filesystem by ID. */
302#define MNT_CMDFLAGS (MNT_UPDATE | MNT_DELEXPORT | MNT_RELOAD | \
303 MNT_FORCE | MNT_SNAPSHOT | MNT_BYFSID)
304/*
305 * Internal filesystem control flags stored in mnt_kern_flag.
306 *
307 * MNTK_UNMOUNT locks the mount entry so that name lookup cannot proceed
308 * past the mount point. This keeps the subtree stable during mounts
309 * and unmounts.

--- 400 unchanged lines hidden (view full) ---

710void statfs_scale_blocks(struct statfs *sf, long max_size);
711struct vfsconf *vfs_byname(const char *);
712struct vfsconf *vfs_byname_kld(const char *, struct thread *td, int *);
713void vfs_mount_destroy(struct mount *);
714void vfs_event_signal(fsid_t *, u_int32_t, intptr_t);
715void vfs_freeopts(struct vfsoptlist *opts);
716void vfs_deleteopt(struct vfsoptlist *opts, const char *name);
717int vfs_buildopts(struct uio *auio, struct vfsoptlist **options);
301#define MNT_CMDFLAGS (MNT_UPDATE | MNT_DELEXPORT | MNT_RELOAD | \
302 MNT_FORCE | MNT_SNAPSHOT | MNT_BYFSID)
303/*
304 * Internal filesystem control flags stored in mnt_kern_flag.
305 *
306 * MNTK_UNMOUNT locks the mount entry so that name lookup cannot proceed
307 * past the mount point. This keeps the subtree stable during mounts
308 * and unmounts.

--- 400 unchanged lines hidden (view full) ---

709void statfs_scale_blocks(struct statfs *sf, long max_size);
710struct vfsconf *vfs_byname(const char *);
711struct vfsconf *vfs_byname_kld(const char *, struct thread *td, int *);
712void vfs_mount_destroy(struct mount *);
713void vfs_event_signal(fsid_t *, u_int32_t, intptr_t);
714void vfs_freeopts(struct vfsoptlist *opts);
715void vfs_deleteopt(struct vfsoptlist *opts, const char *name);
716int vfs_buildopts(struct uio *auio, struct vfsoptlist **options);
718int vfs_flagopt(struct vfsoptlist *opts, const char *name, u_int *w, u_int val);
717int vfs_flagopt(struct vfsoptlist *opts, const char *name, uint64_t *w,
718 uint64_t val);
719int vfs_getopt(struct vfsoptlist *, const char *, void **, int *);
720int vfs_getopt_pos(struct vfsoptlist *opts, const char *name);
721char *vfs_getopts(struct vfsoptlist *, const char *, int *error);
722int vfs_copyopt(struct vfsoptlist *, const char *, void *, int);
723int vfs_filteropt(struct vfsoptlist *, const char **legal);
724void vfs_opterror(struct vfsoptlist *opts, const char *fmt, ...);
725int vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...);
726int vfs_setopt(struct vfsoptlist *opts, const char *name, void *value,

--- 80 unchanged lines hidden ---
719int vfs_getopt(struct vfsoptlist *, const char *, void **, int *);
720int vfs_getopt_pos(struct vfsoptlist *opts, const char *name);
721char *vfs_getopts(struct vfsoptlist *, const char *, int *error);
722int vfs_copyopt(struct vfsoptlist *, const char *, void *, int);
723int vfs_filteropt(struct vfsoptlist *, const char **legal);
724void vfs_opterror(struct vfsoptlist *opts, const char *fmt, ...);
725int vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...);
726int vfs_setopt(struct vfsoptlist *opts, const char *name, void *value,

--- 80 unchanged lines hidden ---