aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/misc.c
diff options
context:
space:
mode:
authorSebastian Manciulea <manciuleas@yahoo.com>2008-04-08 08:02:11 -0400
committerJan Kara <jack@suse.cz>2008-04-17 08:28:33 -0400
commitf4bcbbd92ebda971f7c2cd1132b399808ed6cf9b (patch)
tree0c68fff93557d4fbcec3ad0eab0382b3084ba60c /fs/udf/misc.c
parent96200be3077c5ede16a90b33aca815b444e66043 (diff)
udf: Fix handling of multisession media
According to OSTA UDF specification, only anchor blocks and primary volume descriptors are placed on media relative to the last session. All other block numbers are absolute (in the partition or the whole media). This seems to be confirmed by multisession media created by other systems. Signed-off-by: Sebastian Manciulea <manciuleas@yahoo.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/misc.c')
-rw-r--r--fs/udf/misc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/udf/misc.c b/fs/udf/misc.c
index 581b6e4cc591..96996204d928 100644
--- a/fs/udf/misc.c
+++ b/fs/udf/misc.c
@@ -203,16 +203,15 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
203{ 203{
204 tag *tag_p; 204 tag *tag_p;
205 struct buffer_head *bh = NULL; 205 struct buffer_head *bh = NULL;
206 struct udf_sb_info *sbi = UDF_SB(sb);
207 206
208 /* Read the block */ 207 /* Read the block */
209 if (block == 0xFFFFFFFF) 208 if (block == 0xFFFFFFFF)
210 return NULL; 209 return NULL;
211 210
212 bh = udf_tread(sb, block + sbi->s_session); 211 bh = udf_tread(sb, block);
213 if (!bh) { 212 if (!bh) {
214 udf_debug("block=%d, location=%d: read failed\n", 213 udf_debug("block=%d, location=%d: read failed\n",
215 block + sbi->s_session, location); 214 block, location);
216 return NULL; 215 return NULL;
217 } 216 }
218 217
@@ -222,8 +221,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
222 221
223 if (location != le32_to_cpu(tag_p->tagLocation)) { 222 if (location != le32_to_cpu(tag_p->tagLocation)) {
224 udf_debug("location mismatch block %u, tag %u != %u\n", 223 udf_debug("location mismatch block %u, tag %u != %u\n",
225 block + sbi->s_session, 224 block, le32_to_cpu(tag_p->tagLocation), location);
226 le32_to_cpu(tag_p->tagLocation), location);
227 goto error_out; 225 goto error_out;
228 } 226 }
229 227
@@ -247,9 +245,8 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
247 le16_to_cpu(tag_p->descCRCLength), 0)) 245 le16_to_cpu(tag_p->descCRCLength), 0))
248 return bh; 246 return bh;
249 247
250 udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", 248 udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", block,
251 block + sbi->s_session, le16_to_cpu(tag_p->descCRC), 249 le16_to_cpu(tag_p->descCRC), le16_to_cpu(tag_p->descCRCLength));
252 le16_to_cpu(tag_p->descCRCLength));
253 250
254error_out: 251error_out:
255 brelse(bh); 252 brelse(bh);