69 строки
2.4 KiB
Diff
69 строки
2.4 KiB
Diff
|
From 100b8a8814152ca6f52564cb65f33bf7cf033c22 Mon Sep 17 00:00:00 2001
|
||
|
From: Jan Kara <jack@suse.cz>
|
||
|
Date: Fri, 20 Aug 2021 21:51:05 +0200
|
||
|
Subject: [PATCH 1/3] quotacheck, quotaon: Always display message about
|
||
|
deprecated usage
|
||
|
|
||
|
Visible quota files on ext4 filesystem are deprecated. Make sure we
|
||
|
always display the warning message and also expand the message to
|
||
|
explain how the filesystem can be converted.
|
||
|
|
||
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
||
|
---
|
||
|
quotacheck.c | 7 +++++--
|
||
|
quotaon.c | 7 ++++---
|
||
|
2 files changed, 9 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/quotacheck.c b/quotacheck.c
|
||
|
index 1b81610..bd62d9a 100644
|
||
|
--- a/quotacheck.c
|
||
|
+++ b/quotacheck.c
|
||
|
@@ -1198,7 +1198,7 @@ static int check_all(void)
|
||
|
debug(FL_DEBUG, _("Detected quota format %s\n"), fmt2name(cfmt));
|
||
|
}
|
||
|
|
||
|
- if (flags & (FL_VERBOSE | FL_DEBUG) && !warned) {
|
||
|
+ if (!warned) {
|
||
|
if (!strcmp(mnt->me_type, MNTTYPE_EXT4) &&
|
||
|
ext4_supports_quota_feature()) {
|
||
|
warned = 1;
|
||
|
@@ -1207,7 +1207,10 @@ static int check_all(void)
|
||
|
"external quota files. Please switch "
|
||
|
"your filesystem to use ext4 quota "
|
||
|
"feature as external quota files on "
|
||
|
- "ext4 are deprecated.\n"));
|
||
|
+ "ext4 are deprecated. You can enable "
|
||
|
+ "the feature by unmounting the file "
|
||
|
+ "system and running 'tune2fs -O quota "
|
||
|
+ "<device>'.\n"));
|
||
|
} else if (!str_hasmntopt(mnt->me_opts, MNTOPT_USRJQUOTA) &&
|
||
|
!str_hasmntopt(mnt->me_opts, MNTOPT_GRPJQUOTA) &&
|
||
|
(!strcmp(mnt->me_type, MNTTYPE_EXT3) ||
|
||
|
diff --git a/quotaon.c b/quotaon.c
|
||
|
index aceb6ec..125b934 100644
|
||
|
--- a/quotaon.c
|
||
|
+++ b/quotaon.c
|
||
|
@@ -270,15 +270,16 @@ static int newstate(struct mount_entry *mnt, int type, char *extra)
|
||
|
|
||
|
if (!me_hasquota(mnt, type))
|
||
|
return 0;
|
||
|
- if (flags & FL_VERBOSE && !warned &&
|
||
|
- !strcmp(mnt->me_type, MNTTYPE_EXT4) &&
|
||
|
+ if (!warned && !strcmp(mnt->me_type, MNTTYPE_EXT4) &&
|
||
|
ext4_supports_quota_feature()) {
|
||
|
warned = 1;
|
||
|
errstr(_("Your kernel probably supports ext4 quota "
|
||
|
"feature but you are using external quota "
|
||
|
"files. Please switch your filesystem to use "
|
||
|
"ext4 quota feature as external quota files "
|
||
|
- "on ext4 are deprecated.\n"));
|
||
|
+ "on ext4 are deprecated. You can enable the "
|
||
|
+ "feature by unmounting the file system and "
|
||
|
+ "running 'tune2fs -O quota <device>'.\n"));
|
||
|
}
|
||
|
if (fmt == -1) {
|
||
|
if (get_qf_name(mnt, type, QF_VFSV0,
|
||
|
--
|
||
|
2.31.1
|
||
|
|