[ext2resize] Re: Patch 2.2-20003022
Status: Inactive
Brought to you by:
adilger
From: Andreas D. <ad...@ho...> - 2000-03-27 10:48:51
|
Detlef, you write: > I have tested your patch. With sparse superblock flag turned on the block > counter of the last group is correct. Otherwise the the counter is wrong. > I have attached the debug output for both cases. I have figured out the problem, and I'm just compiling a new kernel to test it, but it is late and I will send you the patch to fix the problem. The issue is that an ext2 kernel function doesn't behave as I expected it to, based on how the same function behaves in e2fsprogs. There are two ways to fix this, either change my code, or change the function in the kernel. While it is less likely that making more changes to the kernel will be accepted at this stage in 2.3, I think my change is the correct way (it also cleans up the existing code a bit) and I will submit a patch to Linus as such. If he doesn't like it, then I can always go back and change the ext2resize code to be a bit uglier. For now, what you can do, is in ext2_update_group() change m_blocks to be: m_blocks = sb->u.ext2_sb.s_itb_per_group + 2 + (!(sb->u.ext2_sb.s_feature_ro_compat & EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || ext2_group_sparse(block_group) ? 1 + sb->u.ext2_sb.s_db_per_group + resgdt : 0) + blocks; This should fix the problems with non-sparse-super filesystems not being resized properly, while also allowing sparse-super filesystems to work. Cheers, Andreas -- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert |