Btrfs-progs: mkfs: let user known when forcing mixed metadata/data groups
PATCH 1/1 Btrfs-progs: mkfs: let user known when forcing mixed metadata/data groups
While formatting multiple devics (and user doesn't specify -M) if one of them has block count or size less then 1 GiB, mkfs doesn't tell user, on which one mixed metadata/data was forced. This patch updates message to print device name.
--- mkfs.c | 3 ++- utils.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
mkfs.c +2 -1
@@ -1372,7 +1372,8 @@ int main(int ac, char **av) ssd =is_ssd (file);if (is_vol_small (file)) { -printf ("SMALL VOLUME: forcing mixed metadata/data groups\n" ); +printf ("SMALL VOLUME %s: forcing mixed metadata/data groups\n" , + file); mixed =1 ; }
utils.c +1 -1
@@ -597,7 +597,7 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret, zero_end =1 ;if (block_count <1024 *1024 *1024 && !(*mixed)) { -printf ("SMALL VOLUME: forcing mixed metadata/data groups\n" ); +printf ("SMALL VOLUME %s: forcing mixed metadata/data groups\n" , file); *mixed =1 ; }
Signature · 1 line
1.8.5.3
Quoted 4 lines · Rakesh Pandit
While formatting multiple devics (and user doesn't specify -M) if one of them has block count or size less then 1 GiB, mkfs doesn't tell user, on which one mixed metadata/data was forced. This patch updates message to print device name.
I think we should fix the constraints what devices can be used together, mixing small and large ones works, but I don't think it's the usecase I'd recommend. And I'm not sure the mixed profile was intended for multiple devices at all.
Quoted 10 lines · David Sterba
Quoted 4 lines · Rakesh Pandit
While formatting multiple devics (and user doesn't specify -M) if one of them has block count or size less then 1 GiB, mkfs doesn't tell user, on which one mixed metadata/data was forced. This patch updates message to print device name.
I think we should fix the constraints what devices can be used together, mixing small and large ones works, but I don't think it's the usecase I'd recommend. And I'm not sure the mixed profile was intended for multiple devices at all.
Yes makes sense, thanks for review.
regards,