patch-2.4.7 linux/fs/ext2/balloc.c
Next file: linux/fs/ext2/dir.c
Previous file: linux/fs/exec.c
Back to the patch index
Back to the overall index
- Lines: 63
- Date:
Wed Jul 11 15:44:45 2001
- Orig file:
v2.4.6/linux/fs/ext2/balloc.c
- Orig date:
Fri Dec 29 14:36:44 2000
diff -u --recursive --new-file v2.4.6/linux/fs/ext2/balloc.c linux/fs/ext2/balloc.c
@@ -174,7 +174,7 @@
sb->u.ext2_sb.s_loaded_block_bitmaps++;
else
brelse (sb->u.ext2_sb.s_block_bitmap[EXT2_MAX_GROUP_LOADED - 1]);
- for (j = sb->u.ext2_sb.s_loaded_block_bitmaps - 1; j > 0; j--) {
+ for (j = sb->u.ext2_sb.s_loaded_block_bitmaps - 1; j > 0; j--) {
sb->u.ext2_sb.s_block_bitmap_number[j] =
sb->u.ext2_sb.s_block_bitmap_number[j - 1];
sb->u.ext2_sb.s_block_bitmap[j] =
@@ -276,7 +276,7 @@
goto error_return;
}
- ext2_debug ("freeing block %lu\n", block);
+ ext2_debug ("freeing block(s) %lu-%lu\n", block, block + count - 1);
do_more:
overflow = 0;
@@ -315,8 +315,8 @@
for (i = 0; i < count; i++) {
if (!ext2_clear_bit (bit + i, bh->b_data))
ext2_error (sb, "ext2_free_blocks",
- "bit already cleared for block %lu",
- block);
+ "bit already cleared for block %lu",
+ block + i);
else {
DQUOT_FREE_BLOCK(sb, inode, 1);
gdp->bg_free_blocks_count =
@@ -411,10 +411,7 @@
ext2_debug ("goal is at %d:%d.\n", i, j);
if (!ext2_test_bit(j, bh->b_data)) {
-#ifdef EXT2FS_DEBUG
- goal_hits++;
- ext2_debug ("goal bit allocated.\n");
-#endif
+ ext2_debug("goal bit allocated, %d hits\n",++goal_hits);
goto got_block;
}
if (j) {
@@ -471,10 +468,8 @@
if (i >= sb->u.ext2_sb.s_groups_count)
i = 0;
gdp = ext2_get_group_desc (sb, i, &bh2);
- if (!gdp) {
- *err = -EIO;
- goto out;
- }
+ if (!gdp)
+ goto io_error;
if (le16_to_cpu(gdp->bg_free_blocks_count) > 0)
break;
}
@@ -766,7 +761,7 @@
for (j = 0; j < sb->u.ext2_sb.s_itb_per_group; j++)
if (!block_in_use (le32_to_cpu(gdp->bg_inode_table) + j, sb, bh->b_data))
ext2_error (sb, "ext2_check_blocks_bitmap",
- "Block #%d of the inode table in "
+ "Block #%ld of the inode table in "
"group %d is marked free", j, i);
x = ext2_count_free (bh, sb->s_blocksize);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)