aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/udf_sb.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-02-22 06:39:12 -0500
committerJan Kara <jack@suse.cz>2008-04-17 08:22:23 -0400
commit15aebd2866b21a568d8defec134bf29f9aea9088 (patch)
tree7b697a462e3ff1bedeaaa7cf9a4441ae504c7a07 /fs/udf/udf_sb.h
parentb1e321266d8797b21eac433b11458ac65b098938 (diff)
udf: move headers out include/linux/
There's really no reason to keep udf headers in include/linux as they're not used by anything but fs/udf/. This patch merges most of include/linux/udf_fs_i.h into fs/udf/udf_i.h, include/linux/udf_fs_sb.h into fs/udf/udf_sb.h and include/linux/udf_fs.h into fs/udf/udfdecl.h. The only thing remaining in include/linux/ is a stub of udf_fs_i.h defining the four user-visible udf ioctls. It's also moved from unifdef-y to headers-y because it can be included unconditionally now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udf_sb.h')
-rw-r--r--fs/udf/udf_sb.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 737d1c604eea..fb2a6e9f8dac 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -1,6 +1,8 @@
1#ifndef __LINUX_UDF_SB_H 1#ifndef __LINUX_UDF_SB_H
2#define __LINUX_UDF_SB_H 2#define __LINUX_UDF_SB_H
3 3
4#include <linux/mutex.h>
5
4/* Since UDF 2.01 is ISO 13346 based... */ 6/* Since UDF 2.01 is ISO 13346 based... */
5#define UDF_SUPER_MAGIC 0x15013346 7#define UDF_SUPER_MAGIC 0x15013346
6 8
@@ -38,6 +40,97 @@
38#define UDF_PART_FLAG_REWRITABLE 0x0040 40#define UDF_PART_FLAG_REWRITABLE 0x0040
39#define UDF_PART_FLAG_OVERWRITABLE 0x0080 41#define UDF_PART_FLAG_OVERWRITABLE 0x0080
40 42
43#define UDF_MAX_BLOCK_LOADED 8
44
45#define UDF_TYPE1_MAP15 0x1511U
46#define UDF_VIRTUAL_MAP15 0x1512U
47#define UDF_VIRTUAL_MAP20 0x2012U
48#define UDF_SPARABLE_MAP15 0x1522U
49
50#pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */
51
52struct udf_sparing_data {
53 __u16 s_packet_len;
54 struct buffer_head *s_spar_map[4];
55};
56
57struct udf_virtual_data {
58 __u32 s_num_entries;
59 __u16 s_start_offset;
60};
61
62struct udf_bitmap {
63 __u32 s_extLength;
64 __u32 s_extPosition;
65 __u16 s_nr_groups;
66 struct buffer_head **s_block_bitmap;
67};
68
69struct udf_part_map {
70 union {
71 struct udf_bitmap *s_bitmap;
72 struct inode *s_table;
73 } s_uspace;
74 union {
75 struct udf_bitmap *s_bitmap;
76 struct inode *s_table;
77 } s_fspace;
78 __u32 s_partition_root;
79 __u32 s_partition_len;
80 __u16 s_partition_type;
81 __u16 s_partition_num;
82 union {
83 struct udf_sparing_data s_sparing;
84 struct udf_virtual_data s_virtual;
85 } s_type_specific;
86 __u32 (*s_partition_func)(struct super_block *, __u32, __u16, __u32);
87 __u16 s_volumeseqnum;
88 __u16 s_partition_flags;
89};
90
91#pragma pack()
92
93struct udf_sb_info {
94 struct udf_part_map *s_partmaps;
95 __u8 s_volume_ident[32];
96
97 /* Overall info */
98 __u16 s_partitions;
99 __u16 s_partition;
100
101 /* Sector headers */
102 __s32 s_session;
103 __u32 s_anchor[4];
104 __u32 s_last_block;
105
106 struct buffer_head *s_lvid_bh;
107
108 /* Default permissions */
109 mode_t s_umask;
110 gid_t s_gid;
111 uid_t s_uid;
112
113 /* Root Info */
114 struct timespec s_record_time;
115
116 /* Fileset Info */
117 __u16 s_serial_number;
118
119 /* highest UDF revision we have recorded to this media */
120 __u16 s_udfrev;
121
122 /* Miscellaneous flags */
123 __u32 s_flags;
124
125 /* Encoding info */
126 struct nls_table *s_nls_map;
127
128 /* VAT inode */
129 struct inode *s_vat_inode;
130
131 struct mutex s_alloc_mutex;
132};
133
41static inline struct udf_sb_info *UDF_SB(struct super_block *sb) 134static inline struct udf_sb_info *UDF_SB(struct super_block *sb)
42{ 135{
43 return sb->s_fs_info; 136 return sb->s_fs_info;