linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tytso@mit.edu
To: Jan Kara <jack@suse.cz>
Cc: Andreas Dilger <andreas.dilger@oracle.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH,RFC] Adding quotacheck functionality to e2fsck
Date: Fri, 26 Mar 2010 09:51:36 -0400	[thread overview]
Message-ID: <20100326135136.GF21658@thunk.org> (raw)
In-Reply-To: <20100326105441.GB3055@quack.suse.cz>

On Fri, Mar 26, 2010 at 11:54:41AM +0100, Jan Kara wrote:
>   Yes, this should be a good option. I imagine we would create RO_COMPAT
> features USRQUOTA and GRPQUOTA meaning that the filesystem maintains
> quotas in hidden files. And mkfs would directly create these files if
> it was asked to.

Technically we don't even need to make this be an RO_COMPAT feature; a
COMPAT feature might suffice.  We just need to have new superblock
fields which indicate the inode numbers for the user and group quotas.
If the inode number is the reserved inode for user or group quotas,
then it's the hidden inode.  If it's the number corresponding to a
user-visible file then we simply haven't transitioned the file over.
See e2fsck to see how we handle automatically transinition a user
visible .journal file to inode #8.  That part's not hard.

I am worried about the transition to a model where quotas are always
enforced; that's quite different from what we had before.  What
happens if someone uses the command quotaoff command?  Does it turn
off quotas?  If the quota files are now hidden, a system administrator
can't use quotacheck (which is an on-line command) to fix bad quotas;
now they have to use e2fsck, which is normally an off-line checker.  I
suppose we could make e2fsck be able to run in an on-line quotacheck
mode, where it only updates quotas and accepts that there may be some
race conditions where the blocks/inodes-in-use numbers won't be
exactly right.

What about use cases where people were accustomed to letting BSD or
MacOS access an ext3 file system, and either accept the quota being
slightly off, or relying on quotacheck to fix tihngs up at some point
later?

These are all things which can be quite surprising to system
administrators...

					- Ted

P.S.  We can add a new superblock field, which is a "quota last
updated time", and if that is less than the superblock write time, it
could be a hint that e2fsck needs to do a quotacheck run.  That could
partially help address the situation of 3rd party OS's/tools accessing
the file system directly.... 

  reply	other threads:[~2010-03-26 13:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26  0:20 [PATCH,RFC] Adding quotacheck functionality to e2fsck Theodore Ts'o
2010-03-26  0:47 ` Jan Kara
2010-03-26  3:38   ` tytso
2010-03-26  7:01     ` Andreas Dilger
2010-03-26  8:18       ` Dmitry Monakhov
2010-03-26 10:57         ` Jan Kara
2010-03-26 11:15           ` Dmitry Monakhov
2010-03-26 16:27             ` Dmitry Monakhov
2010-03-29  7:35               ` Jan Kara
2010-03-29  7:50                 ` dmonakhov
2010-03-26 10:54       ` Jan Kara
2010-03-26 13:51         ` tytso [this message]
2010-03-30  0:43           ` Jan Kara
2010-03-26 10:42     ` Jan Kara
2010-03-26 13:38       ` tytso
2010-03-30  0:55         ` Jan Kara
2010-03-30  5:26           ` Dmitry Monakhov
2010-03-30 12:42             ` Jan Kara
2010-03-26  8:09   ` Dmitry Monakhov
2010-03-26 11:00     ` Jan Kara
2010-03-26 13:55     ` tytso

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=20100326135136.GF21658@thunk.org \
    --to=tytso@mit.edu \
    --cc=andreas.dilger@oracle.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@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).