Move core man pages 1M -> 8
[unleashed.git] / include / sys / fs / bootfs_impl.h
blob528e0f25a09f22a0e3f1670bce4508aeea672db4
1 /*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright (c) 2014 Joyent, Inc. All rights reserved.
16 #ifndef _SYS_FS_BOOTFS_IMPL_H
17 #define _SYS_FS_BOOTFS_IMPL_H
19 #include <sys/types.h>
20 #include <sys/list.h>
21 #include <sys/avl.h>
22 #include <sys/vnode.h>
23 #include <sys/vfs.h>
24 #include <sys/kstat.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
31 * The bootfs node is the file system specific version of the vnode for the
32 * bootfs file system. Because the bootfs file system is entirely a read-only
33 * file system, this structure requires no locking as the contents are
34 * immutable.
36 typedef struct bootfs_node {
37 char *bvn_name; /* entry name */
38 struct vnode *bvn_vnp; /* Corresponding vnode */
39 avl_tree_t bvn_dir; /* directory entries, if VDIR */
40 avl_node_t bvn_link; /* dirent link */
41 list_node_t bvn_alink; /* link for all nodes */
42 uint64_t bvn_addr; /* Address in pmem */
43 uint64_t bvn_size; /* Size of the file */
44 struct bootfs_node *bvn_parent; /* .. */
45 vattr_t bvn_attr; /* attributes for the node */
46 } bootfs_node_t;
48 typedef struct bootfs_stat {
49 kstat_named_t bfss_nfiles;
50 kstat_named_t bfss_ndirs;
51 kstat_named_t bfss_nbytes;
52 kstat_named_t bfss_ndups;
53 kstat_named_t bfss_ndiscards;
54 } bootfs_stat_t;
56 typedef struct bootfs {
57 vfs_t *bfs_vfsp;
58 char *bfs_mntpath;
59 bootfs_node_t *bfs_rootvn;
60 kstat_t *bfs_kstat;
61 list_t bfs_nodes;
62 minor_t bfs_minor;
63 uint_t bfs_ninode;
64 bootfs_stat_t bfs_stat;
65 } bootfs_t;
67 extern void bootfs_construct(bootfs_t *);
68 extern void bootfs_destruct(bootfs_t *);
69 extern int bootfs_node_constructor(void *, void *, int);
70 extern void bootfs_node_destructor(void *, void *);
72 extern const struct vnodeops bootfs_vnodeops;
73 extern kmem_cache_t *bootfs_node_cache;
74 extern major_t bootfs_major;
76 #ifdef __cplusplus
78 #endif
80 #endif /* _SYS_FS_BOOTFS_IMPL_H */