kernel 3.13.0-157+158: ext4: wrong error message »invalid block bitmap«
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Incomplete
|
High
|
Unassigned |
Bug Description
W're getting the »invalid block bitmap« error since kernel 3.13.0-157
see
https:/
and in this diff the error is within
»if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||«
Kind regards, J. Barth
*** linux_3.
--- linux_3.
***************
*** 31,37 ****
}
/* Return the number of free blocks in a block group. It is used when
! @@ -419,11 +420,15 @@
}
ext4_
if (desc->bg_flags & cpu_to_
--- 31,102 ----
}
/* Return the number of free blocks in a block group. It is used when
! @@ -307,6 +308,7 @@
! ext4_group_t block_group,
! struct buffer_head *bh)
! {
! + struct ext4_sb_info *sbi = EXT4_SB(sb);
! ext4_grpblk_t offset;
! ext4_grpblk_t next_zero_bit;
! ext4_fsblk_t blk;
! @@ -326,24 +328,30 @@
! /* check whether block bitmap block number is set */
! blk = ext4_block_
! offset = blk - group_first_block;
! - if (!ext4_
! + if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
! + !ext4_test_
! /* bad block bitmap */
! return blk;
!
! /* check whether the inode bitmap block number is set */
! blk = ext4_inode_
! offset = blk - group_first_block;
! - if (!ext4_
! + if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
! + !ext4_test_
! /* bad block bitmap */
! return blk;
!
! /* check whether the inode table block number is set */
! blk = ext4_inode_
! offset = blk - group_first_block;
! + if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
! + EXT4_B2C(sbi, offset + sbi->s_
! + return blk;
! next_zero_bit = ext4_find_
! - offset + EXT4_SB(
! - offset);
! - if (next_zero_bit < offset + EXT4_SB(
! + EXT4_B2C(sbi, offset + EXT4_SB(
! + EXT4_B2C(sbi, offset));
! + if (next_zero_bit <
! + EXT4_B2C(sbi, offset + EXT4_SB(
! /* bad bitmap for inode tables */
! return blk;
! return 0;
! @@ -394,6 +402,7 @@
! ext4_read_
! {
! struct ext4_group_desc *desc;
! + struct ext4_sb_info *sbi = EXT4_SB(sb);
! struct buffer_head *bh;
! ext4_fsblk_t bitmap_blk;
!
! @@ -401,6 +410,12 @@
! if (!desc)
! return NULL;
! bitmap_blk = ext4_block_
! + if ((bitmap_blk <= le32_to_
! + (bitmap_blk >= ext4_blocks_
! + ext4_error(sb, "Invalid block bitmap block %llu in "
! + "block_group %u", bitmap_blk, block_group);
! + return ERR_PTR(-EIO);
! + }
! bh = sb_getblk(sb, bitmap_blk);
! if (unlikely(!bh)) {
! ext4_error(sb, "Cannot get buffer for block bitmap - "
! @@ -419,11 +434,15 @@
}
ext4_
if (desc->bg_flags & cpu_to_
Changed in linux (Ubuntu): | |
importance: | Undecided → High |
tags: | added: cscc |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1789435
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.