Skip to contentSkip to conversation

ac4 ext3 recovery failure

DISCUSSION Greg Louis 3 participants 5 messages Aug 3, 2001

lore
Share & tools
lore

Greg Louis

author
#0 lore raw

Rebooting to try 2.4.7-ac4, I had Xfree86 crash on exit and hang the machine (it does that once a month or so; this notebook gets booted quite often). After fscking the root and another ext2 partition, the system got to the big ext3 partition and just went dead. No message, no disk activity, no keyboard response. I powered down and rebooted 2.4.7-ac3 patched with ext3-2.4-0.9.5-247ac3, and that came up ok and recovered the journalled partition.

Signature · 2 lines
| G r e g  L o u i s          | gpg public key:      |
|   http://www.bgl.nu/~glouis |   finger [email protected] |
#1 lore raw
Quoted 8 lines · Greg Louis

Rebooting to try 2.4.7-ac4, I had Xfree86 crash on exit and hang the machine (it does that once a month or so; this notebook gets booted quite often). After fscking the root and another ext2 partition, the system got to the big ext3 partition and just went dead. No message, no disk activity, no keyboard response. I powered down and rebooted 2.4.7-ac3 patched with ext3-2.4-0.9.5-247ac3, and that came up ok and recovered the journalled partition.

Do you think this happened during the e2fsck run, or during the actual mount?

-

#2 lore raw
Quoted 2 lines · Andrew Morton

Do you think this happened during the e2fsck run, or during the actual mount?

actual mount. s/fsync_dev/fsync_no_super/ in fs/jbd/*. Already fixed in Alan's tree.

BTW, code around the place in question looks somewhat fishy - looks like you have a lot of stuff assuming that journal and fs are on the same device.

#3 lore raw
In reply to Andrew Morton
Quoted 8 lines · Alexander Viro
Quoted 2 lines · Andrew Morton

Do you think this happened during the e2fsck run, or during the actual mount?

actual mount. s/fsync_dev/fsync_no_super/ in fs/jbd/*. Already fixed in Alan's tree.

Ah. Thanks. Linus doesn't seem to have fsync_no_super(), so some compatibility hacks will be needed there.

Why does fsync_no_super() exist? I assume some locking changes somewhere?

Quoted 3 lines

BTW, code around the place in question looks somewhat fishy - looks like you have a lot of stuff assuming that journal and fs are on the same device.

Yes - this was fixed up when we were testing the external journal support for 0.9.5. -ac4 has 0.9.3+bits.

-

#4 lore raw
Quoted 2 lines · Andrew Morton

Ah. Thanks. Linus doesn't seem to have fsync_no_super(), so some compatibility hacks will be needed there.

Merge with fs/super.c fixes (happens in -ac)

Quoted 2 lines

Why does fsync_no_super() exist? I assume some locking changes somewhere?

It's fsync_dev() without touching fs structures.

fsync_super() - we hold a superblock, sync its in-core structures and sync the device
fsync_dev() - we have a device, find superblock, grab it and sync (see above). We need exclusion against read_super() and umount here - code in Linus' tree is oopsable exactly because it lacks that.
fsync_no_super() - we have a device, sync it without even looking for fs in-core stuff.

Notice that fsync_dev() in the wrong moment can seriously screw vanilla 2.4. In -ac4 it got the required exclusion, but that means the need to use the fsync_super() or fsync_no_super() if you are in the exclusion area. That had been done to the stuff common with Linus' tree, so there's not much to fix. AFAICS jbd/recovery.c is the only place not covered.