diff options
author | Jan Kara <jack@suse.cz> | 2011-10-24 10:47:48 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-10-31 18:49:48 -0400 |
commit | ed47a7d00c22b326fc4c97342a73ecd15929732e (patch) | |
tree | 2881bfe249edea2838623856806adfea2a82a71f /fs/udf | |
parent | 3080a74ea39eece6ac21aae768c48ab8b1f89ac1 (diff) |
udf: Cleanup metadata flags handling
Use simple ->s_flags variable instead of u8 variable for each flag.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/partition.c | 4 | ||||
-rw-r--r-- | fs/udf/super.c | 8 | ||||
-rw-r--r-- | fs/udf/udf_sb.h | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/fs/udf/partition.c b/fs/udf/partition.c index b526f25c04c9..d6caf01a2097 100644 --- a/fs/udf/partition.c +++ b/fs/udf/partition.c | |||
@@ -323,10 +323,10 @@ uint32_t udf_get_pblock_meta25(struct super_block *sb, uint32_t block, | |||
323 | retblk = udf_try_read_meta(inode, block, partition, offset); | 323 | retblk = udf_try_read_meta(inode, block, partition, offset); |
324 | if (retblk == 0xFFFFFFFF && mdata->s_metadata_fe) { | 324 | if (retblk == 0xFFFFFFFF && mdata->s_metadata_fe) { |
325 | udf_warn(sb, "error reading from METADATA, trying to read from MIRROR\n"); | 325 | udf_warn(sb, "error reading from METADATA, trying to read from MIRROR\n"); |
326 | if (!mdata->s_mirror_loaded_flag) { | 326 | if (!(mdata->s_flags & MF_MIRROR_FE_LOADED)) { |
327 | mdata->s_mirror_fe = udf_find_metadata_inode_efe(sb, | 327 | mdata->s_mirror_fe = udf_find_metadata_inode_efe(sb, |
328 | mdata->s_mirror_file_loc, map->s_partition_num); | 328 | mdata->s_mirror_file_loc, map->s_partition_num); |
329 | mdata->s_mirror_loaded_flag = 1; | 329 | mdata->s_flags |= MF_MIRROR_FE_LOADED; |
330 | } | 330 | } |
331 | 331 | ||
332 | inode = mdata->s_mirror_fe; | 332 | inode = mdata->s_mirror_fe; |
diff --git a/fs/udf/super.c b/fs/udf/super.c index dfe043a36593..e185253470df 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -1333,8 +1333,8 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block, | |||
1333 | le32_to_cpu(mdm->allocUnitSize); | 1333 | le32_to_cpu(mdm->allocUnitSize); |
1334 | mdata->s_align_unit_size = | 1334 | mdata->s_align_unit_size = |
1335 | le16_to_cpu(mdm->alignUnitSize); | 1335 | le16_to_cpu(mdm->alignUnitSize); |
1336 | mdata->s_dup_md_flag = | 1336 | if (mdm->flags & 0x01) |
1337 | mdm->flags & 0x01; | 1337 | mdata->s_flags |= MF_DUPLICATE_MD; |
1338 | 1338 | ||
1339 | udf_debug("Metadata Ident suffix=0x%x\n", | 1339 | udf_debug("Metadata Ident suffix=0x%x\n", |
1340 | le16_to_cpu(*(__le16 *) | 1340 | le16_to_cpu(*(__le16 *) |
@@ -1349,8 +1349,8 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block, | |||
1349 | le32_to_cpu(mdm->metadataMirrorFileLoc)); | 1349 | le32_to_cpu(mdm->metadataMirrorFileLoc)); |
1350 | udf_debug("Bitmap file loc=%d\n", | 1350 | udf_debug("Bitmap file loc=%d\n", |
1351 | le32_to_cpu(mdm->metadataBitmapFileLoc)); | 1351 | le32_to_cpu(mdm->metadataBitmapFileLoc)); |
1352 | udf_debug("Duplicate Flag: %d %d\n", | 1352 | udf_debug("Flags: %d %d\n", |
1353 | mdata->s_dup_md_flag, mdm->flags); | 1353 | mdata->s_flags, mdm->flags); |
1354 | } else { | 1354 | } else { |
1355 | udf_debug("Unknown ident: %s\n", | 1355 | udf_debug("Unknown ident: %s\n", |
1356 | upm2->partIdent.ident); | 1356 | upm2->partIdent.ident); |
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h index a3146b05feeb..5142a82e3276 100644 --- a/fs/udf/udf_sb.h +++ b/fs/udf/udf_sb.h | |||
@@ -54,14 +54,16 @@ | |||
54 | 54 | ||
55 | #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */ | 55 | #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */ |
56 | 56 | ||
57 | #define MF_DUPLICATE_MD 0x01 | ||
58 | #define MF_MIRROR_FE_LOADED 0x02 | ||
59 | |||
57 | struct udf_meta_data { | 60 | struct udf_meta_data { |
58 | __u32 s_meta_file_loc; | 61 | __u32 s_meta_file_loc; |
59 | __u32 s_mirror_file_loc; | 62 | __u32 s_mirror_file_loc; |
60 | __u32 s_bitmap_file_loc; | 63 | __u32 s_bitmap_file_loc; |
61 | __u32 s_alloc_unit_size; | 64 | __u32 s_alloc_unit_size; |
62 | __u16 s_align_unit_size; | 65 | __u16 s_align_unit_size; |
63 | __u8 s_dup_md_flag; | 66 | int s_flags; |
64 | __u8 s_mirror_loaded_flag; | ||
65 | struct inode *s_metadata_fe; | 67 | struct inode *s_metadata_fe; |
66 | struct inode *s_mirror_fe; | 68 | struct inode *s_mirror_fe; |
67 | struct inode *s_bitmap_fe; | 69 | struct inode *s_bitmap_fe; |