On Wed, 16 May 2007 17:39:19 +0200 Johann Lombardi <[EMAIL PROTECTED]> wrote:
> On Tue, May 15, 2007 at 02:23:39PM -0700, Andrew Morton wrote: > > > Yes, indeed. However, as soon as a call to get_block() fails, > > > do_mpage_readpage() will call block_read_full_page() which will attach > > > buffers to this page. > > > Consequently, all subsequent reads will go through block_read_full_page(). > > > > hm, confused. Why is get_block() failing? That has to go and read > > metadata. > > In fact, I am referring to the first part of my test case (i.e. mount the ext3 > fs, enable medium errors in scsi_debug and try to read a file from the fs). > > So, when I try to read a file, ext3_get_block() needs to read metadata from > the > disk. However, given that the SCSI disk simulated by scsi_debug reports medium > errors, ext3_get_block() returns EIO to the caller (i.e. do_mpage_readpage()). > That's why get_block() is failing. > > Then, do_mpage_readpage() calls block_read_full_page() (via "goto confused"). > block_read_full_page() attaches buffers to this page and calls > ext3_get_block() > which fails for the same reason as before. Consequently, > block_read_full_page() > sets the PG_error flag. > Moreover, all subsequent readpage calls will go through block_read_full_page() > because the page has now buffers attached. > > Basically, my problem is that afterwards, when the device no longer returns > any errors, the PG_error flag is never cleared and, as a result, I keep > getting -EIO. That's the problem I'd like to address. > hm, OK. So, where are we up to? I still worry about the fact that changes in this area could cause the kernel to do a *lot* more IO attempts against failed devices, or failed sectors. We already have a few problems in that area. What is the actual real-world operational scenario here? Would it be a hotplugged disk? A transient network failure in a SAN? IOW, is it something from which the kernel should automatically recover, or it is a situation in which manual intervention would be better? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/