public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/2] btrfs-progs: allowing 2K block size for experimental builds
Date: Thu, 20 Mar 2025 00:27:36 +0100	[thread overview]
Message-ID: <20250319232736.GR32661@twin.jikos.cz> (raw)
In-Reply-To: <57216433-0829-48bf-af23-d9959611974c@suse.com>

On Thu, Mar 20, 2025 at 08:49:06AM +1030, Qu Wenruo wrote:
> 
> 
> 在 2025/3/20 08:19, David Sterba 写道:
> > On Wed, Feb 26, 2025 at 02:29:13PM +1030, Qu Wenruo wrote:
> >> Btrfs always has its minimal block size as 4K, but that means on the
> >> most common architecture, x86_64, we can not utilize the subpage block
> >> size routine at all.
> >>
> >> Although the future larger folios support will allow us to utilize
> >> subpage routines, the support is still not yet there.
> >>
> >> On the other hand, lowering the block size for experimental/debug builds is
> >> much easier, there is only one major bug (fixed by the first patch) in
> >> btrfs-progs at least.
> >>
> >> Kernel sides enablement is not huge either, but it has dependency on
> >> the subpage related backlog patches to pass most fstests, which is not small.
> >>
> >> However since we're not pushing this 2K block size for end users, we can
> >> accept some limitations on the 2K block size support:
> >>
> >> - No 2K node size mkfs support
> >>    This is mostly caused by how we create the initial temporaray fs.
> >>    The initial temporaray fs contains at least 6 root items.
> >>    But one root item is 439 bytes, we need a level 1 root tree for the
> >>    initial temporaray fs.
> >>
> >>    But we do not support multi-level trees for the initial fs, thus no
> >>    such support for now.
> >>
> >> - No mixed block groups mkfs support
> >>    Caused by the missing 2K node size support
> >>
> >> Qu Wenruo (3):
> >>    btrfs-progs: fix the incorrect buffer size for super block
> >>    btrfs-progs: support 2k block size
> >>    btrfs-progs: convert: check the sectorsize against BTRFS_MIN_BLOCKSIZE
> > 
> > Thanks, added to devel. I've enabled the 2k case for convert but it
> > fails, I haven't analyzed it as it does not seem to be important right
> > now.
> 
> 2K convert needs the ext4 to use 2K block size too, which is only 
> lightly tested here.

So the failure I was observing was because I extended ext2 test (001),
ext4 works.

> E.g. at least it works here:
> 
> ./btrfs-convert ~/test.img
> btrfs-convert from btrfs-progs v6.12
> 
> WARNING: blocksize 2048 is not equal to the page size 4096, converted 
> filesystem won't mount on this system
> Source filesystem:
>    Type:           ext2
>    Label:
>    Blocksize:      2048
>    UUID:           e004c54c-7a86-4c71-be87-a8ff707c3948
> Target filesystem:
>    Label:
>    Blocksize:      2048
>    Nodesize:       16384
>    UUID:           b54b8947-7f7a-4e3b-a658-d344a1d47766
>    Checksum:       crc32c
>    Features:       extref, skinny-metadata, no-holes, free-space-tree 
> (default)
>      Data csum:    yes
>      Inline data:  yes
>      Copy xattr:   yes
> Reported stats:
>    Total space:      5368709120
>    Free space:       4693164032 (87.42%)
>    Inode count:          327680
>    Free inodes:          327668
>    Block count:         2621440
> Create initial btrfs filesystem
> Create ext2 image file
> Create btrfs metadata
> Copy inodes [o] [         0/        12]
> Free space cache cleared
> Conversion complete
> 
> But it should not be considered a feature for end users.

Agreed.

      reply	other threads:[~2025-03-19 23:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26  3:59 [PATCH 0/2] btrfs-progs: allowing 2K block size for experimental builds Qu Wenruo
2025-02-26  3:59 ` [PATCH] btrfs-progs: docs: add an extra note to btrfs data checksum and directIO Qu Wenruo
2025-02-26  3:59 ` [PATCH 1/3] btrfs-progs: fix the incorrect buffer size for super block Qu Wenruo
2025-02-26  3:59 ` [PATCH 2/3] btrfs-progs: support 2k block size Qu Wenruo
2025-02-26  3:59 ` [PATCH 3/3] btrfs-progs: convert: check the sectorsize against BTRFS_MIN_BLOCKSIZE Qu Wenruo
2025-03-19 21:49 ` [PATCH 0/2] btrfs-progs: allowing 2K block size for experimental builds David Sterba
2025-03-19 22:19   ` Qu Wenruo
2025-03-19 23:27     ` David Sterba [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=20250319232736.GR32661@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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