From: David Sterba <dsterba@suse.cz>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.cz>
Subject: [PATCH] btrfs-progs: read global reserve size from space infos
Date: Tue, 22 Apr 2014 15:20:00 +0200 [thread overview]
Message-ID: <1398172800-19548-1-git-send-email-dsterba@suse.cz> (raw)
Kernels 3.15 > export the global block reserve as a space info presented
by 'btrfs fi df' but would display 'unknown' instead of some meaningful
string.
Signed-off-by: David Sterba <dsterba@suse.cz>
---
Global_rsv or GlobalRsv or Globalrsv or something else?
cmds-filesystem.c | 2 ++
ctree.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 306f715475ac..5a3bbca91458 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -129,6 +129,8 @@ static char *group_type_str(u64 flag)
return "Metadata";
case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA:
return "Data+Metadata";
+ case BTRFS_SPACE_INFO_GLOBAL_RSV:
+ return "Global_rsv";
default:
return "unknown";
}
diff --git a/ctree.h b/ctree.h
index a4d2cd114614..7e8ced718931 100644
--- a/ctree.h
+++ b/ctree.h
@@ -861,6 +861,8 @@ struct btrfs_csum_item {
/* used in struct btrfs_balance_args fields */
#define BTRFS_AVAIL_ALLOC_BIT_SINGLE (1ULL << 48)
+#define BTRFS_SPACE_INFO_GLOBAL_RSV (1ULL << 49)
+
#define BTRFS_QGROUP_STATUS_OFF 0
#define BTRFS_QGROUP_STATUS_ON 1
#define BTRFS_QGROUP_STATUS_SCANNING 2
--
1.9.0
next reply other threads:[~2014-04-22 13:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-22 13:20 David Sterba [this message]
2014-04-22 14:09 ` [PATCH] btrfs-progs: read global reserve size from space infos Hugo Mills
2014-04-22 15:12 ` Xavier Bassery
2014-04-23 13:30 ` David Sterba
2014-04-23 14:09 ` Chris Mason
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=1398172800-19548-1-git-send-email-dsterba@suse.cz \
--to=dsterba@suse.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.