From 2f2687c0bcce287ac2de1de66b745c3f159e78dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 10 Nov 2016 14:36:50 +0100 Subject: [PATCH] Use direct scanning also for ext4 --- ...ck-Use-direct-scanning-also-for-ext4.patch | 36 +++++++++++++++++++ quota.spec | 4 +++ 2 files changed, 40 insertions(+) create mode 100644 quota-4.03-quotacheck-Use-direct-scanning-also-for-ext4.patch diff --git a/quota-4.03-quotacheck-Use-direct-scanning-also-for-ext4.patch b/quota-4.03-quotacheck-Use-direct-scanning-also-for-ext4.patch new file mode 100644 index 0000000..8d5048a --- /dev/null +++ b/quota-4.03-quotacheck-Use-direct-scanning-also-for-ext4.patch @@ -0,0 +1,36 @@ +From 2b3795805c8d1bd8873b046508777fa6e9a5c83d Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Tue, 9 Aug 2016 19:17:56 +0200 +Subject: [PATCH] quotacheck: Use direct scanning also for ext4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We mistakenly didn't use direct scanning through libext2fs for ext4 +filesystem. Add ext4 to the list of filesystem libext2fs can handle. + +Signed-off-by: Jan Kara +Signed-off-by: Petr Písař +--- + quotacheck.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/quotacheck.c b/quotacheck.c +index 6f34cff..a6fe432 100644 +--- a/quotacheck.c ++++ b/quotacheck.c +@@ -959,7 +959,10 @@ Please stop all programs writing to filesystem or use -m flag to force checking. + start_scan: + debug(FL_VERBOSE | FL_DEBUG, _("Scanning %s [%s] "), mnt->me_devname, mnt->me_dir); + #if defined(EXT2_DIRECT) +- if (!strcmp(mnt->me_type, MNTTYPE_EXT2) || !strcmp(mnt->me_type, MNTTYPE_EXT3) || !strcmp(mnt->me_type, MNTTYPE_NEXT3)) { ++ if (!strcmp(mnt->me_type, MNTTYPE_EXT2) || ++ !strcmp(mnt->me_type, MNTTYPE_EXT3) || ++ !strcmp(mnt->me_type, MNTTYPE_NEXT3) || ++ !strcmp(mnt->me_type, MNTTYPE_EXT4)) { + if ((failed = ext2_direct_scan(mnt->me_devname)) < 0) + goto out; + } +-- +2.7.4 + diff --git a/quota.spec b/quota.spec index dfb1b48..b07ae21 100644 --- a/quota.spec +++ b/quota.spec @@ -56,6 +56,8 @@ Patch7: quota-4.03-repquota-use-the-same-whitespace-for-quotaio_meta-as.patch # Fix checking a block read error, in upstream after 4.03, # Patch8: quota-4.03-quotacheck-Fix-buggy-error-check-of-read-2.patch +# Use direct scanning also for ext4, in upsream after 4.03 +Patch9: quota-4.03-quotacheck-Use-direct-scanning-also-for-ext4.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bash @@ -172,6 +174,7 @@ Linux/UNIX environment. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # Unpack forgotten LDAP scripts tar -xzkf %{SOURCE5} # Regenerate build scripts, also because of Respect-enviroment-CFLAGS.patch @@ -289,6 +292,7 @@ make check %changelog * Thu Nov 10 2016 Petr Pisar - 1:4.03-7 - Fix checking a block read error (upstream bug #123) +- Use direct scanning also for ext4 * Fri Jun 10 2016 Petr Pisar - 1:4.03-6 - Correct repquota indentation for file systems with hiden quota files