[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210823154128.16615-5-jack@suse.cz>
Date: Mon, 23 Aug 2021 17:41:24 +0200
From: Jan Kara <jack@...e.cz>
To: Ted Tso <tytso@....edu>
Cc: <linux-ext4@...r.kernel.org>, Jan Kara <jack@...e.cz>
Subject: [PATCH 4/8] tune2fs: Fix conversion of quota files
When tune2fs is enabling quota feature, it looks for old-style quota
files and tries to transfer limits stored in these files into newly
created hidded quota files. However the code doing the transfer setups
the quota scan wrongly and instead of transferring limits we transfer
usage. So not only quota limits are lost (at least they can still be
recovered from the old quota files) but also usage information may be
wrong if the accounting in e2fsprogs does not exactly match the
accounting in quota-tools (which is actually the case). Fix the setup of
the quota scan.
Signed-off-by: Jan Kara <jack@...e.cz>
---
misc/tune2fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index bb08f8026918..0f6ef3d6df6b 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1673,7 +1673,7 @@ static int handle_quota_options(ext2_filsys fs)
if ((qf_ino = quota_file_exists(fs, qtype)) > 0) {
retval = quota_read_all_dquots(qctx, qf_ino,
qtype,
- QREAD_USAGE);
+ QREAD_LIMITS);
if (retval) {
com_err(program_name, retval,
_("while updating quota limits (%d)"),
--
2.26.2
Powered by blists - more mailing lists