xfs
[Top] [All Lists]

Re: [resend PATCH 1/3] block, fs: reliably communicate bdev end-of-life

To: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Subject: Re: [resend PATCH 1/3] block, fs: reliably communicate bdev end-of-life
From: Dan Williams <dan.j.williams@xxxxxxxxx>
Date: Sat, 9 Jan 2016 06:17:24 -0800
Cc: XFS Developers <xfs@xxxxxxxxxxx>, linux-block@xxxxxxxxxxxxxxx, linux-nvdimm <linux-nvdimm@xxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, Jens Axboe <axboe@xxxxxx>, Jan Kara <jack@xxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxxxx>, Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
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:content-type; bh=4kt+O+jqSh+lgfDzPkb4E5DaXrRyVMt0+kNa9DZRXIQ=; b=me5Z2pLY9gop2TTfFXrv3meL1Huen5gmMpGqSn9NrUu4Pd8c8zX4CJECPOWGEDtSEm gx+8cRG9BVx/kALcBMrS2ETR5do4BjaiM9sDLj1gnPUZng+FAwKe++gviapI137iy6Ki vnp0aHPbZwFPAioks6evaWhhy97YwyfQzW0wT/qu6niWhzXIrRAiR2iyFMB6IRb9GGdV QpPlUpFHTsNz/z7q5wkejcc96GJ8nn08BZHYrW0QglQc5UdL8wJEboJ6k7to/ML2OqFA P1IlTs26ZbXmWgvbOlQU5mpcGjZNylO9A64uO5+GdRxKDnxFtdztPWa1Idt/8GUzEhOS bPdA==
In-reply-to: <20160109075414.GA5008@xxxxxxxxxxxxxxxxxx>
References: <20160104181220.24118.96661.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160104182005.24118.50361.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160109075414.GA5008@xxxxxxxxxxxxxxxxxx>
On Fri, Jan 8, 2016 at 11:54 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Jan 04, 2016 at 10:20:05AM -0800, Dan Williams wrote:
[..]
>         Would you mind explaining what the hell is _the_ backing device
> of a filesystem?  What does that translate into in case of e.g. btrfs
> spanning several disks?  Or ext4 with journal on a different device, for
> that matter?
>
>         If anything, I would argue that filesystem is out of place here -
> general situation is "IO on X may require IO on device Y and X needs to do
> something when Y goes away".  Consider e.g. /dev/loop backed by a device
> that went away.  Or by a file on fs that has run down the curtain and joined
> the bleedin choir invisible.  With another fs partially hosted by that
> loopback device.  Or by RAID0 containing said device.
>
>         You are given Y and attempt to locate the affected X.  _Then_
> you assume that X is a filesystem and has "something to be done" independent
> from the role Y played for it, so you can pick that action from superblock
> method.
>
>         IMO you are placing the burden in the wrong place.  _Recepient_
> knows what it depends upon and what should be done for each source of
> trouble.  So make it recepient's responsibility to request notifications.
> At which point the superblock method goes away, along with the requirement
> to handle all sources of trouble the same way, etc.
>
>         What's more, things like RAID5 (also interested in knowing when
> a component has been ripped out) might or might not decide to propagate
> the event further - after all, that's exactly the point of redundancy.
>
>         I'd look into something along the lines of notifier chain per
> gendisk, with potential victims registering a callback when they decide
> that from now on such and such device might screw them over...

Makes sense.  I'll drop this series for now and come back after
re-working it use notifiers.

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