import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / fs / ntfs / struct.h
1 /*
2  * struct.h - Structure definitions
3  *
4  * Copyright (C) 1997 RĂ©gis Duchesne
5  * Copyright (C) 2000-2001 Anton Altaparmakov (AIA)
6  */
7 #include <linux/ntfs_fs.h>
8
9 /* Necessary forward definition. */
10 struct ntfs_inode;
11
12 /* Which files should be returned from a director listing. */
13 #define ngt_dos   1     /* only short names, no system files */
14 #define ngt_nt    2     /* only long names, all-uppercase becomes 
15                          * all-lowercase, no system files */
16 #define ngt_posix 3     /* all names except system files */
17 #define ngt_full  4     /* all entries */
18
19 typedef struct ntfs_sb_info ntfs_volume;
20
21 typedef struct {
22         ntfs_cluster_t lcn;
23         ntfs_cluster_t len;
24 } ntfs_runlist;
25
26 typedef struct ntfs_attribute {
27         int type;
28         ntfs_u16 *name;
29         int namelen;
30         int attrno;
31         __s64 size, allocated, initialized, compsize;
32         ATTR_FLAGS flags;
33         __u8 resident, indexed;
34         int cengine;
35         union {
36                 void *data;             /* if resident */
37                 struct {
38                         ntfs_runlist *runlist;
39                         unsigned long len;
40                 } r;
41         } d;
42 } ntfs_attribute;
43
44 typedef struct ntfs_inode_info ntfs_inode;
45
46 /* Structure to define IO to user buffer. do_read means that the destination
47  * has to be written using fn_put, do_write means that the destination has to
48  * read using fn_get. So, do_read is from a user's point of view, while put and
49  * get are from the driver's point of view. The first argument is always the
50  * destination of the IO. */
51 typedef struct ntfs_io{
52         int do_read;
53         void (*fn_put)(struct ntfs_io *dest, void *buf, ntfs_size_t);
54         void (*fn_get)(void *buf, struct ntfs_io *src, ntfs_size_t len);
55         void *param;
56         unsigned long size;
57 } ntfs_io;
58
59 #if 0
60 typedef struct {
61         ntfs_volume *vol;
62         ntfs_inode *ino;
63         int type;
64         char *name;
65         int mftno;
66         int start_vcn;
67 } ntfs_attrlist_item;
68 #endif
69