]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: fix block group alloc_offset calculation
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 9 Aug 2021 04:13:44 +0000 (13:13 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:11 +0000 (13:19 +0200)
commit726b2afa72e512895aac6147362efa86e6367301
treef7b1cb30644f0a9d212c67ef49d0b9a557dd4089
parent315ebf46006a5701e6a9eac4cb754ca40ec689bc
btrfs: zoned: fix block group alloc_offset calculation

alloc_offset is offset from the start of a block group and @offset is
actually an address in logical space. Thus, we need to consider
block_group->start when calculating them.

Fixes: e46eb1682614 ("btrfs: zoned: advance allocation pointer after tree log node")
CC: stable@vger.kernel.org # 5.12+
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-cache.c