From: Su Yue <l@damenly.su>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: do not BUG_ON if btrfs_add_to_fsid succeeded to write superblock
Date: Thu, 13 May 2021 08:37:29 +0800 [thread overview]
Message-ID: <k0o3lb1d.fsf@damenly.su> (raw)
In-Reply-To: <20210512140135.GR7604@twin.jikos.cz>
On Wed 12 May 2021 at 22:01, David Sterba <dsterba@suse.cz> wrote:
> On Tue, May 11, 2021 at 12:25:01PM +0800, Su Yue wrote:
>> Commit 8ef9313cf298 ("btrfs-progs: zoned: implement
>> log-structured
>> superblock") changed to write BTRFS_SUPER_INFO_SIZE bytes to
>> device.
>> The before num of bytes to be written is sectorsize.
>> It causes mkfs.btrfs failed on my 16k pagesize kvm:
>
> What architecture is that?
>
The host chip is Apple m1 so it's arm64 but only supporting 16k
and 4k
pagesize. Since btrfs subpage work cares 64k pagesize for now, I
usually
run xfstests with 16k pagesize and 16k sectorsize. So far, so
good.
--
Su
>>
>> $ /usr/bin/mkfs.btrfs -s 16k -f -mraid0 /dev/vdb2 /dev/vdb3
>> btrfs-progs v5.12
>> See http://btrfs.wiki.kernel.org for more information.
>>
>> ERROR: superblock magic doesn't match
>> ERROR: superblock magic doesn't match
>> common/device-scan.c:195: btrfs_add_to_fsid: BUG_ON `ret !=
>> sectorsize`
>> triggered, value 1
>> /usr/bin/mkfs.btrfs(btrfs_add_to_fsid+0x274)[0xaaab4fe8a5fc]
>> /usr/bin/mkfs.btrfs(main+0x1188)[0xaaab4fe4dc8c]
>> /usr/lib/libc.so.6(__libc_start_main+0xe8)[0xffff7223c538]
>> /usr/bin/mkfs.btrfs(+0xc558)[0xaaab4fe4c558]
>>
>> [1] 225842 abort (core dumped) /usr/bin/mkfs.btrfs -s 16k
>> -f -mraid0
>> /dev/vdb2 /dev/vdb3
>>
>> btrfs_add_to_fsid() now always calls sbwrite() to write
>> BTRFS_SUPER_INFO_SIZE bytes to device, so change condition of
>> the BUG_ON().
>> Also add comments for sbread() and sbwrite().
>>
>> Signed-off-by: Su Yue <l@damenly.su>
>
> Added to devel, thanks.
next prev parent reply other threads:[~2021-05-13 0:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 4:25 [PATCH] btrfs-progs: do not BUG_ON if btrfs_add_to_fsid succeeded to write superblock Su Yue
2021-05-12 14:01 ` David Sterba
2021-05-13 0:37 ` Su Yue [this message]
2021-05-14 11:22 ` David Sterba
2021-05-14 13:23 ` Su Yue
2021-05-14 13:50 ` Qu Wenruo
2021-05-14 14:28 ` 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=k0o3lb1d.fsf@damenly.su \
--to=l@damenly.su \
--cc=dsterba@suse.cz \
--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