public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: xfs@oss.sgi.com
Subject: Re: [PATCH 0/7] Configurable error behavior [V3]
Date: Thu, 5 May 2016 11:18:28 -0400	[thread overview]
Message-ID: <20160505151827.GA1523@bfoster.bfoster> (raw)
In-Reply-To: <20160505143718.GB9359@redhat.com>

On Thu, May 05, 2016 at 04:37:18PM +0200, Carlos Maiolino wrote:
> On Thu, May 05, 2016 at 10:11:07AM -0400, Brian Foster wrote:
> > On Wed, May 04, 2016 at 05:43:13PM +0200, Carlos Maiolino wrote:
> > > This is the new revision of this patchset, according to last comments.
> > > 
> > > This patchset is aimed to implement a configurable error behavior in XFS, and
> > > most of the design has been done by Dave, so, that's why I kept his signed-off
> > > in the patches.
> > > 
> > > This new revision has the detailed changelog written on each patch, but the
> > > major changes are:
> > > 
> > > 	- Detailed changelog by-patch and description fixed to become
> > > 	  (hopefuly) more clear
> > > 	- kept fail_at_unmount as a sysfs attribute
> > > 
> > > 
> > > Regarding fail_at_unmount, I left it almost exactly as Dave's design, giving his
> > > comments on the last revision, although, I still think there is no need to keep
> > > it as a per-error granularity, so, I was wondering if a single, global option in
> > > /sys/fs/xfs/<dev>/error/fail_at_unmount wouldn't suffice, but, this will require
> > > a new place to store the value inside kernel, instead of keeping it inside
> > > struct xfs_error_cfg, or maybe use the same structure but use it outside of the
> > > m_error_cfg array?
> > > 
> > 
> > I agree with regard to the granularity of fail_at_unmount. This was
> > brought up previously:
> > 
> > http://oss.sgi.com/archives/xfs/2016-02/msg00558.html
> > 
> > ... and I haven't heard a use case for per-error granularity.
> 
> Hi, yes, my comment was based on our previous discussion, my apologies to not
> have made it clear.
> 

Ok..

> > 
> > I suggest just to pull it out of the error classification stuff entirely
> > and place it under xfs_mount. E.g., at the same level as "fail_writes"
> > (but not a DEBUG mode only option).
> > 
> > I'm also wondering whether we need more mechanism for the
> > fail_at_unmount behavior. For example, instead of defining
> > XFS_MOUNT_UNMOUNTING, could we just call a function that resets
> > max_retries (of each class) to 0 in the unmount path? Then maybe call
> > the mount tunable retry_on_unmount or something like that. Thoughts?
> > 
> I don't oppose to that, although, having a flag like XFS_MOUNT_UNMOUNTING, might
> be useful in the future, but still, wouldn't be better this single flag, instead
> of walk through all classes/errors resetting the max_retries? It sounds as
> granular as having fail_at_unmount inside each error, despite the fact it's not
> exposed to user-space, we will need to interact over each max_retries to
> actually shutdown the filesystem during unmount, which, is also error-prone
> IMHO.

I view the granularity problem as a usability problem, not necessarily a
code problem. E.g., why would somebody know or care to configure certain
errors to fail on unmount but not others. If we have a knob, I think the
knob is more clear as a general behavior knob rather than an error
classification knob. Of course, that assumes there isn't some unknown
good reason for per-error behavior (and/or a userspace mgmt tool that
could provide a more usable interface on top of per-error knobs).

> It also depends on how granular we will implement fail_at_unmount. If it's a
> single global option, resetting all max_retries works, otherwise it might not
> work, for example, if we decide to have fail_at_unmount for each class, we might
> need to reset max_retries only in specific errors, which will increase the
> complexity of the code.
> 

I'm assuming a per-mount option is sufficient. :) Otherwise, I'm just
thinking out loud for ways to try and condense and/or reuse the code a
bit here. I don't see a reason to add new mechanisms or config tunables
in cases where we can accomplish the same thing by making existing
knobs/mechanisms sufficiently generic.

Sure, the code might be slightly more complex (or maybe some of the
existing code can be refactored to support a reinit) and it might
introduce the issue of unmount racing against sysfs knob updates. The
tradeoff is that it reuses an existing mechanism, for what that's worth.
Just an idea, though. ;)

Brian

> Well, hope my comments make sense, just giving my $0.02 :)
> 
> cheers
> 
> > Brian
> > 
> > > First 6 patches are ready, the fail_at_unmount one, need to be re-worked if we
> > > want it in a less granular way, but until now I don't think we reached any
> > > decision about how it should be implemented.
> > > 
> > >  fs/xfs/xfs_buf.h      |  22 ++++
> > >  fs/xfs/xfs_buf_item.c | 126 ++++++++++++++--------
> > >  fs/xfs/xfs_mount.c    |  19 +++-
> > >  fs/xfs/xfs_mount.h    |  32 ++++++
> > >  fs/xfs/xfs_sysfs.c    | 283 +++++++++++++++++++++++++++++++++++++++++++++++++-
> > >  fs/xfs/xfs_sysfs.h    |   3 +
> > >  6 files changed, 437 insertions(+), 48 deletions(-)
> > > 
> > > -- 
> > > 2.4.11
> > > 
> > > _______________________________________________
> > > xfs mailing list
> > > xfs@oss.sgi.com
> > > http://oss.sgi.com/mailman/listinfo/xfs
> > 
> > _______________________________________________
> > xfs mailing list
> > xfs@oss.sgi.com
> > http://oss.sgi.com/mailman/listinfo/xfs
> 
> -- 
> Carlos
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2016-05-05 15:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 15:43 [PATCH 0/7] Configurable error behavior [V3] Carlos Maiolino
2016-05-04 15:43 ` [PATCH 1/7] xfs: configurable error behavior via sysfs Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-04 15:43 ` [PATCH 2/7] xfs: introduce metadata IO error class Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-04 15:43 ` [PATCH 3/7] xfs: add configurable error support to metadata buffers Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-04 15:43 ` [PATCH 4/7] xfs: introduce table-based init for error behaviors Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-04 15:43 ` [PATCH 5/7] xfs: add configuration of error failure speed Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-06  0:04   ` Dave Chinner
2016-05-06 10:59     ` Carlos Maiolino
2016-05-04 15:43 ` [PATCH 6/7] xfs: add configuration handlers for specific errors Carlos Maiolino
2016-05-05 14:11   ` Brian Foster
2016-05-05 23:57     ` Dave Chinner
2016-05-04 15:43 ` [PATCH 7/7] xfs: add "fail at unmount" error handling configuration Carlos Maiolino
2016-05-05 14:11 ` [PATCH 0/7] Configurable error behavior [V3] Brian Foster
2016-05-05 14:37   ` Carlos Maiolino
2016-05-05 15:18     ` Brian Foster [this message]
2016-05-05 23:49       ` Dave Chinner

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=20160505151827.GA1523@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=xfs@oss.sgi.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