diff mbox

Change "total" in btrfs filesystem df output to "alloc"

Message ID CAH-HCWW+B3azXoTPR2__cC+J8PrES4q295Cdc9Mqm2MeVE_y3w@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shriramana Sharma Nov. 30, 2014, 1:37 p.m. UTC
Attached patch.

On Sun, Nov 30, 2014 at 9:30 AM, Shriramana Sharma <samjnaa@gmail.com> wrote:
> On Sun, Aug 31, 2014 at 7:25 AM, Shriramana Sharma <samjnaa@gmail.com> wrote:
>> Hello. There seem to be lots of questions in various forums re the
>> output of btrfs fi df -- especially w.r.t. the usage of the word
>> "total". For example see https://community.oracle.com/thread/2459838
>>
>> I feel it would make the intent clearer if "total" were changed to
>> "alloc" or "allocated" (if the short form is felt unclear). It would
>> also help people understand the output of regular df on a btrfs system
>> since one can understand easier that pre-allocated space would count
>> as "used" space as it is not free!
>
> Where should I report a bug to get this fixed? Thanks.
>
> --
> Shriramana Sharma ???????????? ????????????
diff mbox

Patch

From 3d386053105ef7c2dba3643530dffe3ecd4dcf49 Mon Sep 17 00:00:00 2001
From: Shriramana Sharma <samjnaa@gmail.com>
Date: Sun, 30 Nov 2014 19:00:38 +0530
Subject: [PATCH] df: change "total" to "alloc"

---
 cmds-filesystem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index cd6b3c6..05f6235 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -233,7 +233,7 @@  static void print_df(struct btrfs_ioctl_space_args *sargs, unsigned unit_mode)
 	struct btrfs_ioctl_space_info *sp = sargs->spaces;
 
 	for (i = 0; i < sargs->total_spaces; i++, sp++) {
-		printf("%s, %s: total=%s, used=%s\n",
+		printf("%s, %s: alloc=%s, used=%s\n",
 			group_type_str(sp->flags),
 			group_profile_str(sp->flags),
 			pretty_size_mode(sp->total_bytes, unit_mode),
-- 
2.1.3