diff mbox series

[3/3] btrfs-progs: convert: check the sectorsize against BTRFS_MIN_BLOCKSIZE

Message ID 4a0875f0bcfc7182bf9ba13be752eea948b666ce.1740542229.git.wqu@suse.com (mailing list archive)
State New
Headers show
Series btrfs-progs: allowing 2K block size for experimental builds | expand

Commit Message

Qu Wenruo Feb. 26, 2025, 3:59 a.m. UTC
This allow experimental btrfs-convert builds to handle 2K block sized
ext4, which is needed to pass convert related test cases in fstests.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 convert/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/convert/main.c b/convert/main.c
index edc2c0d97c29..0dc75c9eb1c6 100644
--- a/convert/main.c
+++ b/convert/main.c
@@ -1201,7 +1201,7 @@  static int do_convert(const char *devname, u32 convert_flags, u32 nodesize,
 
 	UASSERT(cctx.total_bytes != 0);
 	blocksize = cctx.blocksize;
-	if (blocksize < 4096) {
+	if (blocksize < BTRFS_MIN_BLOCKSIZE) {
 		error("block size is too small: %u < 4096", blocksize);
 		goto fail;
 	}