Skip to content

Commit bf1f1fe

Browse files
josefbacikkdave
authored andcommitted
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: Naohiro Aota <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Anand Jain <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 9e1cdf0 commit bf1f1fe

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

fs/btrfs/fs.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,8 @@ enum {
120120
/* Indicate that we want to commit the transaction. */
121121
BTRFS_FS_NEED_TRANS_COMMIT,
122122

123-
/*
124-
* Indicate metadata over-commit is disabled. This is set when active
125-
* zone tracking is needed.
126-
*/
127-
BTRFS_FS_NO_OVERCOMMIT,
123+
/* This is set when active zone tracking is needed. */
124+
BTRFS_FS_ACTIVE_ZONE_TRACKING,
128125

129126
/*
130127
* Indicate if we have some features changed, this is mostly for

fs/btrfs/space-info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ int btrfs_can_overcommit(struct btrfs_fs_info *fs_info,
407407
return 0;
408408

409409
used = btrfs_space_info_used(space_info, true);
410-
if (test_bit(BTRFS_FS_NO_OVERCOMMIT, &fs_info->flags) &&
410+
if (test_bit(BTRFS_FS_ACTIVE_ZONE_TRACKING, &fs_info->flags) &&
411411
(space_info->flags & BTRFS_BLOCK_GROUP_METADATA))
412412
avail = 0;
413413
else

fs/btrfs/zoned.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache)
524524
}
525525
atomic_set(&zone_info->active_zones_left,
526526
max_active_zones - nactive);
527-
/* Overcommit does not work well with active zone tacking. */
528-
set_bit(BTRFS_FS_NO_OVERCOMMIT, &fs_info->flags);
527+
set_bit(BTRFS_FS_ACTIVE_ZONE_TRACKING, &fs_info->flags);
529528
}
530529

531530
/* Validate superblock log */

0 commit comments

Comments
 (0)