| Summary: | OOPs when online resizing ext3 fs | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Milan Broz <mbroz> |
| Component: | kernel | Assignee: | Lukáš Czerner <lczerner> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | gansalmon, itamar, jonathan, kernel-maint, lczerner, madhu.chinakonda, pvrabec |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | kernel-3.3.0-0.rc4.git1.4.fc17 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-02-28 10:56:10 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Milan Broz
2012-02-01 13:50:32 UTC
The patch is waiting for upstream merge for quite some time now: http://www.spinics.net/lists/linux-ext4/msg30293.html But hopefully will be merged soon :). Description: When resizing file system in the way that the new size of the file system is still in the same group (no new groups are added), then we can hit a BUG_ON in ext4_alloc_group_tables() BUG_ON(flex_gd->count == 0 || group_data == NULL); because flex_gd->count is zero. The reason is the missing check for such case, so the code always extend the last group fully and then attempt to add more groups, but at that time n_blocks_count is actually smaller than o_blocks_count. It can be easily reproduced like this: mkfs.ext4 -b 4096 /dev/sda 30M mount /dev/sda /mnt/test resize2fs /dev/sda 50M Fix this by checking whether the resize happens within the singe group and only add that many blocks into the last group to satisfy user request. Then o_blocks_count == n_blocks_count and the resize will exit successfully without and attempt to add more groups into the fs. Also fix mixing together block number and blocks count which might be confusing and can easily lead to off-by-one errors (but it is actually not the case here since the two occurrence of this mix-up will cancel each other). (In reply to comment #1) > The patch is waiting for upstream merge for quite some time now: > > http://www.spinics.net/lists/linux-ext4/msg30293.html Thanks Lukáš. I don't see this in linux-next or in the 'dev' branch of the ext4 git tree. Maybe you want to poke on the thread and follow up? Oh, thanks for reminding me :). -Lukas Ted finally applied this. Yay. I threw the patch in f17/rawhide. kernel-3.3.0-0.rc4.git1.4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/kernel-3.3.0-0.rc4.git1.4.fc17 Package kernel-3.3.0-0.rc4.git1.4.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing kernel-3.3.0-0.rc4.git1.4.fc17' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-2304/kernel-3.3.0-0.rc4.git1.4.fc17 then log in and leave karma (feedback). kernel-3.3.0-0.rc4.git1.4.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |