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 da...@fromorbit.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html