]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * udf_fs_sb.h | |
3 | * | |
4 | * This include file is for the Linux kernel/module. | |
5 | * | |
6 | * CONTACTS | |
7 | * E-mail regarding any portion of the Linux UDF file system should be | |
8 | * directed to the development team mailing list (run by majordomo): | |
9 | * linux_udf@hpesjro.fc.hp.com | |
10 | * | |
11 | * COPYRIGHT | |
12 | * This file is distributed under the terms of the GNU General Public | |
13 | * License (GPL). Copies of the GPL can be obtained from: | |
14 | * ftp://prep.ai.mit.edu/pub/gnu/GPL | |
15 | * Each contributing author retains all rights to their own work. | |
16 | */ | |
17 | ||
18 | #ifndef _UDF_FS_SB_H | |
19 | #define _UDF_FS_SB_H 1 | |
20 | ||
21 | #include <asm/semaphore.h> | |
22 | ||
23 | #pragma pack(1) | |
24 | ||
25 | #define UDF_MAX_BLOCK_LOADED 8 | |
26 | ||
27 | #define UDF_TYPE1_MAP15 0x1511U | |
28 | #define UDF_VIRTUAL_MAP15 0x1512U | |
29 | #define UDF_VIRTUAL_MAP20 0x2012U | |
30 | #define UDF_SPARABLE_MAP15 0x1522U | |
31 | ||
32 | struct udf_sparing_data | |
33 | { | |
34 | __u16 s_packet_len; | |
35 | struct buffer_head *s_spar_map[4]; | |
36 | }; | |
37 | ||
38 | struct udf_virtual_data | |
39 | { | |
40 | __u32 s_num_entries; | |
41 | __u16 s_start_offset; | |
42 | }; | |
43 | ||
44 | struct udf_bitmap | |
45 | { | |
46 | __u32 s_extLength; | |
47 | __u32 s_extPosition; | |
48 | __u16 s_nr_groups; | |
49 | struct buffer_head **s_block_bitmap; | |
50 | }; | |
51 | ||
52 | struct udf_part_map | |
53 | { | |
54 | union | |
55 | { | |
56 | struct udf_bitmap *s_bitmap; | |
57 | struct inode *s_table; | |
58 | } s_uspace; | |
59 | union | |
60 | { | |
61 | struct udf_bitmap *s_bitmap; | |
62 | struct inode *s_table; | |
63 | } s_fspace; | |
64 | __u32 s_partition_root; | |
65 | __u32 s_partition_len; | |
66 | __u16 s_partition_type; | |
67 | __u16 s_partition_num; | |
68 | union | |
69 | { | |
70 | struct udf_sparing_data s_sparing; | |
71 | struct udf_virtual_data s_virtual; | |
72 | } s_type_specific; | |
73 | __u32 (*s_partition_func)(struct super_block *, __u32, __u16, __u32); | |
74 | __u16 s_volumeseqnum; | |
75 | __u16 s_partition_flags; | |
76 | }; | |
77 | ||
78 | #pragma pack() | |
79 | ||
80 | struct udf_sb_info | |
81 | { | |
82 | struct udf_part_map *s_partmaps; | |
83 | __u8 s_volident[32]; | |
84 | ||
85 | /* Overall info */ | |
86 | __u16 s_partitions; | |
87 | __u16 s_partition; | |
88 | ||
89 | /* Sector headers */ | |
90 | __s32 s_session; | |
91 | __u32 s_anchor[4]; | |
92 | __u32 s_lastblock; | |
93 | ||
94 | struct buffer_head *s_lvidbh; | |
95 | ||
96 | /* Default permissions */ | |
97 | mode_t s_umask; | |
98 | gid_t s_gid; | |
99 | uid_t s_uid; | |
100 | ||
101 | /* Root Info */ | |
102 | struct timespec s_recordtime; | |
103 | ||
104 | /* Fileset Info */ | |
105 | __u16 s_serialnum; | |
106 | ||
107 | /* highest UDF revision we have recorded to this media */ | |
108 | __u16 s_udfrev; | |
109 | ||
110 | /* Miscellaneous flags */ | |
111 | __u32 s_flags; | |
112 | ||
113 | /* Encoding info */ | |
114 | struct nls_table *s_nls_map; | |
115 | ||
116 | /* VAT inode */ | |
117 | struct inode *s_vat; | |
118 | ||
119 | struct semaphore s_alloc_sem; | |
120 | }; | |
121 | ||
122 | #endif /* _UDF_FS_SB_H */ |