From: David Chinner <dgc@sgi.com>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: xfs@oss.sgi.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Do not reset xfsquota flags on quotaless ro mount
Date: Wed, 19 Dec 2007 01:38:49 +1100 [thread overview]
Message-ID: <20071218143849.GP4396912@sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0712181459210.32270@fbirervta.pbzchgretzou.qr>
On Tue, Dec 18, 2007 at 03:04:03PM +0100, Jan Engelhardt wrote:
> Hi,
>
>
> In https://bugzilla.novell.com/show_bug.cgi?id=345338 it is claimed that
> resetting the quota flags in the mounting sequence rw,ro,rw is a bug, but I
You mounted without quotas in the middle step, thereby invalidating
them.
> would say this is not the case, as quota is metadata, and the log is replayed
> in ro mode even for other filesystems. Yet, it is still not nice, and I have
> been trying with this patch, which does not do the right thing yet. (It does a
> recovery when mounting for the 3rd time, which probably just says that I did
> not know too much of xfs internals to cook up a nicely working patch.)
> Opinions?
Log recovery occurs on read only mounts. Log recovery on filesystems without
quota enabled ignores quota changes in the log (as quotas are not enabled
and hence we can't assume that there's dquots still on disk). Hence a
mount read only without quota enabled will leave quota inconsistent on disk.
i.e
> mount -o usrquota,grpquota /dev/mapper/myxfs /mnt
> umount /mnt
> mount -o ro /dev/mapper/myxfs /mnt
Quota is now potentially inconsistent, and hence:
> umount /mnt
> mount -o usrquota,grpquota /dev/mapper/myxfs /mnt
This mount *must* recalculate it. So, behaviour is as expected
given the above command sequence.
You should use this as the middle step:
mount -o ro,usrquota,grpquota /dev/mapper/myxfs /mnt
So that log replay replays all the journalled quota changes so
that the quota remains consistent with the rest of the filesystem.
Then you wont see a recalc when you remount rw.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2007-12-18 14:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 14:04 Do not reset xfsquota flags on quotaless ro mount Jan Engelhardt
2007-12-18 14:38 ` David Chinner [this message]
2007-12-18 14:49 ` Jan Engelhardt
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=20071218143849.GP4396912@sgi.com \
--to=dgc@sgi.com \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.