Skip to content

Commit 1e7bec1

Browse files
josefbacikkdave
authored andcommitted
btrfs: emit a warning about space cache v1 being deprecated
We've been wanting to get rid of this for a while, add a message to indicate that this feature is going away and when so we can finally have a date when we're going to remove it. The output looks like this BTRFS warning (device nvme0n1): space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2 Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 30479f3 commit 1e7bec1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/btrfs/super.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,11 @@ bool btrfs_check_options(const struct btrfs_fs_info *info,
683683
ret = false;
684684

685685
if (!test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state)) {
686-
if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE))
686+
if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) {
687687
btrfs_info(info, "disk space caching is enabled");
688+
btrfs_warn(info,
689+
"space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2");
690+
}
688691
if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE))
689692
btrfs_info(info, "using free-space-tree");
690693
}

0 commit comments

Comments
 (0)