📄 1011.udf.patch
字号:
if (le32_to_cpu(p->accessType) == PD_ACCESS_TYPE_READ_ONLY)@@ -995,19 +1161,22 @@ } } }- break;+ /* break; */ } }- if (i == UDF_SB_NUMPARTS(sb))+ if (matched_part_desc == 0) { udf_debug("Partition (%d) not found in partition map\n", le16_to_cpu(p->partitionNumber)); } else {+ for (i=0; i<UDF_SB_NUMPARTS(sb); i++)+ { udf_debug("Partition (%d:%d type %x) starts at physical %d, block length %d\n", le16_to_cpu(p->partitionNumber), i, UDF_SB_PARTTYPE(sb,i), UDF_SB_PARTROOT(sb,i), UDF_SB_PARTLEN(sb,i)); }+ } } static int @@ -1044,7 +1213,9 @@ UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP15; UDF_SB_PARTFUNC(sb,i) = udf_get_pblock_virt15; }- else if (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0200)+ else if ((le16_to_cpu(((uint16_t *)upm2->partIdent.identSuffix)[0]) == 0x0200) ||+ (le16_to_cpu(((uint16_t *)upm2->partIdent.identSuffix)[0]) == 0x0250) ||+ (le16_to_cpu(((uint16_t *)upm2->partIdent.identSuffix)[0]) == 0x0260)) { UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP20; UDF_SB_PARTFUNC(sb,i) = udf_get_pblock_virt20;@@ -1077,6 +1248,29 @@ } UDF_SB_PARTFUNC(sb,i) = udf_get_pblock_spar15; }+ else if (!strncmp(upm2->partIdent.ident, UDF_ID_METADATA, strlen(UDF_ID_METADATA)))+ {+ udf_debug("Parsing Logical vol part %d type %d id=%s\n",i,type,UDF_ID_METADATA);+ struct metadataPartitionMap *mdm = (struct metadataPartitionMap *)&(lvd->partitionMaps[offset]);+ + UDF_SB_PARTTYPE(sb,i) = UDF_METADATA_MAP25;+ UDF_SB_PARTFUNC(sb,i) = udf_get_pblock_meta25;++ UDF_SB_TYPEMETA(sb,i).s_meta_file_loc = le32_to_cpu(mdm->metadataFileLoc);+ UDF_SB_TYPEMETA(sb,i).s_mirror_file_loc = le32_to_cpu(mdm->metadataMirrorFileLoc);+ UDF_SB_TYPEMETA(sb,i).s_bitmap_file_loc = le32_to_cpu(mdm->metadataBitmapFileLoc);+ UDF_SB_TYPEMETA(sb,i).s_alloc_unit_size = le32_to_cpu(mdm->allocUnitSize);+ UDF_SB_TYPEMETA(sb,i).s_align_unit_size = le16_to_cpu(mdm->alignUnitSize);+ UDF_SB_TYPEMETA(sb,i).s_dup_md_flag = mdm->flags & 0x01;+ + udf_debug("Metadata Ident suffix=0x%x\n", (le16_to_cpu(((__le16 *)mdm->partIdent.identSuffix)[0])));+ udf_debug("Metadata part num=%d\n",le16_to_cpu(mdm->partitionNum));+ udf_debug("Metadata part alloc unit size=%d\n",le32_to_cpu(mdm->allocUnitSize));+ udf_debug("Metadata file loc=%d\n",le32_to_cpu(mdm->metadataFileLoc));+ udf_debug("Mirror file loc=%d\n",le32_to_cpu(mdm->metadataMirrorFileLoc));+ udf_debug("Bitmap file loc=%d\n",le32_to_cpu(mdm->metadataBitmapFileLoc));+ udf_debug("Duplicate Flag: %d %d\n", UDF_SB_TYPEMETA(sb,i).s_dup_md_flag, mdm->flags);+ } else { udf_debug("Unknown ident: %s\n", upm2->partIdent.ident);@@ -1287,7 +1481,15 @@ return 0; } else + {+ /* + usefull to know the last written block because it helps in udf_find_anchor() + especially when the anchor is not at block 256+ */+ if (!UDF_SB_LASTBLOCK(sb))+ UDF_SB_LASTBLOCK(sb) = udf_get_last_block(sb); return !block;+ } } static int@@ -1394,10 +1596,10 @@ pos = udf_block_map(UDF_SB_VAT(sb), 0); bh = sb_bread(sb, pos); UDF_SB_TYPEVIRT(sb,i).s_start_offset =- le16_to_cpu(((struct virtualAllocationTable20 *)bh->b_data + udf_ext0_offset(UDF_SB_VAT(sb)))->lengthHeader) +- udf_ext0_offset(UDF_SB_VAT(sb));- UDF_SB_TYPEVIRT(sb,i).s_num_entries = (UDF_SB_VAT(sb)->i_size -- UDF_SB_TYPEVIRT(sb,i).s_start_offset) >> 2;+ le16_to_cpu(((struct virtualAllocationTable20 *)(bh->b_data + udf_ext0_offset(UDF_SB_VAT(sb))))->lengthHeader) ++ udf_ext0_offset(UDF_SB_VAT(sb));+ UDF_SB_TYPEVIRT(sb,i).s_num_entries = (UDF_SB_VAT(sb)->i_size + udf_ext0_offset(UDF_SB_VAT(sb)) -+ UDF_SB_TYPEVIRT(sb,i).s_start_offset) >> 2; udf_release_data(bh); } UDF_SB_PARTROOT(sb,i) = udf_get_pblock(sb, 0, i, 0);@@ -1609,6 +1811,17 @@ goto error_out; } + /* check for metadata partitions and load the associated data if there's any found */+ for (i = 0; i < UDF_SB_NUMPARTS(sb); i++)+ {+ if( (UDF_SB_PARTTYPE(sb, i) == UDF_METADATA_MAP25) &&+ udf_load_metadata_file_entries(sb, i, &fileset) )+ {+ printk( "UDF-fs: error loading MetaData partition map %d\n", i );+ goto error_out;+ }+ }+ if ( udf_find_fileset(sb, &fileset, &rootdir) ) { printk("UDF-fs: No fileset found\n");@@ -1618,10 +1831,32 @@ if (!silent) { kernel_timestamp ts;+ int k;+ uint8_t vid[128] = "";++ for (k=0; k<UDF_SB_NUMPARTS(sb); k++)+ {+ if (UDF_SB_PARTTYPE(sb,k) == UDF_VIRTUAL_MAP20)+ {+ struct buffer_head *bh = NULL;+ uint32_t pos;++ pos = udf_block_map(UDF_SB_VAT(sb), 0);+ bh = sb_bread(sb, pos);+ memcpy (vid, ((struct virtualAllocationTable20 *)(bh->b_data + udf_ext0_offset(UDF_SB_VAT(sb))))->logicalVolIdent, 128);+ vid[127] = '\0'; /* just to be sure */+ udf_release_data(bh);+ break;+ }+ }++ if (vid[0] == '\0')+ memcpy (vid, UDF_SB_VOLIDENT(sb), 32);+ udf_time_to_stamp(&ts, UDF_SB_RECORDTIME(sb)); udf_info("UDF %s (%s) Mounting volume '%s', timestamp %04u/%02u/%02u %02u:%02u (%x)\n", UDFFS_VERSION, UDFFS_DATE,- UDF_SB_VOLIDENT(sb), ts.year, ts.month, ts.day, ts.hour, ts.minute,+ vid, ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.typeAndTimezone); } if (!(sb->s_flags & MS_RDONLY))@@ -1650,6 +1885,7 @@ return 0; error_out:+ udf_release_metadata(sb); if (UDF_SB_VAT(sb)) iput(UDF_SB_VAT(sb)); if (UDF_SB_NUMPARTS(sb))@@ -1727,6 +1963,9 @@ udf_put_super(struct super_block *sb) { int i;+ udf_debug("udf_put_super!!!!!\n");++ udf_release_metadata(sb); if (UDF_SB_VAT(sb)) iput(UDF_SB_VAT(sb));diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/fs/udf/udfdecl.h linux-2.6.15/fs/udf/udfdecl.h--- linux-2.6.15.ref/fs/udf/udfdecl.h 2006-01-25 20:51:54.000000000 -0800+++ linux-2.6.15/fs/udf/udfdecl.h 2007-05-10 10:23:02.000000000 -0700@@ -127,6 +127,7 @@ extern uint32_t udf_get_pblock_virt15(struct super_block *, uint32_t, uint16_t, uint32_t); extern uint32_t udf_get_pblock_virt20(struct super_block *, uint32_t, uint16_t, uint32_t); extern uint32_t udf_get_pblock_spar15(struct super_block *, uint32_t, uint16_t, uint32_t);+extern uint32_t udf_get_pblock_meta25(struct super_block *, uint32_t, uint16_t, uint32_t); extern int udf_relocate_blocks(struct super_block *, long, long *); /* unicode.c */diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/fs/udf/udf_sb.h linux-2.6.15/fs/udf/udf_sb.h--- linux-2.6.15.ref/fs/udf/udf_sb.h 2006-01-25 20:51:54.000000000 -0800+++ linux-2.6.15/fs/udf/udf_sb.h 2007-05-10 10:23:02.000000000 -0700@@ -4,7 +4,7 @@ /* Since UDF 2.01 is ISO 13346 based... */ #define UDF_SUPER_MAGIC 0x15013346 -#define UDF_MAX_READ_VERSION 0x0201+#define UDF_MAX_READ_VERSION 0x0250 #define UDF_MAX_WRITE_VERSION 0x0201 #define UDF_FLAG_USE_EXTENDED_FE 0@@ -39,6 +39,7 @@ {\ if (UDF_SB(X))\ {\+ if (UDF_SB_PARTMAPS(X))\ kfree(UDF_SB_PARTMAPS(X));\ UDF_SB_PARTMAPS(X) = NULL;\ }\@@ -111,6 +112,7 @@ #define UDF_SB_PARTNUM(X,Y) ( UDF_SB_PARTMAPS(X)[(Y)].s_partition_num ) #define UDF_SB_TYPESPAR(X,Y) ( UDF_SB_PARTMAPS(X)[(Y)].s_type_specific.s_sparing ) #define UDF_SB_TYPEVIRT(X,Y) ( UDF_SB_PARTMAPS(X)[(Y)].s_type_specific.s_virtual )+#define UDF_SB_TYPEMETA(X,Y) ( UDF_SB_PARTMAPS(X)[(Y)].s_type_specific.s_metadata ) #define UDF_SB_PARTFUNC(X,Y) ( UDF_SB_PARTMAPS(X)[(Y)].s_partition_func ) #define UDF_SB_PARTFLAGS(X,Y) ( UDF_SB_PARTMAPS(X)[(Y)].s_partition_flags ) #define UDF_SB_BITMAP(X,Y,Z,I) ( UDF_SB_PARTMAPS(X)[(Y)].Z.s_bitmap->s_block_bitmap[I] )diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/include/linux/udf_fs.h linux-2.6.15/include/linux/udf_fs.h--- linux-2.6.15.ref/include/linux/udf_fs.h 2006-01-25 20:52:02.000000000 -0800+++ linux-2.6.15/include/linux/udf_fs.h 2007-05-10 10:23:02.000000000 -0700@@ -37,8 +37,8 @@ #define UDF_PREALLOCATE #define UDF_DEFAULT_PREALLOC_BLOCKS 8 -#define UDFFS_DATE "2004/29/09"-#define UDFFS_VERSION "0.9.8.1"+#define UDFFS_DATE "2005/21/07"+#define UDFFS_VERSION "0.9.9" #undef UDFFS_DEBUG diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/include/linux/udf_fs_sb.h linux-2.6.15/include/linux/udf_fs_sb.h--- linux-2.6.15.ref/include/linux/udf_fs_sb.h 2006-01-25 20:52:02.000000000 -0800+++ linux-2.6.15/include/linux/udf_fs_sb.h 2007-05-10 10:23:02.000000000 -0700@@ -28,6 +28,22 @@ #define UDF_VIRTUAL_MAP15 0x1512U #define UDF_VIRTUAL_MAP20 0x2012U #define UDF_SPARABLE_MAP15 0x1522U+#define UDF_METADATA_MAP25 0x2511U+++struct udf_meta_data+{+ __u32 s_meta_file_loc;+ __u32 s_mirror_file_loc;+ __u32 s_bitmap_file_loc;+ __u32 s_alloc_unit_size;+ __u16 s_align_unit_size;+ __u8 s_dup_md_flag;+ struct inode *s_metadata_fe;+ struct inode *s_mirror_fe;+ struct inode *s_bitmap_fe;+};+ struct udf_sparing_data {@@ -69,6 +85,7 @@ { struct udf_sparing_data s_sparing; struct udf_virtual_data s_virtual;+ struct udf_meta_data s_metadata; } s_type_specific; __u32 (*s_partition_func)(struct super_block *, __u32, __u16, __u32); __u16 s_volumeseqnum;diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/README.1011.udf.patch linux-2.6.15/README.1011.udf.patch--- linux-2.6.15.ref/README.1011.udf.patch 1969-12-31 16:00:00.000000000 -0800+++ linux-2.6.15/README.1011.udf.patch 2007-05-10 10:26:13.000000000 -0700@@ -0,0 +1,18 @@+Feature:+--------+Support for UDF 2.5/2.6.++Prerequisite patch numbers:+---------------------------+none++Primary author:+---------------+Sebastian Manciulea/YH Lin++Related to which chip version SMP86xx xx=?+------------------------------------------+all++(linux patches) which CONFIG_... are provided:+----------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -