Commit bf1f1fec authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: rename BTRFS_FS_NO_OVERCOMMIT to BTRFS_FS_ACTIVE_ZONE_TRACKING

This flag only gets set when we're doing active zone tracking, and we're
going to need to use this flag for things related to this behavior.
Rename the flag to represent what it actually means for the file system
so it can be used in other ways and still make sense.
Reviewed-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9e1cdf0c
...@@ -120,11 +120,8 @@ enum { ...@@ -120,11 +120,8 @@ enum {
/* Indicate that we want to commit the transaction. */ /* Indicate that we want to commit the transaction. */
BTRFS_FS_NEED_TRANS_COMMIT, BTRFS_FS_NEED_TRANS_COMMIT,
/* /* This is set when active zone tracking is needed. */
* Indicate metadata over-commit is disabled. This is set when active BTRFS_FS_ACTIVE_ZONE_TRACKING,
* zone tracking is needed.
*/
BTRFS_FS_NO_OVERCOMMIT,
/* /*
* Indicate if we have some features changed, this is mostly for * Indicate if we have some features changed, this is mostly for
......
...@@ -407,7 +407,7 @@ int btrfs_can_overcommit(struct btrfs_fs_info *fs_info, ...@@ -407,7 +407,7 @@ int btrfs_can_overcommit(struct btrfs_fs_info *fs_info,
return 0; return 0;
used = btrfs_space_info_used(space_info, true); used = btrfs_space_info_used(space_info, true);
if (test_bit(BTRFS_FS_NO_OVERCOMMIT, &fs_info->flags) && if (test_bit(BTRFS_FS_ACTIVE_ZONE_TRACKING, &fs_info->flags) &&
(space_info->flags & BTRFS_BLOCK_GROUP_METADATA)) (space_info->flags & BTRFS_BLOCK_GROUP_METADATA))
avail = 0; avail = 0;
else else
......
...@@ -524,8 +524,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache) ...@@ -524,8 +524,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache)
} }
atomic_set(&zone_info->active_zones_left, atomic_set(&zone_info->active_zones_left,
max_active_zones - nactive); max_active_zones - nactive);
/* Overcommit does not work well with active zone tacking. */ set_bit(BTRFS_FS_ACTIVE_ZONE_TRACKING, &fs_info->flags);
set_bit(BTRFS_FS_NO_OVERCOMMIT, &fs_info->flags);
} }
/* Validate superblock log */ /* Validate superblock log */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment