970c1a543c
While "byte_count" is eventually rounded down to sectorsize at make_btrfs() or btrfs_add_to_fs_id(), it would be better round it down first and do the size checks not to confuse the things. Also, on a zoned device, creating a filesystem whose size is not aligned to the zone boundary can be confusing. Round it down further to the zone boundary. The size calculation with a source directory is also tweaked to be aligned. device_get_partition_size_fd_stat() must be aligned down not to exceed the device size. And, btrfs_mkfs_size_dir() should have return sectorsize aligned size. So, add an UASSERT for it. Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
Makefile | ||
common.c | ||
common.h | ||
main.c | ||
rootdir.c | ||
rootdir.h |