diff options
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/file.c | 1 | ||||
-rw-r--r-- | fs/udf/ialloc.c | 1 | ||||
-rw-r--r-- | fs/udf/lowlevel.c | 1 | ||||
-rw-r--r-- | fs/udf/misc.c | 1 | ||||
-rw-r--r-- | fs/udf/partition.c | 1 | ||||
-rw-r--r-- | fs/udf/super.c | 1 | ||||
-rw-r--r-- | fs/udf/symlink.c | 1 | ||||
-rw-r--r-- | fs/udf/truncate.c | 1 | ||||
-rw-r--r-- | fs/udf/udf_i.h | 30 | ||||
-rw-r--r-- | fs/udf/udf_sb.h | 93 | ||||
-rw-r--r-- | fs/udf/udfdecl.h | 25 | ||||
-rw-r--r-- | fs/udf/unicode.c | 1 |
12 files changed, 141 insertions, 16 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c index 822cc4071527..0ed6e146a0d9 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | #include "udfdecl.h" | 28 | #include "udfdecl.h" |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/udf_fs.h> | ||
31 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/string.h> /* memset */ | 32 | #include <linux/string.h> /* memset */ |
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index 84360315aca2..c3fb28eee646 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include "udfdecl.h" | 21 | #include "udfdecl.h" |
22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
23 | #include <linux/quotaops.h> | 23 | #include <linux/quotaops.h> |
24 | #include <linux/udf_fs.h> | ||
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
26 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
27 | 26 | ||
diff --git a/fs/udf/lowlevel.c b/fs/udf/lowlevel.c index 579bae71e67e..703843f30ffd 100644 --- a/fs/udf/lowlevel.c +++ b/fs/udf/lowlevel.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/cdrom.h> | 23 | #include <linux/cdrom.h> |
24 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
25 | 25 | ||
26 | #include <linux/udf_fs.h> | ||
27 | #include "udf_sb.h" | 26 | #include "udf_sb.h" |
28 | 27 | ||
29 | unsigned int udf_get_last_session(struct super_block *sb) | 28 | unsigned int udf_get_last_session(struct super_block *sb) |
diff --git a/fs/udf/misc.c b/fs/udf/misc.c index a1d6da0caf71..581b6e4cc591 100644 --- a/fs/udf/misc.c +++ b/fs/udf/misc.c | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/udf_fs.h> | ||
27 | #include <linux/buffer_head.h> | 26 | #include <linux/buffer_head.h> |
28 | 27 | ||
29 | #include "udf_i.h" | 28 | #include "udf_i.h" |
diff --git a/fs/udf/partition.c b/fs/udf/partition.c index fc533345ab89..307c9c33d184 100644 --- a/fs/udf/partition.c +++ b/fs/udf/partition.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include <linux/udf_fs.h> | ||
28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
29 | #include <linux/buffer_head.h> | 28 | #include <linux/buffer_head.h> |
30 | 29 | ||
diff --git a/fs/udf/super.c b/fs/udf/super.c index 53e1d6e6dd31..02815e92553b 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <linux/seq_file.h> | 57 | #include <linux/seq_file.h> |
58 | #include <asm/byteorder.h> | 58 | #include <asm/byteorder.h> |
59 | 59 | ||
60 | #include <linux/udf_fs.h> | ||
61 | #include "udf_sb.h" | 60 | #include "udf_sb.h" |
62 | #include "udf_i.h" | 61 | #include "udf_i.h" |
63 | 62 | ||
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c index 6ec99221e50c..c3265e1385d4 100644 --- a/fs/udf/symlink.c +++ b/fs/udf/symlink.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/udf_fs.h> | ||
27 | #include <linux/time.h> | 26 | #include <linux/time.h> |
28 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
29 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c index fe61be17cdab..6111d97902d7 100644 --- a/fs/udf/truncate.c +++ b/fs/udf/truncate.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include "udfdecl.h" | 22 | #include "udfdecl.h" |
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/udf_fs.h> | ||
26 | #include <linux/buffer_head.h> | 25 | #include <linux/buffer_head.h> |
27 | 26 | ||
28 | #include "udf_i.h" | 27 | #include "udf_i.h" |
diff --git a/fs/udf/udf_i.h b/fs/udf/udf_i.h index ccc52f16bf7d..d6d9a774a1c1 100644 --- a/fs/udf/udf_i.h +++ b/fs/udf/udf_i.h | |||
@@ -1,10 +1,32 @@ | |||
1 | #ifndef __LINUX_UDF_I_H | 1 | #ifndef _UDF_I_H |
2 | #define __LINUX_UDF_I_H | 2 | #define _UDF_I_H |
3 | |||
4 | struct udf_inode_info { | ||
5 | struct timespec i_crtime; | ||
6 | /* Physical address of inode */ | ||
7 | kernel_lb_addr i_location; | ||
8 | __u64 i_unique; | ||
9 | __u32 i_lenEAttr; | ||
10 | __u32 i_lenAlloc; | ||
11 | __u64 i_lenExtents; | ||
12 | __u32 i_next_alloc_block; | ||
13 | __u32 i_next_alloc_goal; | ||
14 | unsigned i_alloc_type : 3; | ||
15 | unsigned i_efe : 1; | ||
16 | unsigned i_use : 1; | ||
17 | unsigned i_strat4096 : 1; | ||
18 | unsigned reserved : 26; | ||
19 | union { | ||
20 | short_ad *i_sad; | ||
21 | long_ad *i_lad; | ||
22 | __u8 *i_data; | ||
23 | } i_ext; | ||
24 | struct inode vfs_inode; | ||
25 | }; | ||
3 | 26 | ||
4 | #include <linux/udf_fs_i.h> | ||
5 | static inline struct udf_inode_info *UDF_I(struct inode *inode) | 27 | static inline struct udf_inode_info *UDF_I(struct inode *inode) |
6 | { | 28 | { |
7 | return list_entry(inode, struct udf_inode_info, vfs_inode); | 29 | return list_entry(inode, struct udf_inode_info, vfs_inode); |
8 | } | 30 | } |
9 | 31 | ||
10 | #endif /* !defined(_LINUX_UDF_I_H) */ | 32 | #endif /* _UDF_I_H) */ |
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 | |||
52 | struct udf_sparing_data { | ||
53 | __u16 s_packet_len; | ||
54 | struct buffer_head *s_spar_map[4]; | ||
55 | }; | ||
56 | |||
57 | struct udf_virtual_data { | ||
58 | __u32 s_num_entries; | ||
59 | __u16 s_start_offset; | ||
60 | }; | ||
61 | |||
62 | struct udf_bitmap { | ||
63 | __u32 s_extLength; | ||
64 | __u32 s_extPosition; | ||
65 | __u16 s_nr_groups; | ||
66 | struct buffer_head **s_block_bitmap; | ||
67 | }; | ||
68 | |||
69 | struct 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 | |||
93 | struct 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 | |||
41 | static inline struct udf_sb_info *UDF_SB(struct super_block *sb) | 134 | static 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; |
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index 681dc2b66cdb..c9c75856af80 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h | |||
@@ -1,18 +1,37 @@ | |||
1 | #ifndef __UDF_DECL_H | 1 | #ifndef __UDF_DECL_H |
2 | #define __UDF_DECL_H | 2 | #define __UDF_DECL_H |
3 | 3 | ||
4 | #include <linux/udf_fs.h> | ||
5 | #include "ecma_167.h" | 4 | #include "ecma_167.h" |
6 | #include "osta_udf.h" | 5 | #include "osta_udf.h" |
7 | 6 | ||
8 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
9 | #include <linux/types.h> | 8 | #include <linux/types.h> |
10 | #include <linux/udf_fs_i.h> | ||
11 | #include <linux/udf_fs_sb.h> | ||
12 | #include <linux/buffer_head.h> | 9 | #include <linux/buffer_head.h> |
10 | #include <linux/udf_fs_i.h> | ||
13 | 11 | ||
12 | #include "udf_sb.h" | ||
14 | #include "udfend.h" | 13 | #include "udfend.h" |
15 | 14 | ||
15 | #define UDF_PREALLOCATE | ||
16 | #define UDF_DEFAULT_PREALLOC_BLOCKS 8 | ||
17 | |||
18 | #undef UDFFS_DEBUG | ||
19 | |||
20 | #ifdef UDFFS_DEBUG | ||
21 | #define udf_debug(f, a...) \ | ||
22 | do { \ | ||
23 | printk(KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \ | ||
24 | __FILE__, __LINE__, __func__); \ | ||
25 | printk(f, ##a); \ | ||
26 | } while (0) | ||
27 | #else | ||
28 | #define udf_debug(f, a...) /**/ | ||
29 | #endif | ||
30 | |||
31 | #define udf_info(f, a...) \ | ||
32 | printk(KERN_INFO "UDF-fs INFO " f, ##a); | ||
33 | |||
34 | |||
16 | #define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) ) | 35 | #define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) ) |
17 | #define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) ) | 36 | #define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) ) |
18 | 37 | ||
diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c index e533b11703bf..b9de050ad830 100644 --- a/fs/udf/unicode.c +++ b/fs/udf/unicode.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/string.h> /* for memset */ | 24 | #include <linux/string.h> /* for memset */ |
25 | #include <linux/nls.h> | 25 | #include <linux/nls.h> |
26 | #include <linux/udf_fs.h> | ||
27 | 26 | ||
28 | #include "udf_sb.h" | 27 | #include "udf_sb.h" |
29 | 28 | ||