On aarch64 with pagesize 64k, btrfs-convert of ext4 is successful,
but it won't mount because we don't yet support subpage blocksize/
sectorsize.
BTRFS error (device vda): sectorsize 4096 not supported yet, only support 65536
So in this case during convert provide a warning.
For example:
WARNING: Blocksize 4096 is not equal to the pagesize 65536,
converted filesystem won't mount on this system.
Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
v2: Drop the delay part. Update the change log.
convert/main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/convert/main.c b/convert/main.c
index a04ec7a36abf..5b2979e3e1e6 100644
--- a/convert/main.c
+++ b/convert/main.c
@@ -1140,6 +1140,11 @@ static int do_convert(const char *devname, u32 convert_flags, u32 nodesize,
error("block size is too small: %u < 4096", blocksize);
goto fail;
}
+ if (blocksize != getpagesize())
+ warning("Blocksize %u is not equal to the pagesize %u,\n\
+ converted filesystem won't mount on this system.",
+ blocksize, getpagesize());
+
if (btrfs_check_nodesize(nodesize, blocksize, features))
goto fail;
fd = open(devname, O_RDWR);
--
1.8.3.1