Re: [rfc patch 3/4] splice: remove confirm frompipe_buf_operations

From: Miklos Szeredi
Date: Tue Jun 24 2008 - 16:06:31 EST


> >
> > Or it can only happen if there was an I/O error on reading the page.
>
> Now, IO errors are something else. They should have the PG_error bit set,
> and we should just return EIO or something.

Linus, you're right (as always), but see where this is going? A rare
problem (splice() returning short count because of an invalidated
page) is becoming an even more rare problem (splice() returning
rubbish instead of an error, if ->readpage() failed, and filesystem
forgot to set PG_error). And it won't show up in any other paths,
because the generic_file_aio_read() path will just check
PageUptodate(), and return -EIO if not.

OK, maybe we should add a WARN_ON(!PageError()) for the
!PageUptodate() case in generic_file_aio_read(), but that could still
leave some filesystems broken for a long time which experience I/O
errors rarely.

So I think the only sane solution here is to remove
ClearPageUptodate(). But that's a VM people's call, I don't have
enough insight into that.

Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/