diff options
Diffstat (limited to 'fs/udf/udfdecl.h')
-rw-r--r-- | fs/udf/udfdecl.h | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index 8ec865de5f13..cac51b77a5d1 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h | |||
@@ -62,10 +62,8 @@ static inline size_t udf_ext0_offset(struct inode *inode) | |||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | #define udf_get_lb_pblock(sb,loc,offset) udf_get_pblock((sb), (loc).logicalBlockNum, (loc).partitionReferenceNum, (offset)) | ||
66 | |||
67 | /* computes tag checksum */ | 65 | /* computes tag checksum */ |
68 | u8 udf_tag_checksum(const tag *t); | 66 | u8 udf_tag_checksum(const struct tag *t); |
69 | 67 | ||
70 | struct dentry; | 68 | struct dentry; |
71 | struct inode; | 69 | struct inode; |
@@ -95,7 +93,7 @@ struct udf_vds_record { | |||
95 | }; | 93 | }; |
96 | 94 | ||
97 | struct generic_desc { | 95 | struct generic_desc { |
98 | tag descTag; | 96 | struct tag descTag; |
99 | __le32 volDescSeqNum; | 97 | __le32 volDescSeqNum; |
100 | }; | 98 | }; |
101 | 99 | ||
@@ -108,11 +106,22 @@ struct ustr { | |||
108 | struct extent_position { | 106 | struct extent_position { |
109 | struct buffer_head *bh; | 107 | struct buffer_head *bh; |
110 | uint32_t offset; | 108 | uint32_t offset; |
111 | kernel_lb_addr block; | 109 | struct kernel_lb_addr block; |
112 | }; | 110 | }; |
113 | 111 | ||
114 | /* super.c */ | 112 | /* super.c */ |
115 | extern void udf_warning(struct super_block *, const char *, const char *, ...); | 113 | extern void udf_warning(struct super_block *, const char *, const char *, ...); |
114 | static inline void udf_updated_lvid(struct super_block *sb) | ||
115 | { | ||
116 | struct buffer_head *bh = UDF_SB(sb)->s_lvid_bh; | ||
117 | |||
118 | BUG_ON(!bh); | ||
119 | WARN_ON_ONCE(((struct logicalVolIntegrityDesc *) | ||
120 | bh->b_data)->integrityType != | ||
121 | cpu_to_le32(LVID_INTEGRITY_TYPE_OPEN)); | ||
122 | sb->s_dirt = 1; | ||
123 | UDF_SB(sb)->s_lvid_dirty = 1; | ||
124 | } | ||
116 | 125 | ||
117 | /* namei.c */ | 126 | /* namei.c */ |
118 | extern int udf_write_fi(struct inode *inode, struct fileIdentDesc *, | 127 | extern int udf_write_fi(struct inode *inode, struct fileIdentDesc *, |
@@ -124,7 +133,7 @@ extern int udf_ioctl(struct inode *, struct file *, unsigned int, | |||
124 | unsigned long); | 133 | unsigned long); |
125 | 134 | ||
126 | /* inode.c */ | 135 | /* inode.c */ |
127 | extern struct inode *udf_iget(struct super_block *, kernel_lb_addr); | 136 | extern struct inode *udf_iget(struct super_block *, struct kernel_lb_addr *); |
128 | extern int udf_sync_inode(struct inode *); | 137 | extern int udf_sync_inode(struct inode *); |
129 | extern void udf_expand_file_adinicb(struct inode *, int, int *); | 138 | extern void udf_expand_file_adinicb(struct inode *, int, int *); |
130 | extern struct buffer_head *udf_expand_dir_adinicb(struct inode *, int *, int *); | 139 | extern struct buffer_head *udf_expand_dir_adinicb(struct inode *, int *, int *); |
@@ -136,19 +145,19 @@ extern void udf_clear_inode(struct inode *); | |||
136 | extern int udf_write_inode(struct inode *, int); | 145 | extern int udf_write_inode(struct inode *, int); |
137 | extern long udf_block_map(struct inode *, sector_t); | 146 | extern long udf_block_map(struct inode *, sector_t); |
138 | extern int udf_extend_file(struct inode *, struct extent_position *, | 147 | extern int udf_extend_file(struct inode *, struct extent_position *, |
139 | kernel_long_ad *, sector_t); | 148 | struct kernel_long_ad *, sector_t); |
140 | extern int8_t inode_bmap(struct inode *, sector_t, struct extent_position *, | 149 | extern int8_t inode_bmap(struct inode *, sector_t, struct extent_position *, |
141 | kernel_lb_addr *, uint32_t *, sector_t *); | 150 | struct kernel_lb_addr *, uint32_t *, sector_t *); |
142 | extern int8_t udf_add_aext(struct inode *, struct extent_position *, | 151 | extern int8_t udf_add_aext(struct inode *, struct extent_position *, |
143 | kernel_lb_addr, uint32_t, int); | 152 | struct kernel_lb_addr *, uint32_t, int); |
144 | extern int8_t udf_write_aext(struct inode *, struct extent_position *, | 153 | extern int8_t udf_write_aext(struct inode *, struct extent_position *, |
145 | kernel_lb_addr, uint32_t, int); | 154 | struct kernel_lb_addr *, uint32_t, int); |
146 | extern int8_t udf_delete_aext(struct inode *, struct extent_position, | 155 | extern int8_t udf_delete_aext(struct inode *, struct extent_position, |
147 | kernel_lb_addr, uint32_t); | 156 | struct kernel_lb_addr, uint32_t); |
148 | extern int8_t udf_next_aext(struct inode *, struct extent_position *, | 157 | extern int8_t udf_next_aext(struct inode *, struct extent_position *, |
149 | kernel_lb_addr *, uint32_t *, int); | 158 | struct kernel_lb_addr *, uint32_t *, int); |
150 | extern int8_t udf_current_aext(struct inode *, struct extent_position *, | 159 | extern int8_t udf_current_aext(struct inode *, struct extent_position *, |
151 | kernel_lb_addr *, uint32_t *, int); | 160 | struct kernel_lb_addr *, uint32_t *, int); |
152 | 161 | ||
153 | /* misc.c */ | 162 | /* misc.c */ |
154 | extern struct buffer_head *udf_tgetblk(struct super_block *, int); | 163 | extern struct buffer_head *udf_tgetblk(struct super_block *, int); |
@@ -160,7 +169,7 @@ extern struct genericFormat *udf_get_extendedattr(struct inode *, uint32_t, | |||
160 | extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t, | 169 | extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t, |
161 | uint32_t, uint16_t *); | 170 | uint32_t, uint16_t *); |
162 | extern struct buffer_head *udf_read_ptagged(struct super_block *, | 171 | extern struct buffer_head *udf_read_ptagged(struct super_block *, |
163 | kernel_lb_addr, uint32_t, | 172 | struct kernel_lb_addr *, uint32_t, |
164 | uint16_t *); | 173 | uint16_t *); |
165 | extern void udf_update_tag(char *, int); | 174 | extern void udf_update_tag(char *, int); |
166 | extern void udf_new_tag(char *, uint16_t, uint16_t, uint16_t, uint32_t, int); | 175 | extern void udf_new_tag(char *, uint16_t, uint16_t, uint16_t, uint32_t, int); |
@@ -182,6 +191,14 @@ extern uint32_t udf_get_pblock_meta25(struct super_block *, uint32_t, uint16_t, | |||
182 | uint32_t); | 191 | uint32_t); |
183 | extern int udf_relocate_blocks(struct super_block *, long, long *); | 192 | extern int udf_relocate_blocks(struct super_block *, long, long *); |
184 | 193 | ||
194 | static inline uint32_t | ||
195 | udf_get_lb_pblock(struct super_block *sb, struct kernel_lb_addr *loc, | ||
196 | uint32_t offset) | ||
197 | { | ||
198 | return udf_get_pblock(sb, loc->logicalBlockNum, | ||
199 | loc->partitionReferenceNum, offset); | ||
200 | } | ||
201 | |||
185 | /* unicode.c */ | 202 | /* unicode.c */ |
186 | extern int udf_get_filename(struct super_block *, uint8_t *, uint8_t *, int); | 203 | extern int udf_get_filename(struct super_block *, uint8_t *, uint8_t *, int); |
187 | extern int udf_put_filename(struct super_block *, const uint8_t *, uint8_t *, | 204 | extern int udf_put_filename(struct super_block *, const uint8_t *, uint8_t *, |
@@ -200,7 +217,7 @@ extern void udf_truncate_extents(struct inode *); | |||
200 | 217 | ||
201 | /* balloc.c */ | 218 | /* balloc.c */ |
202 | extern void udf_free_blocks(struct super_block *, struct inode *, | 219 | extern void udf_free_blocks(struct super_block *, struct inode *, |
203 | kernel_lb_addr, uint32_t, uint32_t); | 220 | struct kernel_lb_addr *, uint32_t, uint32_t); |
204 | extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, | 221 | extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, |
205 | uint32_t, uint32_t); | 222 | uint32_t, uint32_t); |
206 | extern int udf_new_block(struct super_block *, struct inode *, uint16_t, | 223 | extern int udf_new_block(struct super_block *, struct inode *, uint16_t, |
@@ -214,16 +231,16 @@ extern struct fileIdentDesc *udf_fileident_read(struct inode *, loff_t *, | |||
214 | struct udf_fileident_bh *, | 231 | struct udf_fileident_bh *, |
215 | struct fileIdentDesc *, | 232 | struct fileIdentDesc *, |
216 | struct extent_position *, | 233 | struct extent_position *, |
217 | kernel_lb_addr *, uint32_t *, | 234 | struct kernel_lb_addr *, uint32_t *, |
218 | sector_t *); | 235 | sector_t *); |
219 | extern struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, | 236 | extern struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, |
220 | int *offset); | 237 | int *offset); |
221 | extern long_ad *udf_get_filelongad(uint8_t *, int, uint32_t *, int); | 238 | extern struct long_ad *udf_get_filelongad(uint8_t *, int, uint32_t *, int); |
222 | extern short_ad *udf_get_fileshortad(uint8_t *, int, uint32_t *, int); | 239 | extern struct short_ad *udf_get_fileshortad(uint8_t *, int, uint32_t *, int); |
223 | 240 | ||
224 | /* udftime.c */ | 241 | /* udftime.c */ |
225 | extern struct timespec *udf_disk_stamp_to_time(struct timespec *dest, | 242 | extern struct timespec *udf_disk_stamp_to_time(struct timespec *dest, |
226 | timestamp src); | 243 | struct timestamp src); |
227 | extern timestamp *udf_time_to_disk_stamp(timestamp *dest, struct timespec src); | 244 | extern struct timestamp *udf_time_to_disk_stamp(struct timestamp *dest, struct timespec src); |
228 | 245 | ||
229 | #endif /* __UDF_DECL_H */ | 246 | #endif /* __UDF_DECL_H */ |