xfs
[Top] [All Lists]

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

To: "Verma, Vishal L" <vishal.l.verma@xxxxxxxxx>
Subject: Re: [PATCH 5/5] dax: handle media errors in dax_do_io
From: Dan Williams <dan.j.williams@xxxxxxxxx>
Date: Fri, 25 Mar 2016 14:42:37 -0700
Cc: "hch@xxxxxxxxxxxxx" <hch@xxxxxxxxxxxxx>, "linux-block@xxxxxxxxxxxxxxx" <linux-block@xxxxxxxxxxxxxxx>, "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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=f+qCR48v8uxXBb929iAb8VEY3jH0LGoc7EJ1WWZrQhI=; b=ZG+DlJN6SKjo/LRQxOyQ+5x3k5NmtHWBjBbBLiSZDM1sb+b0szUwmp0Wu3SRg0CcWY DRKQ7/FSFZ5Xf52U5XgbCnV+x25HoATdqeA+1mLxxx+OyZ+heB3xyX9kSREWk+y14LEI 2xUBRdaFIEJEQQHfBKQX0M8rdlxwle/TNhAs3334qYiTOjJwxxv6TzTpgDkjweYVo8z8 fbm6kZP/v/PLyBUT4A1mKhah0EJQY9vGfej4OLbXXOCAAse/8VxqYPm7RiZjDmWL1hHP zGRU7VaDKgZZT83lULk2PlDIDO+ZsRni68VxrWHYzfizlUpgEfOyofnmVQ9Pifgdl7GA 4eKw==
In-reply-to: <1458939566.5501.5.camel@xxxxxxxxx>
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>
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.

<Prev in Thread] Current Thread [Next in Thread>