3 * Structure definitions
5 * Copyright (C) 1997 RĂ©gis Duchesne
8 /* Necessary forward definition */
12 #include <sys/queue.h>
13 /* Define the struct ntfs_head type */
14 LIST_HEAD(ntfs_head
,ntfs_inode
);
17 /* which files should be returned from a director listing */
18 /* only short names, no hidden files */
20 /* only long names, all-uppercase becomes all-lowercase, no hidden files */
22 /* all names except hidden files */
27 #ifdef NTFS_IN_LINUX_KERNEL
28 typedef struct ntfs_sb_info ntfs_volume
;
30 typedef struct _ntfs_volume
{
31 /* NTFS_SB_INFO_START */
32 /* Configuration provided by user at mount time */
39 /* Configuration provided by user with ntfstools */
40 ntfs_size_t partition_bias
; /* for access to underlying device */
41 /* Attribute definitions */
42 ntfs_u32 at_standard_information
;
43 ntfs_u32 at_attribute_list
;
44 ntfs_u32 at_file_name
;
45 ntfs_u32 at_security_descriptor
;
47 ntfs_u32 at_index_root
;
48 ntfs_u32 at_index_allocation
;
50 ntfs_u32 at_symlink
; /* aka SYMBOLIC_LINK or REPARSE_POINT */
51 /* Data read from the boot file */
56 int mft_clusters_per_record
;
58 int index_clusters_per_record
;
60 /* data read from special files */
62 unsigned short *upcase
;
63 unsigned int upcase_length
;
64 /* inodes we always hold onto */
65 struct ntfs_inode
*mft_ino
;
66 struct ntfs_inode
*mftmirr
;
67 struct ntfs_inode
*bitmap
;
68 /* NTFS_SB_INFO_END */
70 int fd
; /* file descriptor for the tools */
71 void *sb
; /* pointer to super block for the kernel */
76 struct ntfs_head
*inode_hash
; /* not really a hash */
82 ntfs_cluster_t cluster
;
86 typedef struct ntfs_attribute
{
91 int size
,allocated
,initialized
,compsize
;
92 int compressed
,resident
,indexed
;
95 void *data
; /* if resident */
97 ntfs_runlist
*runlist
;
103 /* Structure to define IO to user buffer. do_read means that
104 the destination has to be written using fn_put, do_write means
105 that the destination has to read using fn_get. So, do_read is
106 from a user's point of view, while put and get are from the driver's
107 point of view. The first argument is always the destination of the IO
109 #ifdef NTFS_IN_LINUX_KERNEL
110 typedef struct ntfs_inode_info ntfs_inode
;
112 typedef struct ntfs_inode
{
114 /* NTFS_INODE_INFO_START */
115 int i_number
; /* should be really 48 bits */
116 unsigned sequence_number
;
117 unsigned char* attr
; /* array of the attributes */
118 int attr_count
; /* size of attrs[] */
119 struct ntfs_attribute
*attrs
;
120 int record_count
; /* size of records[] */
121 /* array of the record numbers of the MFT
122 whose attributes have been inserted in the inode */
127 int clusters_per_record
;
130 /* NTFS_INODE_INFO_END */
133 LIST_ENTRY(ntfs_inode
) h_next
;
138 typedef struct ntfs_io
{
140 void (*fn_put
)(struct ntfs_io
*dest
, void *buf
, ntfs_size_t
);
141 void (*fn_get
)(void *buf
, struct ntfs_io
*src
, ntfs_size_t len
);
154 } ntfs_attrlist_item
;