xfs
[Top] [All Lists]

Re: [PATCH 5/5] dax: handle media errors in dax_do_io

To: "Williams, Dan J" <dan.j.williams@xxxxxxxxx>
Subject: Re: [PATCH 5/5] dax: handle media errors in dax_do_io
From: "Verma, Vishal L" <vishal.l.verma@xxxxxxxxx>
Date: Fri, 25 Mar 2016 22:36:17 +0000
Accept-language: en-US
Cc: "linux-block@xxxxxxxxxxxxxxx" <linux-block@xxxxxxxxxxxxxxx>, "hch@xxxxxxxxxxxxx" <hch@xxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, "linux-nvdimm@xxxxxxxxxxx" <linux-nvdimm@xxxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>, "viro@xxxxxxxxxxxxxxxxxx" <viro@xxxxxxxxxxxxxxxxxx>, "axboe@xxxxxx" <axboe@xxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, "ross.zwisler@xxxxxxxxxxxxxxx" <ross.zwisler@xxxxxxxxxxxxxxx>, "linux-ext4@xxxxxxxxxxxxxxx" <linux-ext4@xxxxxxxxxxxxxxx>, "Wilcox, Matthew R" <matthew.r.wilcox@xxxxxxxxx>, "david@xxxxxxxxxxxxx" <david@xxxxxxxxxxxxx>, "jack@xxxxxxx" <jack@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CAPcyv4jFPYYP=eL72V6MmW2fcXFP3PfQfcO+zYV4NN7rdu1ksg@xxxxxxxxxxxxxx>
References: <1458861450-17705-1-git-send-email-vishal.l.verma@xxxxxxxxx> <1458861450-17705-6-git-send-email-vishal.l.verma@xxxxxxxxx> <20160325104549.GB10525@xxxxxxxxxxxxx> <1458939566.5501.5.camel@xxxxxxxxx> <CAPcyv4jFPYYP=eL72V6MmW2fcXFP3PfQfcO+zYV4NN7rdu1ksg@xxxxxxxxxxxxxx>
Thread-index: AQHRhiN0/rGWKKyzgEa+J4vXlVWLHp9qcA6AgACrcQCAAAwRgIAADvsA
Thread-topic: [PATCH 5/5] dax: handle media errors in dax_do_io
On Fri, 2016-03-25 at 14:42 -0700, Dan Williams wrote:
> On Fri, Mar 25, 2016 at 1:59 PM, Verma, Vishal L
> <vishal.l.verma@xxxxxxxxx> wrote:
> > 
> > On Fri, 2016-03-25 at 03:45 -0700, Christoph Hellwig wrote:
> > > 
> > > On Thu, Mar 24, 2016 at 05:17:30PM -0600, Vishal Verma wrote:
> > > > 
> > > > 
> > > > dax_do_io (called for read() or write() for a dax file system)
> > > > may
> > > > fail
> > > > in the presence of bad blocks or media errors. Since we expect
> > > > that
> > > > a
> > > > write should clear media errors on nvdimms, make dax_do_io fall
> > > > back to
> > > > the direct_IO path, which will send down a bio to the driver,
> > > > which
> > > > can
> > > > then attempt to clear the error.
> > > Leave the fallback on -EIO to the callers please.ÂÂThey generally
> > > call
> > > __blockdev_direct_IO anyway, so it should actually become simpler
> > > that
> > > way.
> > I thought of this, but made the retrying happen in the wrapper so
> > that
> > it can be centralized. If the callers were to become responsible
> > for
> > the retry, then any new callers of dax_do_io might not realize they
> > are
> > responsible for retrying, and hit problems.
> That's their prerogative otherwise you are precluding an alternate
> handling of a dax_do_io() failure.ÂÂMaybe a fs or upper layer can
> recover in a different manner than re-submit the I/O to the
> __blockdev_direct_IO path.

I'm happy to make the change, but we don't preclude that -- __dax_do_io
is still exported and available..
<Prev in Thread] Current Thread [Next in Thread>