Description of problem: I have a file containing ext2 filesystem (created just by mke2fs -F file). When I've accidentally gave resize2f an bogus size argument, the command went on crazy loop instead of some graceful 'learn to type, user' refusal. # resize2fs /tmp/tmp.lntZtMFvz8/fake-disk bogus 2> log Resizing the filesystem on /tmp/tmp.lntZtMFvz8/fake-disk to 0 (1k) blocks. ...waiting for 10 seconds... ok, thats enough ^C [root@dhcp-lab-123 smoke-test]# cat log | wc -l 627587 [root@dhcp-lab-123 smoke-test]# head log resize2fs 1.41.0 (10-Jul-2008) Illegal block number passed to ext2fs_test_block_bitmap #1 for block bitmap for /tmp/tmp.lntZtMFvz8/fake-disk ...the same message repeated zillion times... Version-Release number of selected component (if applicable): resize2fs 1.41.0 (10-Jul-2008) [root@dhcp-lab-123 smoke-test]# rpm -q e2fsprogs e2fsprogs-1.41.0-2.fc9.x86_64 How reproducible: always for me Steps to Reproduce: 1. dd if=/dev/zero of=gggg bs=1024k count=42 2. mke2fs -F gggg 3. resize2fs gggg bogus Actual results: loop Expected results: graceful end and some user insult Additional info: I've tried that on RHEL5.2 e2fsprogs. resize2fs handles this case gracefully there: # resize2fs /tmp/disk rd resize2fs 1.39 (29-May-2006) resize2fs: bad filesystem size - rd
Thanks, I'll look into this (and think of some suitable insult ....)
I've sent a patch upstream for this. http://marc.info/?l=linux-ext4&m=122367830026005&w=2 (_("Invalid new size: %s\n"), new_size_str) is the only insult I came up with :)
http://git.kernel.org/?p=fs/ext2/e2fsprogs.git;a=commitdiff;h=279a000fdcfd5fa79f18c975978d1c6bfa3113a3
e2fsprogs-1.41.3-2.fc9 has been submitted as an update for Fedora 9. http://admin.fedoraproject.org/updates/e2fsprogs-1.41.3-2.fc9
e2fsprogs-1.41.3-2.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update e2fsprogs'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8884
e2fsprogs-1.41.3-2.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.