ntfs_inode.h revision 43552
1/*- 2 * Copyright (c) 1998, 1999 Semen Ustimenko 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * $Id: ntfs_inode.h,v 1.8 1999/02/02 01:54:54 semen Exp $ 27 */ 28 29/* These flags are kept in i_flag. */ 30#if __FreeBSD_version >= 300000 31#define IN_ACCESS 0x0001 /* Access time update request. */ 32#define IN_CHANGE 0x0002 /* Inode change time update request. */ 33#define IN_UPDATE 0x0004 /* Modification time update request. */ 34#define IN_MODIFIED 0x0008 /* Inode has been modified. */ 35#define IN_RENAME 0x0010 /* Inode is being renamed. */ 36#define IN_SHLOCK 0x0020 /* File has shared lock. */ 37#define IN_EXLOCK 0x0040 /* File has exclusive lock. */ 38#define IN_HASHED 0x0080 /* Inode is on hash list */ 39#define IN_LAZYMOD 0x0100 /* Modified, but don't write yet. */ 40#else 41#define IN_ACCESS 0x0001 /* Access time update request. */ 42#define IN_CHANGE 0x0002 /* Inode change time update request. */ 43#define IN_EXLOCK 0x0004 /* File has exclusive lock. */ 44#define IN_LOCKED 0x0008 /* Inode lock. */ 45#define IN_LWAIT 0x0010 /* Process waiting on file lock. */ 46#define IN_MODIFIED 0x0020 /* Inode has been modified. */ 47#define IN_RENAME 0x0040 /* Inode is being renamed. */ 48#define IN_SHLOCK 0x0080 /* File has shared lock. */ 49#define IN_UPDATE 0x0100 /* Modification time update request. */ 50#define IN_WANTED 0x0200 /* Inode is wanted by a process. */ 51#define IN_RECURSE 0x0400 /* Recursion expected */ 52#endif 53 54#define IN_LOADED 0x8000 /* ntvattrs loaded */ 55#define IN_PRELOADED 0x4000 /* loaded from directory entry */ 56#define IN_AATTRNAME 0x2000 /* spaec allocated for i_defattrname */ 57 58struct ntnode { 59#if __FreeBSD_version >= 300000 60 struct lock i_lock; /* Must be first */ 61#endif 62 LIST_ENTRY(ntnode) i_hash; 63 struct ntnode *i_next; 64 struct ntnode **i_prev; 65 struct vnode *i_vnode; 66 struct vnode *i_devvp; 67 struct ntfsmount *i_mp; 68 enum vtype i_type; 69 dev_t i_dev; 70 ino_t i_number; 71 u_int32_t i_flag; 72 73 long i_nlink; /* MFR */ 74 ino_t i_mainrec; /* MFR */ 75 u_int32_t i_frflag; /* MFR */ 76 ntfs_times_t i_times; /* $NAME/dirinfo */ 77 ino_t i_pnumber; /* $NAME/dirinfo */ 78 u_int32_t i_fflag; /* $NAME/dirinfo */ 79 u_int64_t i_size; /* defattr/dirinfo: */ 80 u_int64_t i_allocated; /* defattr/dirinfo */ 81 82 u_int32_t i_lastdattr; 83 u_int32_t i_lastdblnum; 84 u_int32_t i_lastdoff; 85 u_int32_t i_lastdnum; 86 caddr_t i_dirblbuf; 87 u_int32_t i_dirblsz; 88 89 uid_t i_uid; 90 gid_t i_gid; 91 mode_t i_mode; 92 93 u_int32_t i_defattr; 94 char *i_defattrname; 95 struct ntvattr *i_vattrp; 96 97 int i_lockcount; /* Process lock count (recursion) */ 98 pid_t i_lockholder; /* DEBUG: holder of ntnode lock. */ 99 pid_t i_lockwaiter; /* DEBUG: waiter of ntnode lock. */ 100}; 101