minix/servers/vfs/vnode.h
Thomas Veerman 3ff8349d7d VFS: use 64-bit file offsets in all requests
As the current File Servers don't yet support file sizes > 2^31-1
(except for ext2 with some work), the VFS-FS protocol negotioting
field now has a field that FSes can use to indicate they do support
64-bit off_t. When they do, VFS will accept 64-bit results. Otherwise
VFS will zero out the upper 32 bits.

The previous commit contained a hack to support truncate for dynamically
linked binaries. This commit removes it as it's no longer necessary.
Change-Id: I07189d410094b193cb7bbd3f2507537bb1e7f96c
2013-03-28 21:12:18 +00:00

30 lines
1.2 KiB
C

#ifndef __VFS_VNODE_H__
#define __VFS_VNODE_H__
EXTERN struct vnode {
endpoint_t v_fs_e; /* FS process' endpoint number */
endpoint_t v_mapfs_e; /* mapped FS process' endpoint number */
ino_t v_inode_nr; /* inode number on its (minor) device */
ino_t v_mapinode_nr; /* mapped inode number of mapped FS. */
mode_t v_mode; /* file type, protection, etc. */
uid_t v_uid; /* uid of inode. */
gid_t v_gid; /* gid of inode. */
off_t v_size; /* current file size in bytes */
int v_ref_count; /* # times vnode used; 0 means slot is free */
int v_fs_count; /* # reference at the underlying FS */
int v_mapfs_count; /* # reference at the underlying mapped FS */
endpoint_t v_bfs_e; /* endpoint number for the FS proces in case
of a block special file */
dev_t v_dev; /* device number on which the corresponding
inode resides */
dev_t v_sdev; /* device number for special files */
struct vmnt *v_vmnt; /* vmnt object of the partition */
tll_t v_lock; /* three-level-lock */
} vnode[NR_VNODES];
/* vnode lock types mapping */
#define VNODE_READ TLL_READ
#define VNODE_OPCL TLL_READSER
#define VNODE_WRITE TLL_WRITE
#endif