From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH RFC] btrfs: sysfs: bytes_zone_unusable is not under CONFIG_BTRFS_DEBUG
Date: Thu, 5 Aug 2021 09:07:00 +0800 [thread overview]
Message-ID: <8585061cc6672a4f3b985b7c387c7a8040af2a73.1628125287.git.anand.jain@oracle.com> (raw)
Sysfs zoned file is under CONFIG_BTRFS_DEBUG (now there is a patch to
bring it under CONFIG_BLK_DEV_ZONED). But sysfs file bytes_zone_unusable
has escaped the CONFIG_BTRFS_DEBUG config. There is no problem with this
as bytes_zone_unusable with no zoned configured shall display 0, so it is
just a matter of fixing the consistency.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
RFC because in my understanding, there is no way to fix this
inconsistency without failing the ABI compliance test, so it is just
better to leave it as it is.
fs/btrfs/sysfs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index cb00c0c08949..baef8f4b972e 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -702,7 +702,10 @@ SPACE_INFO_ATTR(bytes_pinned);
SPACE_INFO_ATTR(bytes_reserved);
SPACE_INFO_ATTR(bytes_may_use);
SPACE_INFO_ATTR(bytes_readonly);
+/* Remove once support for zoned allocation is feature complete */
+#ifdef CONFIG_BTRFS_DEBUG
SPACE_INFO_ATTR(bytes_zone_unusable);
+#endif
SPACE_INFO_ATTR(disk_used);
SPACE_INFO_ATTR(disk_total);
@@ -714,7 +717,9 @@ static struct attribute *space_info_attrs[] = {
BTRFS_ATTR_PTR(space_info, bytes_reserved),
BTRFS_ATTR_PTR(space_info, bytes_may_use),
BTRFS_ATTR_PTR(space_info, bytes_readonly),
+#ifdef CONFIG_BTRFS_DEBUG
BTRFS_ATTR_PTR(space_info, bytes_zone_unusable),
+#endif
BTRFS_ATTR_PTR(space_info, disk_used),
BTRFS_ATTR_PTR(space_info, disk_total),
NULL,
--
2.31.1
next reply other threads:[~2021-08-05 1:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 1:07 Anand Jain [this message]
2021-08-12 15:59 ` [PATCH RFC] btrfs: sysfs: bytes_zone_unusable is not under CONFIG_BTRFS_DEBUG David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8585061cc6672a4f3b985b7c387c7a8040af2a73.1628125287.git.anand.jain@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).