* [PATCH] btrfs: emit a warning about space cache v1 being deprecated
@ 2024-07-29 16:51 Josef Bacik
2024-07-29 18:00 ` Johannes Thumshirn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Josef Bacik @ 2024-07-29 16:51 UTC (permalink / raw)
To: linux-btrfs, kernel-team
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
BTRFS warning (device nvme0n1): please use -o space_cache=v2
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
fs/btrfs/super.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 0eda8c21d861..1f2e9900e410 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -682,8 +682,12 @@ 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");
+ btrfs_warn(info, "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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: emit a warning about space cache v1 being deprecated
2024-07-29 16:51 [PATCH] btrfs: emit a warning about space cache v1 being deprecated Josef Bacik
@ 2024-07-29 18:00 ` Johannes Thumshirn
2024-07-29 19:55 ` David Sterba
2024-07-29 21:26 ` Qu Wenruo
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2024-07-29 18:00 UTC (permalink / raw)
To: Josef Bacik, linux-btrfs@vger.kernel.org, kernel-team@fb.com
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: emit a warning about space cache v1 being deprecated
2024-07-29 16:51 [PATCH] btrfs: emit a warning about space cache v1 being deprecated Josef Bacik
2024-07-29 18:00 ` Johannes Thumshirn
@ 2024-07-29 19:55 ` David Sterba
2024-07-29 21:26 ` Qu Wenruo
2 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2024-07-29 19:55 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs, kernel-team
On Mon, Jul 29, 2024 at 12:51:10PM -0400, Josef Bacik 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
> BTRFS warning (device nvme0n1): please use -o space_cache=v2
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> fs/btrfs/super.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 0eda8c21d861..1f2e9900e410 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -682,8 +682,12 @@ 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");
> + btrfs_warn(info, "please use -o space_cache=v2");
Please don't split the printk message, the recommendation should be on
the same line as printk can insert another line between them.
> + }
> if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE))
> btrfs_info(info, "using free-space-tree");
> }
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: emit a warning about space cache v1 being deprecated
2024-07-29 16:51 [PATCH] btrfs: emit a warning about space cache v1 being deprecated Josef Bacik
2024-07-29 18:00 ` Johannes Thumshirn
2024-07-29 19:55 ` David Sterba
@ 2024-07-29 21:26 ` Qu Wenruo
2 siblings, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2024-07-29 21:26 UTC (permalink / raw)
To: Josef Bacik, linux-btrfs, kernel-team
在 2024/7/30 02:21, 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
> BTRFS warning (device nvme0n1): please use -o space_cache=v2
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> fs/btrfs/super.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 0eda8c21d861..1f2e9900e410 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -682,8 +682,12 @@ 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");
> + btrfs_warn(info, "please use -o space_cache=v2");
> + }
> if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE))
> btrfs_info(info, "using free-space-tree");
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-29 21:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 16:51 [PATCH] btrfs: emit a warning about space cache v1 being deprecated Josef Bacik
2024-07-29 18:00 ` Johannes Thumshirn
2024-07-29 19:55 ` David Sterba
2024-07-29 21:26 ` Qu Wenruo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox