[PATCH 4/8] tune2fs: Fix conversion of quota files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux