2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 * Linux interpretations of vnode and vfs structs.
17 typedef struct inode vnode_t
;
20 /* Map vnode fields to inode fields */
21 #define i_number i_ino
22 #define v_count i_count
27 #define v_data u.generic_ip
29 /* v_type bits map to mode bits */
36 #define VSOCK S_IFSOCK
39 /* vcexcl - used only by afs_create */
40 enum vcexcl
{ EXCL
, NONEXCL
} ;
42 /* afs_open and afs_close needs to distinguish these cases */
43 #define FWRITE O_WRONLY|O_RDWR|O_APPEND
44 #define FTRUNC O_TRUNC
46 #define IO_APPEND O_APPEND
51 /* Various mode bits */
52 #define VWRITE S_IWUSR
58 #define vfs super_block
60 typedef struct vattr
{
61 int va_type
; /* One of v_types above. */
63 unsigned long va_blocks
;
64 unsigned long va_blocksize
;
65 int va_mask
; /* AT_xxx operation to perform. */
66 umode_t va_mode
; /* mode bits. */
69 int va_fsid
; /* Not used? */
71 ino_t va_nodeid
; /* Inode number */
72 nlink_t va_nlink
; /* link count for file. */
73 struct timeval va_atime
;
74 struct timeval va_mtime
;
75 struct timeval va_ctime
;
78 #define VATTR_NULL(A) memset(A, 0, sizeof(struct vattr))
80 #ifndef HAVE_LINUX_I_SIZE_READ
81 #define i_size_read(X) ((X)->i_size)
82 #define i_size_write(X,Y) (X)->i_size = Y
85 #endif /* OSI_VFS_H_ */