diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2023-08-08 01:12:39 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:19 +0200 |
commit | 5a7d107e5ef9b452cf0aa96ac931b29ea980d997 (patch) | |
tree | 94775880df47748865e074883d1158d971cf892a /fs/btrfs/block-group.c | |
parent | 6a8ebc773ef64c8f12d6d60fd6e53d5ccc81314b (diff) |
btrfs: zoned: don't activate non-DATA BG on allocation
Now that a non-DATA block group is activated at write time, don't
activate it on allocation time.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/block-group.c')
-rw-r--r-- | fs/btrfs/block-group.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index b0e432c30e1d..0cb1dee965a0 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -4089,7 +4089,7 @@ int btrfs_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags, if (IS_ERR(ret_bg)) { ret = PTR_ERR(ret_bg); - } else if (from_extent_allocation) { + } else if (from_extent_allocation && (flags & BTRFS_BLOCK_GROUP_DATA)) { /* * New block group is likely to be used soon. Try to activate * it now. Failure is OK for now. |