btrfs-progs: convert, warn if converting a fs which won't mount
PATCH v2 1/1 btrfs-progs: convert, warn if converting a fs which won't mount
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.
---
v2: Drop the delay part. Update the change log.
convert/main.c | 5 +++++ 1 file changed, 5 insertions(+)
convert/main.c +5 -0
@@ -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 );
Signature · 1 line
1.8.3.1
Quoted 8 lines · Anand Jain
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.
Quoted 7 lines
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 <[email protected]>---
Added to devel, thanks.