All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Brian Foster <bfoster@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/4] xfs: don't block the log commit handler for discards
Date: Tue, 7 Feb 2017 10:50:49 +0100	[thread overview]
Message-ID: <20170207095049.GA15588@lst.de> (raw)
In-Reply-To: <20170206164924.GH57865@bfoster.bfoster>

On Mon, Feb 06, 2017 at 11:49:24AM -0500, Brian Foster wrote:
> > Can you explain in which contex you mean this?  I'm a bit lost on this
> > comment unfortunately.
> 
> Sorry.. what I'm concerned about is waiting on in-flight discards during
> unmount. The current discard code issues the discards synchronously and
> so the log force is sufficient to drain in-flight I/O before we start
> breaking down core data structures in the unmount path that would be
> referenced by end_io handlers and such.
> 
> With this change, the log force can return with discards still in
> flight. In fact, a subsequent flush of the workqueue is not sufficient
> since there's no guarantee the work item has been queued by that point
> either. If we don't have unmount serialization against in-flight I/Os,
> this can lead to unmount crashes (see the I/O accounting infrastructure
> added in commit 9c7504aa7 for an example of this problem with async
> buffer I/Os). Am I missing something that protects us from this problem
> here?

No, you're right.  We should have a xfs_extent_busy_flush_all call
in the unmount path.  I'll resend the series again with that added.

  reply	other threads:[~2017-02-07  9:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-29 18:43 improve busy extent handling and add async discard support Christoph Hellwig
2017-01-29 18:43 ` [PATCH 1/4] xfs: don't fail xfs_extent_busy allocation Christoph Hellwig
2017-02-03 15:20   ` Brian Foster
2017-02-04  9:50     ` Christoph Hellwig
2017-02-06 16:43       ` Brian Foster
2017-02-07  9:42         ` Christoph Hellwig
2017-01-29 18:43 ` [PATCH 2/4] xfs: improve handling of busy extents in the low-level allocator Christoph Hellwig
2017-02-03 15:22   ` Brian Foster
2017-02-04  9:54     ` Christoph Hellwig
2017-02-03 16:22   ` Brian Foster
2017-02-04  9:56     ` Christoph Hellwig
2017-02-06 16:47       ` Brian Foster
2017-02-07  9:43         ` Christoph Hellwig
2017-02-07 13:13           ` Brian Foster
2017-02-07 15:45             ` Christoph Hellwig
2017-01-29 18:43 ` [PATCH 3/4] xfs: improve busy extent sorting Christoph Hellwig
2017-02-03 15:22   ` Brian Foster
2017-02-04  9:58     ` Christoph Hellwig
2017-01-29 18:43 ` [PATCH 4/4] xfs: don't block the log commit handler for discards Christoph Hellwig
2017-02-03 16:22   ` Brian Foster
2017-02-04  9:59     ` Christoph Hellwig
2017-02-06 16:49       ` Brian Foster
2017-02-07  9:50         ` Christoph Hellwig [this message]
2017-02-05 17:11 improve busy extent handling and add async discard support V2 Christoph Hellwig
2017-02-05 17:11 ` [PATCH 4/4] xfs: don't block the log commit handler for discards Christoph Hellwig

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=20170207095049.GA15588@lst.de \
    --to=hch@lst.de \
    --cc=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.