3 * Structure definitions
5 * Copyright (C) 1997 RĂ©gis Duchesne
6 * Copyright (C) 2000 Anton Altaparmakov
9 /* Necessary forward definition */
13 #include <sys/queue.h>
14 /* Define the struct ntfs_head type */
15 LIST_HEAD(ntfs_head
,ntfs_inode
);
18 /* which files should be returned from a director listing */
19 /* only short names, no hidden files */
21 /* only long names, all-uppercase becomes all-lowercase, no hidden files */
23 /* all names except hidden files */
28 #ifdef NTFS_IN_LINUX_KERNEL
29 typedef struct ntfs_sb_info ntfs_volume
;
31 typedef struct _ntfs_volume
{
32 /* NTFS_SB_INFO_START */
33 /* Configuration provided by user at mount time */
40 /* Configuration provided by user with ntfstools */
41 ntfs_size_t partition_bias
; /* for access to underlying device */
42 /* Attribute definitions */
43 ntfs_u32 at_standard_information
;
44 ntfs_u32 at_attribute_list
;
45 ntfs_u32 at_file_name
;
46 ntfs_u32 at_volume_version
;
47 ntfs_u32 at_security_descriptor
;
48 ntfs_u32 at_volume_name
;
49 ntfs_u32 at_volume_information
;
51 ntfs_u32 at_index_root
;
52 ntfs_u32 at_index_allocation
;
54 ntfs_u32 at_symlink
; /* aka SYMBOLIC_LINK or REPARSE_POINT */
55 /* Data read from the boot file */
60 int mft_clusters_per_record
;
62 int index_clusters_per_record
;
64 /* data read from special files */
66 unsigned short *upcase
;
67 unsigned int upcase_length
;
68 /* inodes we always hold onto */
69 struct ntfs_inode
*mft_ino
;
70 struct ntfs_inode
*mftmirr
;
71 struct ntfs_inode
*bitmap
;
72 /* NTFS_SB_INFO_END */
74 int fd
; /* file descriptor for the tools */
75 void *sb
; /* pointer to super block for the kernel */
80 struct ntfs_head
*inode_hash
; /* not really a hash */
86 ntfs_cluster_t cluster
;
90 typedef struct ntfs_attribute
{
95 int size
,allocated
,initialized
,compsize
;
96 int compressed
,resident
,indexed
;
99 void *data
; /* if resident */
101 ntfs_runlist
*runlist
;
107 /* Structure to define IO to user buffer. do_read means that
108 the destination has to be written using fn_put, do_write means
109 that the destination has to read using fn_get. So, do_read is
110 from a user's point of view, while put and get are from the driver's
111 point of view. The first argument is always the destination of the IO
113 #ifdef NTFS_IN_LINUX_KERNEL
114 typedef struct ntfs_inode_info ntfs_inode
;
116 typedef struct ntfs_inode
{
118 /* NTFS_INODE_INFO_START */
119 int i_number
; /* should be really 48 bits */
120 unsigned sequence_number
;
121 unsigned char* attr
; /* array of the attributes */
122 int attr_count
; /* size of attrs[] */
123 struct ntfs_attribute
*attrs
;
124 int record_count
; /* size of records[] */
125 /* array of the record numbers of the MFT
126 whose attributes have been inserted in the inode */
131 int clusters_per_record
;
134 /* NTFS_INODE_INFO_END */
137 LIST_ENTRY(ntfs_inode
) h_next
;
142 typedef struct ntfs_io
{
144 void (*fn_put
)(struct ntfs_io
*dest
, void *buf
, ntfs_size_t
);
145 void (*fn_get
)(void *buf
, struct ntfs_io
*src
, ntfs_size_t len
);
158 } ntfs_attrlist_item
;