reiserfs: Fix signedness issues for large file systems
Now that we handle file systems > 8 TB, we end up printing large negative numbers instead of actual block numbers. This patch fixes those places to use unsigned ints for block numbers. Signed-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
1 parent
5d4f1fa494
commit
0265fd70c1
13 files changed
+47
-44
No files matched your search
+3
-3
@@ -119,7 +119,7 @@ static int is_block_free (reiserfs_filsys_t * fs, unsigned long block)
|
||||
}
|
||||
|
||||
|
||||
/*static int hits = 0;*/
|
||||
/*static unsigned int hits = 0;*/
|
||||
|
||||
/* we have seen this block in the tree, mark corresponding bit in the
|
||||
control bitmap */
|
||||
@@ -156,7 +156,7 @@ static void init_control_bitmap (reiserfs_filsys_t * fs)
|
||||
for (i = 0; i <= fs->fs_super_bh->b_blocknr; i ++)
|
||||
we_met_it (i);
|
||||
|
||||
/*printf ("SKIPPED: %d blocks marked used (%d)\n", hits,
|
||||
/*printf ("SKIPPED: %u blocks marked used (%d)\n", hits,
|
||||
reiserfs_bitmap_zeros (control_bitmap));
|
||||
hits = 0;*/
|
||||
|
||||
@@ -172,7 +172,7 @@ static void init_control_bitmap (reiserfs_filsys_t * fs)
|
||||
block ++;
|
||||
}
|
||||
|
||||
/*printf ("BITMAPS: %d blocks marked used (%d)\n", hits,
|
||||
/*printf ("BITMAPS: %u blocks marked used (%d)\n", hits,
|
||||
reiserfs_bitmap_zeros (control_bitmap));
|
||||
|
||||
hits = 0;*/
|
||||
|
||||
+5
-5
@@ -1759,7 +1759,7 @@ static void init_source_bitmap (reiserfs_filsys_t * fs)
|
||||
case ALL_BLOCKS:
|
||||
fsck_source_bitmap (fs) = reiserfs_create_bitmap (block_count);
|
||||
reiserfs_bitmap_fill (fsck_source_bitmap (fs));
|
||||
fsck_progress ("The whole partition (%d blocks) is to be scanned\n",
|
||||
fsck_progress ("The whole partition (%u blocks) is to be scanned\n",
|
||||
reiserfs_bitmap_ones (fsck_source_bitmap (fs)));
|
||||
break;
|
||||
|
||||
@@ -1768,7 +1768,7 @@ static void init_source_bitmap (reiserfs_filsys_t * fs)
|
||||
fsck_source_bitmap (fs) = reiserfs_create_bitmap (block_count);
|
||||
reiserfs_bitmap_copy (fsck_source_bitmap (fs), fs->fs_bitmap2);
|
||||
|
||||
fsck_progress ("ok, %d blocks marked used\n",
|
||||
fsck_progress ("ok, %u blocks marked used\n",
|
||||
reiserfs_bitmap_ones (fsck_source_bitmap (fs)));
|
||||
break;
|
||||
|
||||
@@ -1787,7 +1787,7 @@ static void init_source_bitmap (reiserfs_filsys_t * fs)
|
||||
fsck_data (fs)->rebuild.bitmap_file_name);
|
||||
}
|
||||
|
||||
fsck_progress ("%d blocks marked used in extern bitmap\n",
|
||||
fsck_progress ("%u blocks marked used in extern bitmap\n",
|
||||
reiserfs_bitmap_ones (fsck_source_bitmap (fs)));
|
||||
fclose (fp);
|
||||
break;
|
||||
@@ -1863,8 +1863,8 @@ static void init_source_bitmap (reiserfs_filsys_t * fs)
|
||||
|
||||
fsck_source_bitmap (fs)->bm_set_bits = reiserfs_bitmap_ones (fsck_source_bitmap (fs));
|
||||
|
||||
fsck_progress ("Skipping %d blocks (super block, journal, "
|
||||
"bitmaps) %d blocks will be read\n", tmp, fsck_source_bitmap (fs)->bm_set_bits);
|
||||
fsck_progress ("Skipping %u blocks (super block, journal, "
|
||||
"bitmaps) %u blocks will be read\n", tmp, fsck_source_bitmap (fs)->bm_set_bits);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -646,8 +646,8 @@ void load_pass_1_result (FILE * fp, reiserfs_filsys_t * fs)
|
||||
fetch_objectid_map (proper_id_map (fs), fs);
|
||||
*/
|
||||
|
||||
fsck_progress ("Pass 1 result loaded. %d blocks used, %d allocable, "
|
||||
"still to be inserted %d\n",
|
||||
fsck_progress ("Pass 1 result loaded. %u blocks used, %u allocable, "
|
||||
"still to be inserted %u\n",
|
||||
reiserfs_bitmap_ones (fsck_new_bitmap (fs)),
|
||||
reiserfs_bitmap_zeros (fsck_allocable_bitmap (fs)),
|
||||
reiserfs_bitmap_zeros (fsck_uninsertables (fs)));
|
||||
|
||||
Reference in new issue
Block a user