From: Dave Chinner <david@fromorbit.com>
To: "Arkadiusz Miśkiewicz" <arekm@maven.pl>
Cc: xfs@oss.sgi.com, linux-ext4@vger.kernel.org,
Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Dmitry Monakhov <dmonakhov@openvz.org>, Ben Myers <bpm@sgi.com>
Subject: Re: [RFC] directory quota survey on xfs
Date: Tue, 24 Dec 2013 10:43:56 +1100 [thread overview]
Message-ID: <20131223234355.GK3220@dastard> (raw)
In-Reply-To: <201312231012.19204.arekm@maven.pl>
On Mon, Dec 23, 2013 at 10:12:19AM +0100, Arkadiusz Miśkiewicz wrote:
> On Monday 23 of December 2013, Dave Chinner wrote:
>
> > > As always, any comment or idea are welcome.
> >
> > I'd suggest that you implement project quotas, not directory quotas.
> > They are way more flexible than pure directory quotas, but with only
> > a few lines of code and a special directory flag they can be used to
> > > implement directory subtree quotas....
>
> Would be also nice to allow a file to belong to more than one project.
Not possible. Apart from there only being a single project ID to an
inode, having to account an inode ot mulitple project quotas
effectively makes every transaction in XFS have to modify an unbound
number of dquots. We don't have the infrastructure to do that, we
can't reserve log space for unbound sized transactions, etc.
> Let say I want to have
>
> /projects/ with 10GB quota
> and
> /projects/projectA/ with 1GB quota
> /projects/projectB/ with 2GB quota
> and so on that's still limited by /projects/ 10GB quota limit.
What you get is exclusive accounting - the 10GB limit on /projects/
excludes the limits set on /projects/projectA/ and
/projects/projectB/.
Think about it for a minute - if we make subtrees nest like you
suggest, then:
/projects/ with 10GB quota
/projects/projectA/ with 5GB quota
/projects/projectA/subproj1 with 3GB quota
/projects/projectA/subproj1/ssp2 with 2GB quota
/projects/projectA/subproj1/ssp2/sssp3 with 1GB quota
if we modify a file in ..../sssp3/, then we have 5 project quotas we
have to check for limit enforcement, reserve blocks on and then
transactionally modify (plus user and group for the file itself).
That's exceedingly complex because we don't have pointers to all
the inodes in the path back up to the root, so just to find that we
have nested project quotas requires a reverse path walk to find the
directory inodes to get their project IDs to look up the dquots we'd
need to modify. The complexity and performance overhead of recursive
project quota accounting simply isn't worth it.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-23 23:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-22 9:59 [RFC] directory quota survey on xfs Zheng Liu
2013-12-23 1:42 ` Dave Chinner
2013-12-23 9:12 ` Arkadiusz Miśkiewicz
2013-12-23 23:43 ` Dave Chinner [this message]
2014-01-15 8:12 ` Zheng Liu
2014-01-15 18:03 ` Andreas Dilger
2014-01-15 21:32 ` Dave Chinner
2014-01-21 7:07 ` Zheng Liu
2014-01-23 22:32 ` Dave Chinner
2014-01-24 0:06 ` Darrick J. Wong
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=20131223234355.GK3220@dastard \
--to=david@fromorbit.com \
--cc=adilger.kernel@dilger.ca \
--cc=arekm@maven.pl \
--cc=bpm@sgi.com \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=xfs@oss.sgi.com \
/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).