From: Martin Steigerwald <Martin@lichtvoll.de>
To: Goffredo Baroncelli <goffredo.baroncelli@yahoo.com>
Cc: linux-btrfs@vger.kernel.org, "Hugo Mills" <hugo@carfax.org.uk>,
"Michael Kjörling" <michael@kjorling.se>,
cwillu <cwillu@cwillu.com>,
"Chris Murphy" <lists@colorremedies.com>,
"David Sterba" <dsterba@suse.cz>, "Zach Brown" <zab@zabbo.net>
Subject: Re: [PATCH V3][BTRFS-PROGS] Enhance btrfs fi df with raid5/6 support
Date: Sun, 10 Mar 2013 14:16:02 +0100 [thread overview]
Message-ID: <201303101416.02781.Martin@lichtvoll.de> (raw)
In-Reply-To: <1362917859-18824-1-git-send-email-goffredo.baroncelli@yahoo.com>
Am Sonntag, 10. März 2013 schrieb Goffredo Baroncelli:
> Hi all,
Hi Goffredo,
> This is the third attempt of my patches related to show how the data
> are stored in a btrfs filesystem. I rebased all the patches on the latest
> mason git. I tried to address the Zach concern abou the using of
> the string_list_add() in the df_pretty_sizes(): string_list_add() is
> removed from the df_pretty_sizes() and I created the new function
> sla_pretty_sizes() which calls df_pretty_sizes() and string_list_add().
Thanks for your new round of patches.
> Unfortunately I noticed a regression which passed all the reviews until
> now: the command btrfs fi df previous didn't require the root
> capability, now with my patches it is required, because I need to know
> some info about the chunks so I need to use the "BTRFS_IOC_TREE_SEARCH".
>
> I think that there are the following possibilities:
> 1) accept this regresssion
> 2) remove the command "btrfs fi df" and leave only "btrfs fi disk-usage"
> and "btrfs dev disk-usage"
> 3) adding a new ioctl which could be used without root capability. Of
> course this ioctl would return only a subset of the
> BTRFS_IOC_TREE_SEARCH info
>
> I think that the 3) would be the "long term" solution. I am not happy
> about the 1), so as "short term solution" I think that we should go with
> the 2). What do you think ?
Uhm, but exactly the new btrfs fi df contains a good overview:
> Below the description of the patches.
>
> --
>
> These patches update the btrfs fi df command and add two new commands:
> - btrfs filesystem disk-usage <path>
> - btrfs device disk-usage <path>
>
> The command "btrfs filesystem df" now shows only the disk
> usage/available.
>
> $ sudo btrfs filesystem df /mnt/btrfs1/
> Disk size: 400.00GB
> Disk allocated: 8.04GB
> Disk unallocated: 391.97GB
> Used: 11.29MB
> Free (Estimated): 250.45GB (Max: 396.99GB, min: 201.00GB)
> Data to disk ratio: 63 %
>
> The "Free (Estimated)" tries to give an estimation of the free space
> on the basis of the chunks usage. Max and min are the maximum allowable
> space (if the next chunk are allocated as SINGLE) or the minimum one (
> if the next chunks are allocated as DUP/RAID1/RAID10).
What information fi df can´t display without root permissions? Maybe its
okay to just omit it for now if being run as user or display a "run as root"
hint instead?
Thanks,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
next prev parent reply other threads:[~2013-03-10 13:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-10 12:17 [PATCH V3][BTRFS-PROGS] Enhance btrfs fi df with raid5/6 support Goffredo Baroncelli
2013-03-10 12:17 ` [PATCH 1/8] Add some helpers to manage the strings allocation/deallocation Goffredo Baroncelli
2013-03-10 14:34 ` Wang Shilong
2013-03-10 14:51 ` Goffredo Baroncelli
2013-03-10 12:17 ` [PATCH 2/8] Enhance the command btrfs filesystem df Goffredo Baroncelli
2013-03-10 15:00 ` Wang Shilong
2013-03-10 12:17 ` [PATCH 3/8] Create the man page entry for the command btrfs fi df Goffredo Baroncelli
2013-03-10 12:17 ` [PATCH 4/8] Add helpers functions to handle the printing of data in tabular format Goffredo Baroncelli
2013-03-10 12:17 ` [PATCH 5/8] Add command btrfs filesystem disk-usage Goffredo Baroncelli
2013-03-10 12:17 ` [PATCH 6/8] Create entry in man page for " Goffredo Baroncelli
2013-03-10 12:17 ` [PATCH 7/8] Add btrfs device disk-usage command Goffredo Baroncelli
2013-03-10 12:17 ` [PATCH 8/8] Create a new entry in btrfs man page for btrfs device disk-usage Goffredo Baroncelli
2013-03-10 13:16 ` Martin Steigerwald [this message]
2013-03-10 13:19 ` [PATCH V3][BTRFS-PROGS] Enhance btrfs fi df with raid5/6 support Martin Steigerwald
2013-03-10 15:59 ` Goffredo Baroncelli
2013-03-10 15:52 ` Goffredo Baroncelli
2013-03-21 15:27 ` Bart Noordervliet
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=201303101416.02781.Martin@lichtvoll.de \
--to=martin@lichtvoll.de \
--cc=cwillu@cwillu.com \
--cc=dsterba@suse.cz \
--cc=goffredo.baroncelli@yahoo.com \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
--cc=michael@kjorling.se \
--cc=zab@zabbo.net \
/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.