linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Qu Wenruo <quwenruo.btrfs@gmx.com>,
	Keith Busch <kbusch@kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: What would happen if the block device driver/firmware found some block of a bio is corrupted?
Date: Tue, 24 Jan 2023 16:08:20 +0000	[thread overview]
Message-ID: <Y9ACdOeBRHOxe5TA@casper.infradead.org> (raw)
In-Reply-To: <Y897ZrBFdfLcHFma@infradead.org>

On Mon, Jan 23, 2023 at 10:32:06PM -0800, Christoph Hellwig wrote:
> On Tue, Jan 24, 2023 at 01:38:41PM +0800, Qu Wenruo wrote:
> > The retry for file read is indeed triggered inside VFS, not fs/block/dm
> > layer itself.
> 
> Well, it's really MM code.  If ->readahead fails, we eventually fall
> back to a single-page ->radpage.  That might still be more than one
> sector in some cases, but at least nicely narrows down the range.

I had code to split a large folio into single-page folios at one point,
but I don't believe that ever got merged.  At least, I can't find any
trace of it in filemap.c or iomap/buffered_io.c.  So I think we just
retry the ->read_folio() call each time.

      parent reply	other threads:[~2023-01-24 16:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24  2:31 What would happen if the block device driver/firmware found some block of a bio is corrupted? Qu Wenruo
2023-01-24  4:44 ` Keith Busch
2023-01-24  5:38   ` Qu Wenruo
2023-01-24  6:32     ` Christoph Hellwig
2023-01-24  7:52       ` Qu Wenruo
2023-01-24  7:54         ` Christoph Hellwig
2023-01-24 16:08       ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9ACdOeBRHOxe5TA@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=hch@infradead.org \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).