summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2021-08-23 17:41:24 +0200
committerTheodore Ts'o <tytso@mit.edu>2021-09-03 14:34:58 -0400
commitd9612de393bd5ac13ff61fba4a5c576c455fbadb (patch)
treed046928880c20cfc83879dac44ad0cdcbb2d430d
parent5c87a5c54cc7a78b17dfe4a392cb551d283c353b (diff)
downloade2fsprogs-d9612de393bd5ac13ff61fba4a5c576c455fbadb.tar.gz
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@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--misc/tune2fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index f459d5d5..7f023adf 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1679,7 +1679,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)"),