From: Anand Jain <anand.jain@oracle.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: free device without BTRFS_MAGIC
Date: Mon, 21 Sep 2020 19:19:41 +0800 [thread overview]
Message-ID: <e37d4e83-7e2f-3bd4-9e34-22c04a86b4f3@oracle.com> (raw)
In-Reply-To: <SN4PR0401MB35985D5EE98316CC15DBB5DB9B3A0@SN4PR0401MB3598.namprd04.prod.outlook.com>
On 21/9/20 6:52 pm, Johannes Thumshirn wrote:
> On 19/09/2020 04:53, Anand Jain wrote:
>> Fix is to return -ENODATA error code in btrfs_read_dev_one_super()
>> when BTRFS_MAGIC check fails, so that its parent open_fs_devices()
>> shall free the device in the mount-thread.
>
> But now it doesn't only fail if the BTRFS_MAGIC check failed but also,
> if the offset of the superblock doesn't match the offset for the copy.
>
> Sorry for not spotting this earlier.
>
Here are the links to the older comments.
https://patchwork.kernel.org/patch/11177085/
https://patchwork.kernel.org/patch/11177081/
I am not sure if -ENODATA is ok. It is open to comments. If it is not ok
then suggestions better alternative will help.
You are right I didn't intend to include btrfs_super_bytenr(super) !=
bytenr under -ENODATA thanks for spotting. Will fix.
next prev parent reply other threads:[~2020-09-21 11:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 2:52 [PATCH] btrfs: free device without BTRFS_MAGIC Anand Jain
2020-09-21 9:44 ` Johannes Thumshirn
2020-09-21 10:52 ` Johannes Thumshirn
2020-09-21 11:19 ` Anand Jain [this message]
2020-09-22 3:13 ` [PATCH v2] " Anand Jain
2020-09-23 11:09 ` Nikolay Borisov
2020-09-24 11:55 ` Anand Jain
2020-09-28 18:14 ` Josef Bacik
2020-09-30 7:21 ` Anand Jain
2020-09-30 12:41 ` Josef Bacik
2020-09-30 13:09 ` [PATCH v3] " Anand Jain
2020-10-01 1:05 ` Anand Jain
2020-10-01 10:49 ` David Sterba
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=e37d4e83-7e2f-3bd4-9e34-22c04a86b4f3@oracle.com \
--to=anand.jain@oracle.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).