From: Mike Fleetwood <mike.fleetwood@googlemail.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org
Subject: Re: [WIP] bcachefs fs usage update
Date: Mon, 11 Mar 2024 15:55:51 +0000 [thread overview]
Message-ID: <CAMU1PDgJDKyBCb9OXpkkWRQCqGR5ScXSfpHjSccAfC-gt-FDoQ@mail.gmail.com> (raw)
In-Reply-To: <yyrmhuevljcnukg6uazcw3jwf5bffpda32eabxvl5eommkxzch@loxecv63dk4a>
On Fri, 8 Mar 2024 at 23:42, Kent Overstreet <kent.overstreet@linux.dev> wrote:
>
> On Fri, Mar 08, 2024 at 11:37:13PM +0000, Mike Fleetwood wrote:
> > On Fri, 8 Mar 2024 at 01:23, Kent Overstreet <kent.overstreet@linux.dev> wrote:
> > >
> > > On Wed, Mar 06, 2024 at 11:14:45AM +0000, Mike Fleetwood wrote:
> > > > On 2024-03-02 04:14, Kent Overstreet wrote:
> > > > > I'm currently updating the 'bcachefs fs usage' command for the disk
> > > > > accounting rewrite, and looking for suggestions on any improements we
> > > > > could make - ways to present the output that would be clearer and more
> > > > > useful, possibly ideas on on new things to count...
> > > >
> > > > [Sorry for any email thread butchering. I've only just subscribed to
> > > > the list and seen this in the archive.]
> > > >
> > > > Background:
> > > > I'm working on adding some level of support for bcachefs into GParted.
> > > > It wants to be able to report the FS usage (per device) of a file system
> > > > to (1) display in the UI, and (2) to limit how small it allows a
> > > > partition to be shrunk. (I understand that bcachefs doesn't currently
> > > > support shrinking devices).
> > > >
> > > > What I would like from bcache fs usage is:
> > > > 1. To be able to get free and capacity figures for a device in an
> > > > unmounted bcachefs file system.
> > > > EG:
> > > > bcachefs fs usage /dev/$PTN
> > >
> > > that'll take some work, but should be doable
> > >
> > > > 2. To continue to be able to get free and capacity figures in bytes.
> > > > Using a command line switch is okay.
> > >
> > > json output?
> >
> > Json output is not required. Plain human readable text will do.
>
> But it'll be a lot less fragile as things change and are added. We
> really should be getting away from machine parsing of output intended
> for humans.
Okay I'll read json output from bcachefs fs usage when available.
> >
> > None of the other file system tools provide json output so GParted just
> > parses the plain text output they do provide. These are the commands
> > GParted runs and parses the output from to get usage figures for a few
> > of the file systems it supports:
> > btrfs inspect-internal dump-super /dev/$PTN
> > dumpe2fs -h /dev/$PTN
> > xfs_db -r -c 'sb 0' -c 'print blocksize' -c 'print dblocks' \
> > -c 'print fdblocks' /dev/$PTN
next prev parent reply other threads:[~2024-03-11 15:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 11:14 [WIP] bcachefs fs usage update Mike Fleetwood
2024-03-08 1:23 ` Kent Overstreet
2024-03-08 23:37 ` Mike Fleetwood
2024-03-08 23:41 ` Kent Overstreet
2024-03-11 15:55 ` Mike Fleetwood [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-03-02 2:14 Kent Overstreet
2024-03-03 18:49 ` John Stoffel
2024-03-03 23:19 ` Kent Overstreet
2024-03-04 1:02 ` John Stoffel
2024-03-04 1:08 ` Kent Overstreet
2024-03-04 8:16 ` Martin Steigerwald
[not found] ` <CAMT0RQRsdLd9dg5jkpQ+gRTn0XJe=cU5Umsjs2npyvz6pCU61g@mail.gmail.com>
2024-03-04 13:44 ` Hannu Krosing
2024-03-05 0:00 ` John Stoffel
2024-03-05 12:33 ` Michael
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=CAMU1PDgJDKyBCb9OXpkkWRQCqGR5ScXSfpHjSccAfC-gt-FDoQ@mail.gmail.com \
--to=mike.fleetwood@googlemail.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@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 read-only IMAP folder(s) and NNTP newsgroup(s).