minor fixes for safecopy & safemap tests
[minix.git] / servers / vfs / vnode.h
blobbcea1f063342e869b8a520154be10b72f0f8a6f2
1 #ifndef __VFS_VNODE_H__
2 #define __VFS_VNODE_H__
4 EXTERN struct vnode {
5 endpoint_t v_fs_e; /* FS process' endpoint number */
6 endpoint_t v_mapfs_e; /* mapped FS process' endpoint number */
7 ino_t v_inode_nr; /* inode number on its (minor) device */
8 ino_t v_mapinode_nr; /* mapped inode number of mapped FS. */
9 mode_t v_mode; /* file type, protection, etc. */
10 uid_t v_uid; /* uid of inode. */
11 gid_t v_gid; /* gid of inode. */
12 off_t v_size; /* current file size in bytes */
13 int v_ref_count; /* # times vnode used; 0 means slot is free */
14 int v_fs_count; /* # reference at the underlying FS */
15 int v_mapfs_count; /* # reference at the underlying mapped FS */
16 #if 0
17 int v_ref_check; /* for consistency checks */
18 #endif
19 off_t v_pipe_rd_pos;
20 off_t v_pipe_wr_pos;
21 endpoint_t v_bfs_e; /* endpoint number for the FS proces in case
22 of a block special file */
23 dev_t v_dev; /* device number on which the corresponding
24 inode resides */
25 dev_t v_sdev; /* device number for special files */
26 struct vmnt *v_vmnt; /* vmnt object of the partition */
27 tll_t v_lock; /* three-level-lock */
28 } vnode[NR_VNODES];
30 /* vnode lock types mapping */
31 #define VNODE_READ TLL_READ
32 #define VNODE_OPCL TLL_READSER
33 #define VNODE_WRITE TLL_WRITE
34 #endif