Message ID | 51e96d7a2754991bc369065d74290e7a436934c7.1722358018.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] btrfs: emit a warning about space cache v1 being deprecated | expand |
在 2024/7/31 02:17, Josef Bacik 写道: > 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 > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > v1->v2: > - Made it all one line as per Dave's comment. > > fs/btrfs/super.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > index 0eda8c21d861..1eed1a42db22 100644 > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -682,8 +682,11 @@ bool btrfs_check_options(const struct btrfs_fs_info *info, unsigned long *mount_ > ret = false; > > if (!test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state)) { > - if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) > + if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) { > btrfs_info(info, "disk space caching is enabled"); > + btrfs_warn(info, > +"space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2"); > + } > if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE)) > btrfs_info(info, "using free-space-tree"); > }
On Tue, Jul 30, 2024 at 12:47 PM Josef Bacik <josef@toxicpanda.com> wrote: > > 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 > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > --- > v1->v2: > - Made it all one line as per Dave's comment. > > fs/btrfs/super.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > index 0eda8c21d861..1eed1a42db22 100644 > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -682,8 +682,11 @@ bool btrfs_check_options(const struct btrfs_fs_info *info, unsigned long *mount_ > ret = false; > > if (!test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state)) { > - if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) > + if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) { > btrfs_info(info, "disk space caching is enabled"); > + btrfs_warn(info, > +"space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2"); > + } > if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE)) > btrfs_info(info, "using free-space-tree"); > } > -- > 2.43.0 > > Do we want to declare specifically when we'll get rid of this? Otherwise this looks good to me. Reviewed-by: Neal Gompa <neal@gompa.dev>
On Tue, Jul 30, 2024 at 11:08:10PM -0400, Neal Gompa wrote: > On Tue, Jul 30, 2024 at 12:47 PM Josef Bacik <josef@toxicpanda.com> wrote: > > > > 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 > > > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > > --- > > v1->v2: > > - Made it all one line as per Dave's comment. > > > > fs/btrfs/super.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > > index 0eda8c21d861..1eed1a42db22 100644 > > --- a/fs/btrfs/super.c > > +++ b/fs/btrfs/super.c > > @@ -682,8 +682,11 @@ bool btrfs_check_options(const struct btrfs_fs_info *info, unsigned long *mount_ > > ret = false; > > > > if (!test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state)) { > > - if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) > > + if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) { > > btrfs_info(info, "disk space caching is enabled"); > > + btrfs_warn(info, > > +"space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2"); > > + } > > if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE)) > > btrfs_info(info, "using free-space-tree"); > > } > > -- > > 2.43.0 > > > > > > Do we want to declare specifically when we'll get rid of this? > Otherwise this looks good to me. It would be better yes but we should time it to be in the upcoming LTS release so it keeps maximum compatibility. Also we need some time to make the change visible in a released kernel. ETA is January 2025 so closest match is 6.14 without v1. If there's a strong technical reason for dropping it earlier we might do that. The conversion to folio API is progressing and we don't want to port code-to-be-deleted to new API.
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0eda8c21d861..1eed1a42db22 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -682,8 +682,11 @@ bool btrfs_check_options(const struct btrfs_fs_info *info, unsigned long *mount_ ret = false; if (!test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state)) { - if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) + if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) { btrfs_info(info, "disk space caching is enabled"); + btrfs_warn(info, +"space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2"); + } if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE)) btrfs_info(info, "using free-space-tree"); }
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 Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- v1->v2: - Made it all one line as per Dave's comment. fs/btrfs/super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)