From: Greg KH <greg@kroah.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: stable@vger.kernel.org, linux-btrfs@vger.kernel.org,
Daan De Meyer <daandemeyer@fb.com>,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Subject: Re: [PATCH stable-5.4.y] btrfs: free device in btrfs_close_devices for a single device filesystem
Date: Fri, 17 Feb 2023 15:04:06 +0100 [thread overview]
Message-ID: <Y++JVrLeMPKl8CFg@kroah.com> (raw)
In-Reply-To: <03596be514e296d87240c2b044b7088962ad9f1c.1676435839.git.anand.jain@oracle.com>
On Wed, Feb 15, 2023 at 12:53:03PM +0800, Anand Jain wrote:
> commit 5f58d783fd7823b2c2d5954d1126e702f94bfc4c upstream
>
> We have this check to make sure we don't accidentally add older devices
> that may have disappeared and re-appeared with an older generation from
> being added to an fs_devices (such as a replace source device). This
> makes sense, we don't want stale disks in our file system. However for
> single disks this doesn't really make sense.
>
> I've seen this in testing, but I was provided a reproducer from a
> project that builds btrfs images on loopback devices. The loopback
> device gets cached with the new generation, and then if it is re-used to
> generate a new file system we'll fail to mount it because the new fs is
> "older" than what we have in cache.
>
> Fix this by freeing the cache when closing the device for a single device
> filesystem. This will ensure that the mount command passed device path is
> scanned successfully during the next mount.
>
> CC: stable@vger.kernel.org # 5.10+
> Reported-by: Daan De Meyer <daandemeyer@fb.com>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> Reviewed-by: David Sterba <dsterba@suse.com>
> Signed-off-by: David Sterba <dsterba@suse.com>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> This patch has already been submitted for the LTS stable 5.10 and above.
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2023-02-17 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 4:53 [PATCH stable-5.4.y] btrfs: free device in btrfs_close_devices for a single device filesystem Anand Jain
2023-02-17 14:04 ` Greg KH [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:
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=Y++JVrLeMPKl8CFg@kroah.com \
--to=greg@kroah.com \
--cc=anand.jain@oracle.com \
--cc=daandemeyer@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=stable@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.