aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-10-10 04:08:07 -0400
committerJan Kara <jack@suse.cz>2011-10-31 18:43:58 -0400
commita983f368f8986c1ecb64f2947fcf594343130215 (patch)
treeb9fef60714db92cf93242a96bbefcae2c7350ee2 /fs/udf/super.c
parentc2bff36c299b88ca5e05638dfa210d709e2a87ef (diff)
udf: Neaten udf_debug uses
Just whitespace and argument alignment. Introduce some checkpatch warnings that deserve to be ignored. Reviewed-by: NamJae Jeon <linkinjeon@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c78
1 files changed, 34 insertions, 44 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 926228e7435a..e58123ad75ba 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -639,20 +639,16 @@ static loff_t udf_check_vsd(struct super_block *sb)
639 udf_debug("ISO9660 Boot Record found\n"); 639 udf_debug("ISO9660 Boot Record found\n");
640 break; 640 break;
641 case 1: 641 case 1:
642 udf_debug("ISO9660 Primary Volume Descriptor " 642 udf_debug("ISO9660 Primary Volume Descriptor found\n");
643 "found\n");
644 break; 643 break;
645 case 2: 644 case 2:
646 udf_debug("ISO9660 Supplementary Volume " 645 udf_debug("ISO9660 Supplementary Volume Descriptor found\n");
647 "Descriptor found\n");
648 break; 646 break;
649 case 3: 647 case 3:
650 udf_debug("ISO9660 Volume Partition Descriptor " 648 udf_debug("ISO9660 Volume Partition Descriptor found\n");
651 "found\n");
652 break; 649 break;
653 case 255: 650 case 255:
654 udf_debug("ISO9660 Volume Descriptor Set " 651 udf_debug("ISO9660 Volume Descriptor Set Terminator found\n");
655 "Terminator found\n");
656 break; 652 break;
657 default: 653 default:
658 udf_debug("ISO9660 VRS (%u) found\n", 654 udf_debug("ISO9660 VRS (%u) found\n",
@@ -803,8 +799,7 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
803 pvoldesc->recordingDateAndTime)) { 799 pvoldesc->recordingDateAndTime)) {
804#ifdef UDFFS_DEBUG 800#ifdef UDFFS_DEBUG
805 struct timestamp *ts = &pvoldesc->recordingDateAndTime; 801 struct timestamp *ts = &pvoldesc->recordingDateAndTime;
806 udf_debug("recording time %04u/%02u/%02u" 802 udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n",
807 " %02u:%02u (%x)\n",
808 le16_to_cpu(ts->year), ts->month, ts->day, ts->hour, 803 le16_to_cpu(ts->year), ts->month, ts->day, ts->hour,
809 ts->minute, le16_to_cpu(ts->typeAndTimezone)); 804 ts->minute, le16_to_cpu(ts->typeAndTimezone));
810#endif 805#endif
@@ -815,7 +810,7 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
815 strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name, 810 strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name,
816 outstr->u_len > 31 ? 31 : outstr->u_len); 811 outstr->u_len > 31 ? 31 : outstr->u_len);
817 udf_debug("volIdent[] = '%s'\n", 812 udf_debug("volIdent[] = '%s'\n",
818 UDF_SB(sb)->s_volume_ident); 813 UDF_SB(sb)->s_volume_ident);
819 } 814 }
820 815
821 if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) 816 if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128))
@@ -847,7 +842,7 @@ static int udf_load_metadata_files(struct super_block *sb, int partition)
847 addr.partitionReferenceNum = map->s_partition_num; 842 addr.partitionReferenceNum = map->s_partition_num;
848 843
849 udf_debug("Metadata file location: block = %d part = %d\n", 844 udf_debug("Metadata file location: block = %d part = %d\n",
850 addr.logicalBlockNum, addr.partitionReferenceNum); 845 addr.logicalBlockNum, addr.partitionReferenceNum);
851 846
852 mdata->s_metadata_fe = udf_iget(sb, &addr); 847 mdata->s_metadata_fe = udf_iget(sb, &addr);
853 848
@@ -867,7 +862,7 @@ static int udf_load_metadata_files(struct super_block *sb, int partition)
867 addr.partitionReferenceNum = map->s_partition_num; 862 addr.partitionReferenceNum = map->s_partition_num;
868 863
869 udf_debug("Mirror metadata file location: block = %d part = %d\n", 864 udf_debug("Mirror metadata file location: block = %d part = %d\n",
870 addr.logicalBlockNum, addr.partitionReferenceNum); 865 addr.logicalBlockNum, addr.partitionReferenceNum);
871 866
872 mdata->s_mirror_fe = udf_iget(sb, &addr); 867 mdata->s_mirror_fe = udf_iget(sb, &addr);
873 868
@@ -896,7 +891,7 @@ static int udf_load_metadata_files(struct super_block *sb, int partition)
896 addr.partitionReferenceNum = map->s_partition_num; 891 addr.partitionReferenceNum = map->s_partition_num;
897 892
898 udf_debug("Bitmap file location: block = %d part = %d\n", 893 udf_debug("Bitmap file location: block = %d part = %d\n",
899 addr.logicalBlockNum, addr.partitionReferenceNum); 894 addr.logicalBlockNum, addr.partitionReferenceNum);
900 895
901 mdata->s_bitmap_fe = udf_iget(sb, &addr); 896 mdata->s_bitmap_fe = udf_iget(sb, &addr);
902 897
@@ -988,10 +983,9 @@ static int udf_fill_partdesc_info(struct super_block *sb,
988 if (p->accessType == cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE)) 983 if (p->accessType == cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE))
989 map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE; 984 map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE;
990 985
991 udf_debug("Partition (%d type %x) starts at physical %d, " 986 udf_debug("Partition (%d type %x) starts at physical %d, block length %d\n",
992 "block length %d\n", p_index, 987 p_index, map->s_partition_type,
993 map->s_partition_type, map->s_partition_root, 988 map->s_partition_root, map->s_partition_len);
994 map->s_partition_len);
995 989
996 if (strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02) && 990 if (strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02) &&
997 strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR03)) 991 strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR03))
@@ -1008,12 +1002,12 @@ static int udf_fill_partdesc_info(struct super_block *sb,
1008 map->s_uspace.s_table = udf_iget(sb, &loc); 1002 map->s_uspace.s_table = udf_iget(sb, &loc);
1009 if (!map->s_uspace.s_table) { 1003 if (!map->s_uspace.s_table) {
1010 udf_debug("cannot load unallocSpaceTable (part %d)\n", 1004 udf_debug("cannot load unallocSpaceTable (part %d)\n",
1011 p_index); 1005 p_index);
1012 return 1; 1006 return 1;
1013 } 1007 }
1014 map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_TABLE; 1008 map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_TABLE;
1015 udf_debug("unallocSpaceTable (part %d) @ %ld\n", 1009 udf_debug("unallocSpaceTable (part %d) @ %ld\n",
1016 p_index, map->s_uspace.s_table->i_ino); 1010 p_index, map->s_uspace.s_table->i_ino);
1017 } 1011 }
1018 1012
1019 if (phd->unallocSpaceBitmap.extLength) { 1013 if (phd->unallocSpaceBitmap.extLength) {
@@ -1026,8 +1020,8 @@ static int udf_fill_partdesc_info(struct super_block *sb,
1026 bitmap->s_extPosition = le32_to_cpu( 1020 bitmap->s_extPosition = le32_to_cpu(
1027 phd->unallocSpaceBitmap.extPosition); 1021 phd->unallocSpaceBitmap.extPosition);
1028 map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_BITMAP; 1022 map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_BITMAP;
1029 udf_debug("unallocSpaceBitmap (part %d) @ %d\n", p_index, 1023 udf_debug("unallocSpaceBitmap (part %d) @ %d\n",
1030 bitmap->s_extPosition); 1024 p_index, bitmap->s_extPosition);
1031 } 1025 }
1032 1026
1033 if (phd->partitionIntegrityTable.extLength) 1027 if (phd->partitionIntegrityTable.extLength)
@@ -1043,13 +1037,13 @@ static int udf_fill_partdesc_info(struct super_block *sb,
1043 map->s_fspace.s_table = udf_iget(sb, &loc); 1037 map->s_fspace.s_table = udf_iget(sb, &loc);
1044 if (!map->s_fspace.s_table) { 1038 if (!map->s_fspace.s_table) {
1045 udf_debug("cannot load freedSpaceTable (part %d)\n", 1039 udf_debug("cannot load freedSpaceTable (part %d)\n",
1046 p_index); 1040 p_index);
1047 return 1; 1041 return 1;
1048 } 1042 }
1049 1043
1050 map->s_partition_flags |= UDF_PART_FLAG_FREED_TABLE; 1044 map->s_partition_flags |= UDF_PART_FLAG_FREED_TABLE;
1051 udf_debug("freedSpaceTable (part %d) @ %ld\n", 1045 udf_debug("freedSpaceTable (part %d) @ %ld\n",
1052 p_index, map->s_fspace.s_table->i_ino); 1046 p_index, map->s_fspace.s_table->i_ino);
1053 } 1047 }
1054 1048
1055 if (phd->freedSpaceBitmap.extLength) { 1049 if (phd->freedSpaceBitmap.extLength) {
@@ -1062,8 +1056,8 @@ static int udf_fill_partdesc_info(struct super_block *sb,
1062 bitmap->s_extPosition = le32_to_cpu( 1056 bitmap->s_extPosition = le32_to_cpu(
1063 phd->freedSpaceBitmap.extPosition); 1057 phd->freedSpaceBitmap.extPosition);
1064 map->s_partition_flags |= UDF_PART_FLAG_FREED_BITMAP; 1058 map->s_partition_flags |= UDF_PART_FLAG_FREED_BITMAP;
1065 udf_debug("freedSpaceBitmap (part %d) @ %d\n", p_index, 1059 udf_debug("freedSpaceBitmap (part %d) @ %d\n",
1066 bitmap->s_extPosition); 1060 p_index, bitmap->s_extPosition);
1067 } 1061 }
1068 return 0; 1062 return 0;
1069} 1063}
@@ -1325,9 +1319,8 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
1325 struct metadataPartitionMap *mdm = 1319 struct metadataPartitionMap *mdm =
1326 (struct metadataPartitionMap *) 1320 (struct metadataPartitionMap *)
1327 &(lvd->partitionMaps[offset]); 1321 &(lvd->partitionMaps[offset]);
1328 udf_debug("Parsing Logical vol part %d " 1322 udf_debug("Parsing Logical vol part %d type %d id=%s\n",
1329 "type %d id=%s\n", i, type, 1323 i, type, UDF_ID_METADATA);
1330 UDF_ID_METADATA);
1331 1324
1332 map->s_partition_type = UDF_METADATA_MAP25; 1325 map->s_partition_type = UDF_METADATA_MAP25;
1333 map->s_partition_func = udf_get_pblock_meta25; 1326 map->s_partition_func = udf_get_pblock_meta25;
@@ -1346,21 +1339,20 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
1346 mdm->flags & 0x01; 1339 mdm->flags & 0x01;
1347 1340
1348 udf_debug("Metadata Ident suffix=0x%x\n", 1341 udf_debug("Metadata Ident suffix=0x%x\n",
1349 (le16_to_cpu( 1342 le16_to_cpu(*(__le16 *)
1350 ((__le16 *) 1343 mdm->partIdent.identSuffix));
1351 mdm->partIdent.identSuffix)[0])));
1352 udf_debug("Metadata part num=%d\n", 1344 udf_debug("Metadata part num=%d\n",
1353 le16_to_cpu(mdm->partitionNum)); 1345 le16_to_cpu(mdm->partitionNum));
1354 udf_debug("Metadata part alloc unit size=%d\n", 1346 udf_debug("Metadata part alloc unit size=%d\n",
1355 le32_to_cpu(mdm->allocUnitSize)); 1347 le32_to_cpu(mdm->allocUnitSize));
1356 udf_debug("Metadata file loc=%d\n", 1348 udf_debug("Metadata file loc=%d\n",
1357 le32_to_cpu(mdm->metadataFileLoc)); 1349 le32_to_cpu(mdm->metadataFileLoc));
1358 udf_debug("Mirror file loc=%d\n", 1350 udf_debug("Mirror file loc=%d\n",
1359 le32_to_cpu(mdm->metadataMirrorFileLoc)); 1351 le32_to_cpu(mdm->metadataMirrorFileLoc));
1360 udf_debug("Bitmap file loc=%d\n", 1352 udf_debug("Bitmap file loc=%d\n",
1361 le32_to_cpu(mdm->metadataBitmapFileLoc)); 1353 le32_to_cpu(mdm->metadataBitmapFileLoc));
1362 udf_debug("Duplicate Flag: %d %d\n", 1354 udf_debug("Duplicate Flag: %d %d\n",
1363 mdata->s_dup_md_flag, mdm->flags); 1355 mdata->s_dup_md_flag, mdm->flags);
1364 } else { 1356 } else {
1365 udf_debug("Unknown ident: %s\n", 1357 udf_debug("Unknown ident: %s\n",
1366 upm2->partIdent.ident); 1358 upm2->partIdent.ident);
@@ -1370,16 +1362,15 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
1370 map->s_partition_num = le16_to_cpu(upm2->partitionNum); 1362 map->s_partition_num = le16_to_cpu(upm2->partitionNum);
1371 } 1363 }
1372 udf_debug("Partition (%d:%d) type %d on volume %d\n", 1364 udf_debug("Partition (%d:%d) type %d on volume %d\n",
1373 i, map->s_partition_num, type, 1365 i, map->s_partition_num, type, map->s_volumeseqnum);
1374 map->s_volumeseqnum);
1375 } 1366 }
1376 1367
1377 if (fileset) { 1368 if (fileset) {
1378 struct long_ad *la = (struct long_ad *)&(lvd->logicalVolContentsUse[0]); 1369 struct long_ad *la = (struct long_ad *)&(lvd->logicalVolContentsUse[0]);
1379 1370
1380 *fileset = lelb_to_cpu(la->extLocation); 1371 *fileset = lelb_to_cpu(la->extLocation);
1381 udf_debug("FileSet found in LogicalVolDesc at block=%d, " 1372 udf_debug("FileSet found in LogicalVolDesc at block=%d, partition=%d\n",
1382 "partition=%d\n", fileset->logicalBlockNum, 1373 fileset->logicalBlockNum,
1383 fileset->partitionReferenceNum); 1374 fileset->partitionReferenceNum);
1384 } 1375 }
1385 if (lvd->integritySeqExt.extLength) 1376 if (lvd->integritySeqExt.extLength)
@@ -1734,8 +1725,7 @@ static int udf_load_vrs(struct super_block *sb, struct udf_options *uopt,
1734 return 0; 1725 return 0;
1735 } 1726 }
1736 if (nsr_off == -1) 1727 if (nsr_off == -1)
1737 udf_debug("Failed to read byte 32768. Assuming open " 1728 udf_debug("Failed to read byte 32768. Assuming open disc. Skipping validity check\n");
1738 "disc. Skipping validity check\n");
1739 if (!sbi->s_last_block) 1729 if (!sbi->s_last_block)
1740 sbi->s_last_block = udf_get_last_block(sb); 1730 sbi->s_last_block = udf_get_last_block(sb);
1741 } else { 1731 } else {