archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <>
To: Jan Kara <>
	Christoph Hellwig <>,
Subject: Re: [PATCH v2] block: Try to handle busy underlying device on discard
Date: Fri, 5 Mar 2021 11:27:44 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2/22/21 2:48 AM, Jan Kara wrote:
> Commit 384d87ef2c95 ("block: Do not discard buffers under a mounted
> filesystem") made paths issuing discard or zeroout requests to the
> underlying device try to grab block device in exclusive mode. If that
> failed we returned EBUSY to userspace. This however caused unexpected
> fallout in userspace where e.g. FUSE filesystems issue discard requests
> from userspace daemons although the device is open exclusively by the
> kernel. Also shrinking of logical volume by LVM issues discard requests
> to a device which may be claimed exclusively because there's another LV
> on the same PV. So to avoid these userspace regressions, fall back to
> invalidate_inode_pages2_range() instead of returning EBUSY to userspace
> and return EBUSY only of that call fails as well (meaning that there's
> indeed someone using the particular device range we are trying to
> discard).

This missed -rc2, but I'll queue it up for -rc3.

Jens Axboe

      parent reply	other threads:[~2021-03-05 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22  9:48 Jan Kara
2021-02-22 11:59 ` Jan Kara
2021-03-04 12:02 ` Jan Kara
2021-03-05 13:12 ` Christoph Hellwig
2021-03-05 18:27 ` Jens Axboe [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH v2] block: Try to handle busy underlying device on discard' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).