From: Dave Chinner <david@fromorbit.com>
To: Tim Small <tim@seoss.co.uk>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Making statfs return qgroup info (for container use case etc.)
Date: Fri, 7 Oct 2016 09:40:11 +1100 [thread overview]
Message-ID: <20161006224011.GF9806@dastard> (raw)
In-Reply-To: <32dfef18-ca3b-6c29-252a-4fc9e36b373a@seoss.co.uk>
On Thu, Oct 06, 2016 at 02:51:58PM +0100, Tim Small wrote:
> Hello,
>
> I use btrfs for containers (e.g. full OS style containers using lxc/lxd
> etc. rather than application containers). btrfs de-duplication and
> send/receive are very useful features for this use-case.
>
> Each container runs in its own subvolume, and I use quotas to stop one
> container exhausting the disk space of the others.
>
> df shows the total space + free space for the entire filesystem - which
> is confusing for users within the containers. Worse - they don't have
> any way of knowing how much quota they actually have left (other than du
> -xs / vs. whatever I've told them).
>
> It'd be really nice if running e.g. statfs("/home", ...) within a
> container could be made to return the qgroup usage + limit for the path
> (e.g. by passing in an option at mount time - such as qgroup level
> maybe?) , instead of the global filesystem data in f_bfree f_blocks etc.
XFS does this with directory tree quotas. It was implmented 10 years
ago or so, IIRC...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-10-06 22:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 13:51 Making statfs return qgroup info (for container use case etc.) Tim Small
2016-10-06 22:40 ` Dave Chinner [this message]
2016-10-07 16:58 ` David Sterba
2016-10-09 23:32 ` Dave Chinner
2016-10-07 16:54 ` David Sterba
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=20161006224011.GF9806@dastard \
--to=david@fromorbit.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=tim@seoss.co.uk \
/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).