diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fs/fs_subr.h | 4 | ||||
-rw-r--r-- | include/sys/file.h | 4 | ||||
-rw-r--r-- | include/sys/mkdev.h | 4 | ||||
-rw-r--r-- | include/sys/mntent.h | 4 | ||||
-rw-r--r-- | include/sys/mode.h | 4 | ||||
-rw-r--r-- | include/sys/pathname.h | 11 | ||||
-rw-r--r-- | include/sys/unistd.h | 4 | ||||
-rw-r--r-- | include/sys/vfs_opreg.h | 4 | ||||
-rw-r--r-- | include/sys/vmsystm.h | 3 | ||||
-rw-r--r-- | include/sys/vnode.h | 24 | ||||
-rw-r--r-- | include/vm/anon.h | 6 | ||||
-rw-r--r-- | include/vm/pvn.h | 4 |
12 files changed, 68 insertions, 8 deletions
diff --git a/include/fs/fs_subr.h b/include/fs/fs_subr.h new file mode 100644 index 000000000..2a7307638 --- /dev/null +++ b/include/fs/fs_subr.h @@ -0,0 +1,4 @@ +#ifndef _SPL_FS_FS_SUBR_H +#define _SPL_FS_FS_SUBR_H + +#endif /* SPL_FS_FS_SUBR_H */ diff --git a/include/sys/file.h b/include/sys/file.h new file mode 100644 index 000000000..63d662237 --- /dev/null +++ b/include/sys/file.h @@ -0,0 +1,4 @@ +#ifndef _SPL_FILE_H +#define _SPL_FILE_H + +#endif /* SPL_FILE_H */ diff --git a/include/sys/mkdev.h b/include/sys/mkdev.h new file mode 100644 index 000000000..f92ad08fa --- /dev/null +++ b/include/sys/mkdev.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MKDEV_H +#define _SPL_MKDEV_H + +#endif /* SPL_MKDEV_H */ diff --git a/include/sys/mntent.h b/include/sys/mntent.h new file mode 100644 index 000000000..b124e342b --- /dev/null +++ b/include/sys/mntent.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MNTENT_H +#define _SPL_MNTENT_H + +#endif /* SPL_MNTENT_H */ diff --git a/include/sys/mode.h b/include/sys/mode.h new file mode 100644 index 000000000..7ca1b4889 --- /dev/null +++ b/include/sys/mode.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MODE_H +#define _SPL_MODE_H + +#endif /* SPL_MODE_H */ diff --git a/include/sys/pathname.h b/include/sys/pathname.h new file mode 100644 index 000000000..ffdf585b8 --- /dev/null +++ b/include/sys/pathname.h @@ -0,0 +1,11 @@ +#ifndef _SPL_PATHNAME_H +#define _SPL_PATHNAME_H + +typedef struct pathname { + char *pn_buf; /* underlying storage */ + char *pn_path; /* remaining pathname */ + size_t pn_pathlen; /* remaining length */ + size_t pn_bufsize; /* total size of pn_buf */ +} pathname_t; + +#endif /* SPL_PATHNAME_H */ diff --git a/include/sys/unistd.h b/include/sys/unistd.h new file mode 100644 index 000000000..c6b298a34 --- /dev/null +++ b/include/sys/unistd.h @@ -0,0 +1,4 @@ +#ifndef _SPL_UNISTD_H +#define _SPL_UNISTD_H + +#endif /* SPL_UNISTD_H */ diff --git a/include/sys/vfs_opreg.h b/include/sys/vfs_opreg.h new file mode 100644 index 000000000..8f3f556cb --- /dev/null +++ b/include/sys/vfs_opreg.h @@ -0,0 +1,4 @@ +#ifndef _SPL_OPREG_H +#define _SPL_OPREG_H + +#endif /* SPL_OPREG_H */ diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index bb23da965..443c376c9 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -2,6 +2,9 @@ #define _SPL_VMSYSTM_H #include <linux/mm.h> +#include <sys/types.h> + +extern vmem_t *zio_alloc_arena; /* arena for zio caches */ #define physmem num_physpages #define ptob(pages) (pages * PAGE_SIZE) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 6a1ba0a25..3ec11abe2 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -9,6 +9,8 @@ #include <linux/dcache.h> #include <linux/namei.h> #include <linux/fs.h> +#include <sys/kmem.h> +#include <sys/mutex.h> #include <sys/types.h> #include <sys/time.h> #include <sys/uio.h> @@ -72,11 +74,6 @@ typedef enum vtype { VBAD = 11 } vtype_t; -typedef struct vnode { - struct file *v_fp; - vtype_t v_type; -} vnode_t; - typedef struct vattr { enum vtype va_type; /* vnode type */ u_int va_mask; /* attribute bit-mask */ @@ -130,6 +127,20 @@ typedef struct vsecattr { size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ } vsecattr_t; +typedef struct vnode { + struct file *v_fp; + kmutex_t v_lock; /* protects vnode fields */ + uint_t v_flag; /* vnode flags (see below) */ + uint_t v_count; /* reference count */ + void *v_data; /* private data for fs */ + struct vfs *v_vfsp; /* ptr to containing VFS */ + struct stdata *v_stream; /* associated stream */ + enum vtype v_type; /* vnode type */ + dev_t v_rdev; /* device (VCHR, VBLK) */ +} vnode_t; + +extern vnode_t *vn_alloc(int flag); +void vn_free(vnode_t *vp); extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2); extern int vn_openat(const char *path, uio_seg_t seg, int flags, int mode, @@ -143,6 +154,9 @@ extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); +int vn_init(void); +void vn_fini(void); + static __inline__ int vn_rele(vnode_t *vp) { diff --git a/include/vm/anon.h b/include/vm/anon.h index 81c585a6a..0198e729e 100644 --- a/include/vm/anon.h +++ b/include/vm/anon.h @@ -1,4 +1,4 @@ -#ifndef _SPL_ANON_H -#define _SPL_ANON_H +#ifndef _SPL_VM_ANON_H +#define _SPL_VM_ANON_H -#endif /* SPL_ANON_H */ +#endif /* SPL_VM_ANON_H */ diff --git a/include/vm/pvn.h b/include/vm/pvn.h new file mode 100644 index 000000000..e89ee1748 --- /dev/null +++ b/include/vm/pvn.h @@ -0,0 +1,4 @@ +#ifndef _SPL_VM_PVN_H +#define _SPL_VM_PVN_H + +#endif /* SPL_VM_PVN_H */ |