From: Greg KH <gregkh@linuxfoundation.org>
To: Anand Jain <anand.jain@oracle.com>
Cc: stable@vger.kernel.org, linux-btrfs@vger.kernel.org,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Subject: Re: [PATCH STABLE 5.4] btrfs: harden identification of a stale device
Date: Tue, 6 Sep 2022 14:01:23 +0200 [thread overview]
Message-ID: <Yxc2k7m+7DTqYoMR@kroah.com> (raw)
In-Reply-To: <0c060fb0-5b43-c868-940c-221cc48e9889@oracle.com>
On Sat, Sep 03, 2022 at 08:25:12PM +0800, Anand Jain wrote:
> On 9/2/22 17:23, Greg KH wrote:
> > On Fri, Sep 02, 2022 at 05:09:38PM +0800, Anand Jain wrote:
> > > commit 770c79fb65506fc7c16459855c3839429f46cb32 upstream
> > >
> > > Identifying and removing the stale device from the fs_uuids list is done
> > > by btrfs_free_stale_devices(). btrfs_free_stale_devices() in turn
> > > depends on device_path_matched() to check if the device appears in more
> > > than one btrfs_device structure.
> > >
> > > The matching of the device happens by its path, the device path. However,
> > > when device mapper is in use, the dm device paths are nothing but a link
> > > to the actual block device, which leads to the device_path_matched()
> > > failing to match.
> > >
> > > Fix this by matching the dev_t as provided by lookup_bdev() instead of
> > > plain string compare of the device paths.
> > >
> > > CC: stable@vger.kernel.org #5.4
> > > Reported-by: Josef Bacik <josef@toxicpanda.com>
> > > Signed-off-by: Anand Jain <anand.jain@oracle.com>
> > > Signed-off-by: David Sterba <dsterba@suse.com>
> > > ---
> > > fs/btrfs/volumes.c | 44 +++++++++++++++++++++++++++++++++++++-------
> > > 1 file changed, 37 insertions(+), 7 deletions(-)
> >
> > What about the same change for 5.10.y?
> >
>
> Thanks for reminding me.
> I have sent a separate patch for 5.10 as this patch won't apply to 5.10.
Both now queued up, thanks.
greg k-h
prev parent reply other threads:[~2022-09-06 12:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 9:09 [PATCH STABLE 5.4] btrfs: harden identification of a stale device Anand Jain
2022-09-02 9:23 ` Greg KH
2022-09-03 12:25 ` Anand Jain
2022-09-06 12:01 ` 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=Yxc2k7m+7DTqYoMR@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=anand.jain@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox