Journal writes hanging in presence of I/O errors
Hi,
I'm having a problem with journal writes hanging in the presence of an I/O error. I've verified that the block device driver is calling bh->b_end_io with uptodate set to 0 whenever this I/O error occurs. The process doing the write sits in the 'D' state. Here's its call trace:
Trace; c0114aca <sleep_on+4a/6c>
Trace; c01b70b4 <do_journal_begin_r+5c/230>
Trace; c01b72ce <journal_begin+2a/30>
Trace; c01a1c6d <reiserfs_get_block+1b9/de8>
Trace; c011beec <bh_action+4c/84>
Trace; c011bdcd <tasklet_hi_action+6d/9c>
Trace; c011bb51 <do_softirq+71/cc>
Trace; c010890b <do_IRQ+db/ec>
Trace; c013aa3f <__block_prepare_write+15b/344>
Trace; c013b382 <block_prepare_write+22/78>
Trace; c01a1ab4 <reiserfs_get_block+0/de8>
Trace; c01a46d5 <reiserfs_prepare_write+61/68>
Trace; c01a1ab4 <reiserfs_get_block+0/de8>
Trace; c012af65 <generic_file_write+4e9/7dc>
Trace; c0137bce <sys_write+92/110>
Trace; c010705f <system_call+33/38>
It never exits from that sleep_on. I believe it's sleeping on j_join_wait, but I'm not familiar enough with the reiserfs code to be 100% certain of that, or of who's meant to wake us up.
BTW: I'm using bonnie to test the filesystem when this is happening. When I use 'dt' to test the block device on its own, it does indeed exit with an error when the I/O error occurs. I'm using a logical volume manager that I can inject faults into in order to test filesystem and driver behavior.
Any ideas? The ideal behavior would be that the write system call just fails with EIO.
Regards,
Robert.
Signature · 3 lines
Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: [email protected]
On Thu, 2002-08-08 at 11:48, Robert Walsh wrote:
I'm using a logical volume
Quoted 5 lines
manager that I can inject faults into in order to test filesystem and driver behavior.
Any ideas? The ideal behavior would be that the write system call just fails with EIO.
This reminded me of something. I was thinking about bad blocks and other I/O errors this week because one of my IBM 60GXP drives is failing.)
I have this idea, and I wonder if anyone is already working on it?
Bad blocks and disk errors are a problem for every file system. Modern hard drives handle bad sectors by using the firmware to relocate to a good sector. The Linux kernel should have another layer (LVM, probably) between the hard drive and the file system that can do the same thing. The LVM layer should replace bad physical blocks with good ones. This way, the file system never needs to worry about it, except perhaps by setting a fsck-required flag. File system check would be required because on a read error, the replacement block wouldn't contain the correct data.
Has anyone written this into LVM?
Signature · 2 lines
Jonathan Briggs [email protected]
Quoted 9 lines
Bad blocks and disk errors are a problem for every file system. Modern hard drives handle bad sectors by using the firmware to relocate to a good sector. The Linux kernel should have another layer (LVM, probably) between the hard drive and the file system that can do the same thing. The LVM layer should replace bad physical blocks with good ones. This way, the file system never needs to worry about it, except perhaps by setting a fsck-required flag. File system check would be required because on a read error, the replacement block wouldn't contain the correct data.
This would work for small numbers of bad blocks, but for something more catastrophic, it might not be suitable. If you only have one physical drive underneath and it seizes up or something, then you've got issues that deferring it to the LVM isn't going to help with. You still need to check that your block I/O worked.
Regards,
Robert.
Signature · 3 lines
Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: [email protected]
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jonathan" == Jonathan Briggs <[email protected]> writes:
Jonathan> Bad blocks and disk errors are a problem for every file Jonathan> system. Modern hard drives handle bad sectors by using Jonathan> the firmware to relocate to a good sector. The Linux Jonathan> kernel should have another layer (LVM, probably) between Jonathan> the hard drive and the file system that can do the same
EVMS has something for handling bad blocks.
Sincerely,
Adrian Phillips
Signature · 3 lines
Your mouse has moved. Windows NT must be restarted for the change to take effect. Reboot now? [OK]