45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
|
From a43dc757eff7fe9417f72e25fc373d09439963de Mon Sep 17 00:00:00 2001
|
||
|
From: Vratislav Podzimek <vpodzime@redhat.com>
|
||
|
Date: Fri, 18 Nov 2016 14:01:49 +0100
|
||
|
Subject: [PATCH 1/2] Change how we run e2fsck to check ext filesystems
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
The '-p' option means "Automatically repair ("preen") the file system. This
|
||
|
option will cause e2fsck to automatically fix any filesystem problems that can
|
||
|
be safely fixed without human intervention." which is something we really
|
||
|
shouldn't do as part of reset()/populate(). We should use '-n' instead "Open the
|
||
|
filesystem read-only, and assume an answer of `no' to all questions." which
|
||
|
guaranties no changes to be made on the file system.
|
||
|
|
||
|
We might want to add the '-p' functionality back at some point, but it needs to
|
||
|
be explicitly triggered by the user code (e.g. Anaconda). I think we need to add
|
||
|
a 'clean' property and a 'repair' method to the formats.FS class so that users
|
||
|
can see where the problem is (if any) and explicitly trigger a safe fixup
|
||
|
attempt if they want to.
|
||
|
|
||
|
Related: rhbz#1170803
|
||
|
---
|
||
|
blivet/tasks/fsck.py | 4 +++-
|
||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/blivet/tasks/fsck.py b/blivet/tasks/fsck.py
|
||
|
index a3ed775..c4214dc 100644
|
||
|
--- a/blivet/tasks/fsck.py
|
||
|
+++ b/blivet/tasks/fsck.py
|
||
|
@@ -114,7 +114,9 @@ class Ext2FSCK(FSCK):
|
||
|
128: "Shared library error."}
|
||
|
|
||
|
ext = availability.E2FSCK_APP
|
||
|
- options = ["-f", "-p", "-C", "0"]
|
||
|
+ # "Force checking even if the file system seems clean." (we might get false results otherwise)
|
||
|
+ # + "Open the filesystem read-only, and assume an answer of `no' to all questions."
|
||
|
+ options = ["-f", "-n"]
|
||
|
|
||
|
def _error_message(self, rc):
|
||
|
msgs = (self._fsck_errors[c] for c in self._fsck_errors.keys() if rc & c)
|
||
|
--
|
||
|
2.7.5
|
||
|
|