From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/3] btrfs: introduce "abort=" groups for more strict error handling
Date: Mon, 25 Sep 2023 18:37:41 +0200 [thread overview]
Message-ID: <20230925163740.GQ13697@twin.jikos.cz> (raw)
In-Reply-To: <25c4f01f-a355-43b9-ab22-725353dc6380@suse.com>
On Sat, Sep 23, 2023 at 06:46:26AM +0930, Qu Wenruo wrote:
> On 2023/9/23 00:25, David Sterba wrote:
> > On Fri, Sep 22, 2023 at 12:25:18PM +0930, Qu Wenruo wrote:
> >> On the other hand, I totally understand if just a single sector failed
> >> to be write and we mark the whole fs read-only, it can be super
> >> frustrating for regular end users, thus we can not make it the default
> >> behavior.
> >
> > I can't imagine a realistic scenario where a user would like this
> > behaviour, one EIO takes down whole filesystem could make sense only for
> > some testing environments.
>
> I doubt, for some environment with expensive hardware, one may not even
> expect any -EIO for valid operations.
> If that happens, it may mean bad firmware or bad hardware, neither is a
> good thing especially if they paid extra money for the fancy hardware or
> the support fee.
So the semantics we'd need is like "fail on first error of <type>" where
we can define a set of errors, like EIO, superblock write erorr or
something related to devices.
> >> So here we introduce a mount option group "abort=", and make the
> >> following errors more noisy and abort early if specified by the user.
> >
> > Default andswer for a new mount option is 'no', here we also have one
> > that is probably doing the same, 'fatal_errors', so if you really want
> > to do that by a mount option then please use this one.
>
> Or I can go sysfs interface and put it under some debug directory.
For a prototype it's much more convenient until we understand what's the
actual usecase.
> >
> >> This new "rescue=super" may be more frequently used considering how
> >> loose our existing tolerance is.
> >>
> >> - Any data writeback failure
> >> This is only for the data writeback at btrfs bio layer.
> >> This means, if a data sector is going to be written to a RAID1 chunk,
> >> and one mirror failed, we still consider the writeback succeeded.
> >>
> >> There would be another one for btrfs bio layer, but I have found
> >> something weird in the code, thus it would only be introduced after I
> >> solved the problem there, meanwhile we can discuss on the usefulness of
> >> this patchset.
> >
> > We can possibly enhance the error checking with additional knobs and
> > checkpoints that will have to survive or detect specific testing, but as
> > mount options it's not very flexible. We can possibly do it via sysfs or
> > BPF but this may not be the proper interface anyway.
>
> I think sysfs would be better, but not familiar enough with BPF to
> determine if it's any better or worse.
BPF is probably a bad idea, I mentioned only as a potential way, it's
another extensible interface.
What you suggest looks like the forced shutdown of filesystem. This can
be done internally or externally (ioctl). I haven't looked at the
interface to what extent it's configurable, but let's say there's a
bitmask set by admin and the filesystem checks that in case a given type
of error happens. Then forced shutown would be like a transaction abort,
followed by read-only. We have decent support for that but with the
shutdown some kind of audit would have to happen anyway, namely for the
EIO type of errors. Specific context like super block write error would
be relatively easy.
next prev parent reply other threads:[~2023-09-25 16:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 2:55 [PATCH 0/3] btrfs: introduce "abort=" groups for more strict error handling Qu Wenruo
2023-09-22 2:55 ` [PATCH 1/3] btrfs: explicitly mark BTRFS_MOUNT_ enum as 64bit Qu Wenruo
2023-09-22 2:55 ` [PATCH 2/3] btrfs: introduce "abort=super" mount option Qu Wenruo
2023-09-22 2:55 ` [PATCH 3/3] btrfs: introduce "abort=data" " Qu Wenruo
2023-09-22 14:55 ` [PATCH 0/3] btrfs: introduce "abort=" groups for more strict error handling David Sterba
2023-09-22 21:16 ` Qu Wenruo
2023-09-25 16:37 ` David Sterba [this message]
2023-09-25 21:14 ` Qu Wenruo
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=20230925163740.GQ13697@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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