aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorGravatar Naohiro Aota <naohiro.aota@wdc.com> 2021-02-04 19:21:51 +0900
committerGravatar David Sterba <dsterba@suse.com> 2021-02-09 02:46:03 +0100
commita94794d50d788d4735fd8f656ac8c0510117457d (patch)
treec7207d2db77c49bdfe7919edcd0e45c107f5d003 /fs/btrfs/extent-tree.c
parentbtrfs: zoned: load zone's allocation offset (diff)
downloadlinux-a94794d50d788d4735fd8f656ac8c0510117457d.tar.gz
linux-a94794d50d788d4735fd8f656ac8c0510117457d.tar.bz2
linux-a94794d50d788d4735fd8f656ac8c0510117457d.zip
btrfs: zoned: calculate allocation offset for conventional zones
Conventional zones do not have a write pointer, so we cannot use it to determine the allocation offset for sequential allocation if a block group contains a conventional zone. But instead, we can consider the end of the highest addressed extent in the block group for the allocation offset. For new block group, we cannot calculate the allocation offset by consulting the extent tree, because it can cause deadlock by taking extent buffer lock after chunk mutex, which is already taken in btrfs_make_block_group(). Since it is a new block group anyways, we can simply set the allocation offset to 0. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
0 files changed, 0 insertions, 0 deletions