linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Getting qgroup reports in user space (without enabling qroup)?
Date: Sat, 2 Mar 2019 09:23:14 +0300	[thread overview]
Message-ID: <8a91a9b3-8b4c-2df4-1c69-9e260816a2ca@gmail.com> (raw)

Is there any user-space tool that can produce report similar to "btrfs
qgroup show" with multi-level qgroups? To clarify what I mean - here is
"btrfs qgroup show" output from openSUSE with enabled snapper.

qgroupid         rfer         excl parent
--------         ----         ---- ------
...
0/259         6.17GiB    262.43MiB ---
...
0/702         6.03GiB      1.30GiB 1/0
0/718         6.04GiB     89.88MiB 1/0
0/720         6.52GiB     87.28MiB 1/0
0/724         6.10GiB     29.16MiB 1/0
0/727         6.78GiB    217.02MiB 1/0
0/729         6.24GiB     39.25MiB 1/0
0/731         6.65GiB     72.67MiB 1/0
0/732         6.24GiB    212.18MiB 1/0
0/741         6.35GiB    778.79MiB 1/0
0/742         6.58GiB     74.09MiB 1/0
1/0          20.33GiB     14.42GiB ---
...

Without qgroups there is really no way to find out how much space
snapshots are taking. "btrfs fi du" just shows equivalent of "rfer" and
"excl" for each subvolume, but there is no way you can compute the
values shown for 1/0 qgroup from individual numbers.

I do not think "btrfs fi du" can do it as it only knows whether extent
is shared or not, it cannot know whether extent is shared between
specific subvolumes.

Is something like this even possible in user space without qgroups? It
is well known that qgroups are frowned upon and common advice is to
disable them as soon as someone reports performance issues.

             reply	other threads:[~2019-03-02  6:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  6:23 Andrei Borzenkov [this message]
2019-03-02 11:53 ` Getting qgroup reports in user space (without enabling qroup)? Qu Wenruo

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=8a91a9b3-8b4c-2df4-1c69-9e260816a2ca@gmail.com \
    --to=arvidjaar@gmail.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).