Use direct scanning also for ext4

This commit is contained in:
Petr Písař 2016-11-10 14:36:50 +01:00
parent 94fa093128
commit 2f2687c0bc
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,36 @@
From 2b3795805c8d1bd8873b046508777fa6e9a5c83d Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
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 <jack@suse.cz>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
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

View File

@ -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,
# <https://sourceforge.net/p/linuxquota/bugs/123/>
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 <ppisar@redhat.com> - 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 <ppisar@redhat.com> - 1:4.03-6
- Correct repquota indentation for file systems with hiden quota files