linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>, Jan Kara <jack@suse.cz>
Subject: [PATCH 5/8] e2fsck: Do not trash user limits when processing orphan list
Date: Mon, 23 Aug 2021 17:41:25 +0200	[thread overview]
Message-ID: <20210823154128.16615-6-jack@suse.cz> (raw)
In-Reply-To: <20210823154128.16615-1-jack@suse.cz>

When e2fsck was loading quotas to process orphan list, it was loading
only quota usage. However subsequent quota writeout has effectively
overwritten quota limits, loosing them forever. Make sure quota limits
are preserved over orphan replay.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 e2fsck/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/e2fsck/super.c b/e2fsck/super.c
index 75b7b8ffa9b6..4ffafb211e50 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -282,7 +282,7 @@ static errcode_t e2fsck_read_all_quotas(e2fsck_t ctx)
 			continue;
 
 		retval = quota_read_all_dquots(ctx->qctx, qf_ino, qtype,
-					       QREAD_USAGE);
+					       QREAD_USAGE | QREAD_LIMITS);
 		if (retval)
 			break;
 	}
-- 
2.26.2


  parent reply	other threads:[~2021-08-23 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 15:41 [PATCH 0/8 v2] Quota fixes for e2fsprogs Jan Kara
2021-08-23 15:41 ` [PATCH 1/8] quota: Add support to version 0 quota format Jan Kara
2021-09-30 17:32   ` Theodore Ts'o
2021-08-23 15:41 ` [PATCH 2/8] quota: Fold quota_read_all_dquots() into quota_update_limits() Jan Kara
2021-08-23 15:41 ` [PATCH 3/8] quota: Rename quota_update_limits() to quota_read_all_dquots() Jan Kara
2021-08-23 15:41 ` [PATCH 4/8] tune2fs: Fix conversion of quota files Jan Kara
2021-08-23 15:41 ` Jan Kara [this message]
2021-08-23 15:41 ` [PATCH 6/8] tests: Expand test checking quota and orphan processing interaction Jan Kara
2021-08-23 15:41 ` [PATCH 7/8] debugfs: Fix headers for quota commands Jan Kara
2021-08-23 15:41 ` [PATCH 8/8] quota: Drop dead code Jan Kara
2021-09-15  9:30 ` [PATCH 0/8 v2] Quota fixes for e2fsprogs Jan Kara

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=20210823154128.16615-6-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).