5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2016 Toomas Soome <tsoome@me.com>
25 * Copyright (c) 2016 by Delphix. All rights reserved.
26 * Copyright 2016 Nexenta Systems, Inc.
27 */
28
29 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
30 /* All Rights Reserved */
31
32 /*
33 * Portions of this source code were derived from Berkeley 4.3 BSD
34 * under license from the Regents of the University of California.
35 */
36
37 #ifndef _SYS_VFS_H
38 #define _SYS_VFS_H
39
40 #include <sys/zone.h>
41 #include <sys/types.h>
42 #include <sys/t_lock.h>
43 #include <sys/cred.h>
44 #include <sys/vnode.h>
45 #include <sys/statvfs.h>
399 } vfsdef_v5;
400
401 typedef struct vfsdef_v5 vfsdef_t;
402
403 enum {
404 VFSDEF_VERSION = 5
405 };
406
407 /*
408 * flags for vfssw and vfsdef
409 */
410 #define VSW_HASPROTO 0x01 /* struct has a mount options prototype */
411 #define VSW_CANRWRO 0x02 /* file system can transition from rw to ro */
412 #define VSW_CANREMOUNT 0x04 /* file system supports remounts */
413 #define VSW_NOTZONESAFE 0x08 /* zone_enter(2) should fail for these files */
414 #define VSW_VOLATILEDEV 0x10 /* vfs_dev can change each time fs is mounted */
415 #define VSW_STATS 0x20 /* file system can collect stats */
416 #define VSW_XID 0x40 /* file system supports extended ids */
417 #define VSW_CANLOFI 0x80 /* file system supports lofi mounts */
418 #define VSW_ZMOUNT 0x100 /* file system always allowed in a zone */
419
420 #define VSW_INSTALLED 0x8000 /* this vsw is associated with a file system */
421
422 /*
423 * A flag for vfs_setpath().
424 */
425 #define VFSSP_VERBATIM 0x1 /* do not prefix the supplied path */
426
427 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
428
429 /*
430 * Private vfs data, NOT to be used by a file system implementation.
431 */
432
433 #define VFS_FEATURE_MAXSZ 4
434
435 typedef struct vfs_impl {
436 /* Counted array - Bitmap of vfs features */
437 uint32_t vi_featureset[VFS_FEATURE_MAXSZ];
438 /*
|
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2016 Toomas Soome <tsoome@me.com>
25 * Copyright (c) 2016, 2017 by Delphix. All rights reserved.
26 * Copyright 2016 Nexenta Systems, Inc.
27 */
28
29 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
30 /* All Rights Reserved */
31
32 /*
33 * Portions of this source code were derived from Berkeley 4.3 BSD
34 * under license from the Regents of the University of California.
35 */
36
37 #ifndef _SYS_VFS_H
38 #define _SYS_VFS_H
39
40 #include <sys/zone.h>
41 #include <sys/types.h>
42 #include <sys/t_lock.h>
43 #include <sys/cred.h>
44 #include <sys/vnode.h>
45 #include <sys/statvfs.h>
399 } vfsdef_v5;
400
401 typedef struct vfsdef_v5 vfsdef_t;
402
403 enum {
404 VFSDEF_VERSION = 5
405 };
406
407 /*
408 * flags for vfssw and vfsdef
409 */
410 #define VSW_HASPROTO 0x01 /* struct has a mount options prototype */
411 #define VSW_CANRWRO 0x02 /* file system can transition from rw to ro */
412 #define VSW_CANREMOUNT 0x04 /* file system supports remounts */
413 #define VSW_NOTZONESAFE 0x08 /* zone_enter(2) should fail for these files */
414 #define VSW_VOLATILEDEV 0x10 /* vfs_dev can change each time fs is mounted */
415 #define VSW_STATS 0x20 /* file system can collect stats */
416 #define VSW_XID 0x40 /* file system supports extended ids */
417 #define VSW_CANLOFI 0x80 /* file system supports lofi mounts */
418 #define VSW_ZMOUNT 0x100 /* file system always allowed in a zone */
419 #define VSW_MOUNTDEV 0x200 /* file system is mounted via device path */
420
421 #define VSW_INSTALLED 0x8000 /* this vsw is associated with a file system */
422
423 /*
424 * A flag for vfs_setpath().
425 */
426 #define VFSSP_VERBATIM 0x1 /* do not prefix the supplied path */
427
428 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
429
430 /*
431 * Private vfs data, NOT to be used by a file system implementation.
432 */
433
434 #define VFS_FEATURE_MAXSZ 4
435
436 typedef struct vfs_impl {
437 /* Counted array - Bitmap of vfs features */
438 uint32_t vi_featureset[VFS_FEATURE_MAXSZ];
439 /*
|