btrfs: use fs_info->max_extent_size in get_extent_max_capacity()
authorNaohiro Aota <naohiro.aota@wdc.com>
Fri, 8 Jul 2022 23:18:42 +0000 (08:18 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:41 +0000 (17:45 +0200)
commitd760156601af233f9223c23588e9c65950539ded
treefdbaa83ff3a7298de30715d757ed9506fba69346
parent7d7672bc5d1038c745716c397d892d21e29de71c
btrfs: use fs_info->max_extent_size in get_extent_max_capacity()

Use fs_info->max_extent_size also in get_extent_max_capacity() for the
completeness. This is only used for defrag and not really necessary to fix
the metadata reservation size. But, it still suppresses unnecessary defrag
operations.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c