]> err.no Git - linux-2.6/commitdiff
udf: Fix handling of multisession media
authorSebastian Manciulea <manciuleas@yahoo.com>
Tue, 8 Apr 2008 12:02:11 +0000 (14:02 +0200)
committerJan Kara <jack@suse.cz>
Thu, 17 Apr 2008 12:28:33 +0000 (14:28 +0200)
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>
fs/udf/misc.c
fs/udf/super.c

index 581b6e4cc591906d06e94a0a618663cea6b428a7..96996204d9286d49b69622890ace93b91204bdf8 100644 (file)
@@ -203,16 +203,15 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
 {
        tag *tag_p;
        struct buffer_head *bh = NULL;
-       struct udf_sb_info *sbi = UDF_SB(sb);
 
        /* Read the block */
        if (block == 0xFFFFFFFF)
                return NULL;
 
-       bh = udf_tread(sb, block + sbi->s_session);
+       bh = udf_tread(sb, block);
        if (!bh) {
                udf_debug("block=%d, location=%d: read failed\n",
-                         block + sbi->s_session, location);
+                         block, location);
                return NULL;
        }
 
@@ -222,8 +221,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
 
        if (location != le32_to_cpu(tag_p->tagLocation)) {
                udf_debug("location mismatch block %u, tag %u != %u\n",
-                         block + sbi->s_session,
-                         le32_to_cpu(tag_p->tagLocation), location);
+                         block, le32_to_cpu(tag_p->tagLocation), location);
                goto error_out;
        }
 
@@ -247,9 +245,8 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
                                        le16_to_cpu(tag_p->descCRCLength), 0))
                return bh;
 
-       udf_debug("Crc failure block %d: crc = %d, crclen = %d\n",
-                 block + sbi->s_session, le16_to_cpu(tag_p->descCRC),
-                 le16_to_cpu(tag_p->descCRCLength));
+       udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", block,
+           le16_to_cpu(tag_p->descCRC), le16_to_cpu(tag_p->descCRCLength));
 
 error_out:
        brelse(bh);
index 650f20fe9d62792d409d4a7fcb4543e1eb57778c..787cedf6cc07d5630a3f13df742b1986bb13cc23 100644 (file)
@@ -587,7 +587,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
 static int udf_vrs(struct super_block *sb, int silent)
 {
        struct volStructDesc *vsd = NULL;
-       int sector = 32768;
+       loff_t sector = 32768;
        int sectorsize;
        struct buffer_head *bh = NULL;
        int iso9660 = 0;