1 #ifndef _LINUX_NTFS_FS_I_H 2 #define _LINUX_NTFS_FS_I_H 3 4 #include <linux/types.h> 5 6 /* Forward declarations, to keep number of mutual includes low */ 7 struct ntfs_attribute; 8 struct ntfs_sb_info; 9 10 /* Duplicate definitions from ntfs/ntfstypes.h */ 11 #ifndef NTFS_INTEGRAL_TYPES 12 #define NTFS_INTEGRAL_TYPES 13 typedef u8 ntfs_u8; 14 typedef u16 ntfs_u16; 15 typedef u32 ntfs_u32; 16 typedef u64 ntfs_u64; 17 typedef s8 ntfs_s8; 18 typedef s16 ntfs_s16; 19 typedef s32 ntfs_s32; 20 typedef s64 ntfs_s64; 21 #endif 22 23 #ifndef NTMODE_T 24 #define NTMODE_T 25 typedef __kernel_mode_t ntmode_t; 26 #endif 27 #ifndef NTFS_UID_T 28 #define NTFS_UID_T 29 typedef uid_t ntfs_uid_t; 30 #endif 31 #ifndef NTFS_GID_T 32 #define NTFS_GID_T 33 typedef gid_t ntfs_gid_t; 34 #endif 35 #ifndef NTFS_SIZE_T 36 #define NTFS_SIZE_T 37 typedef __kernel_size_t ntfs_size_t; 38 #endif 39 #ifndef NTFS_TIME_T 40 #define NTFS_TIME_T 41 typedef __kernel_time_t ntfs_time_t; 42 #endif 43 44 /* unicode character type */ 45 #ifndef NTFS_WCHAR_T 46 #define NTFS_WCHAR_T 47 typedef u16 ntfs_wchar_t; 48 #endif 49 /* file offset */ 50 #ifndef NTFS_OFFSET_T 51 #define NTFS_OFFSET_T 52 typedef s64 ntfs_offset_t; 53 #endif 54 /* UTC */ 55 #ifndef NTFS_TIME64_T 56 #define NTFS_TIME64_T 57 typedef u64 ntfs_time64_t; 58 #endif 59 /* 60 * This is really signed long long. So we support only volumes up to 2Tb. This 61 * is ok as Win2k also only uses 32-bits to store clusters. 62 * Whatever you do keep this a SIGNED value or a lot of NTFS users with 63 * corrupted filesystems will lynch you! It causes massive fs corruption when 64 * unsigned due to the nature of many checks relying on being performed on 65 * signed quantities. (AIA) 66 */ 67 #ifndef NTFS_CLUSTER_T 68 #define NTFS_CLUSTER_T 69 typedef s32 ntfs_cluster_t; 70 #endif 71 72 /* Definition of the NTFS in-memory inode structure. */ 73 struct ntfs_inode_info { 74 struct ntfs_sb_info *vol; 75 unsigned long i_number; /* Should be really 48 bits. */ 76 __u16 sequence_number; /* The current sequence number. */ 77 unsigned char *attr; /* Array of the attributes. */ 78 int attr_count; /* Size of attrs[]. */ 79 struct ntfs_attribute *attrs; 80 int record_count; /* Size of records[]. */ 81 int *records; /* Array of the record numbers of the $Mft whose 82 * attributes have been inserted in the inode. */ 83 union { 84 struct { 85 int recordsize; 86 int clusters_per_record; 87 } index; 88 } u; 89 }; 90 91 #endif 92