summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@dilger.ca>2008-03-31 08:34:10 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-03-31 14:28:37 -0400
commitd78ea441a2e52f776cc192cc7d1d8b3be2abd971 (patch)
tree8cec3f3e2aaaf0db2349b2899b4dc710f7ba0db6 /lib
parent80fc4e698a308de22ace6179f45e0bb67befa74b (diff)
downloade2fsprogs-d78ea441a2e52f776cc192cc7d1d8b3be2abd971.tar.gz
ext2fs_set_gdt_csum(): Force the last block group to have a valid block bitmap
Never set the UNINIT_BLOCKS flag for the last group since the kernel doesn't handle the case graefully if there is a full set of blocks in each blockgroup marked UNINIT_BLOCKS. The kernel should be fixed up, but in the meantime this avoids hitting the problem, and is more consistent with lazy_bg not marking the last group UNINIT. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib')
-rw-r--r--lib/ext2fs/csum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c
index a385d76c..70deaa98 100644
--- a/lib/ext2fs/csum.c
+++ b/lib/ext2fs/csum.c
@@ -133,7 +133,7 @@ void ext2fs_set_gdt_csum(ext2_filsys fs)
/* skip first and last groups, or groups with GDT backups
* because the resize inode has blocks allocated in them. */
- if (i == 0 || (i == fs->group_desc_count - 1 && !csum_flag) ||
+ if (i == 0 || i == fs->group_desc_count - 1 ||
(ext2fs_bg_has_super(fs, i) && sb->s_reserved_gdt_blocks))
goto checksum;