linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/4] xfs_repair: fix clearing of quota CHKD flags
Date: Wed, 15 Jul 2020 18:47:55 +0100	[thread overview]
Message-ID: <20200715174755.GE11239@infradead.org> (raw)
In-Reply-To: <159476317959.3156699.12804674592240361133.stgit@magnolia>

On Tue, Jul 14, 2020 at 02:46:19PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> XFS_ALL_QUOTA_CHKD, being a OR of [UGP]QUOTA_CHKD, is a bitset of the
> possible *incore* quota checked flags.  This means that it cannot be
> used in a comparison with the *ondisk* quota checked flags because V4
> filesystems set OQUOTA_CHKD, not the [GU]QUOTA_CHKD flags (which are V5
> flags).
> 
> If you have a V4 filesystem with user quotas disabled but either group
> or project quotas enabled, xfs_repair will /not/ claim that the quota
> info will be regenerated on the next mount like it does in any other
> situation.  This is because the ondisk qflags field has OQUOTA_CHKD set
> but repair fails to notice.
> 
> Worse, if you have a V4 filesystem with user and group quotas enabled
> and mild corruption, repair will claim that the quota info will be
> regenerated.  If you then mount the fs with only group quotas enabled,
> quotacheck will not run to correct the data because repair failed to
> clear OQUOTA_CHKD properly.
> 
> These are fairly benign and unlikely scenarios, but when we add
> quotacheck capabilities to xfs_repair, it will complain about the
> incorrect quota counts, which causes regressions in xfs/278.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2020-07-15 17:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 21:46 [PATCH v2.2 0/4] xfs_repair: check quota counters Darrick J. Wong
2020-07-14 21:46 ` [PATCH 1/4] xfs_repair: alphabetize HFILES and CFILES Darrick J. Wong
2020-07-15 17:47   ` Christoph Hellwig
2020-07-14 21:46 ` [PATCH 2/4] xfs_repair: fix clearing of quota CHKD flags Darrick J. Wong
2020-07-15 17:47   ` Christoph Hellwig [this message]
2020-07-14 21:46 ` [PATCH 3/4] xfs_repair: check quota values if quota was loaded Darrick J. Wong
2020-07-15 18:29   ` Christoph Hellwig
2020-07-14 21:46 ` [PATCH 4/4] xfs_repair: skip mount time quotacheck if our quotacheck was ok Darrick J. Wong
2020-07-15 18:30   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2020-05-14 16:56 [PATCH v2 0/4] xfs_repair: check quota counters Darrick J. Wong
2020-05-14 16:56 ` [PATCH 2/4] xfs_repair: fix clearing of quota CHKD flags 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=20200715174755.GE11239@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).