[PATCH 1/2 rhel5-branch] Use tune4fs for ext4 filesystems (#616184)

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

 



NOTE: Tested against RHEL5.5 DVD.

Need to use tune4fs on ext4 filesystems instead of tune2fs. This is
only needed for RHEL5.

Resolves: rhbz#616184
---
 fsset.py |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/fsset.py b/fsset.py
index 54753a0..d19d46b 100644
--- a/fsset.py
+++ b/fsset.py
@@ -755,7 +755,7 @@ class ext4FileSystem(extFileSystem):
         if rc:
             raise SystemError
         entry.setLabel(label)
-        
+
     def formatDevice(self, entry, progress, chroot='/'):
         devicePath = entry.device.setupDevice(chroot)
         devArgs = self.getDeviceArgs(entry.device)
@@ -764,7 +764,7 @@ class ext4FileSystem(extFileSystem):
         args.extend(devArgs)
         args.extend(self.extraFormatArgs)
 
-	log.info("Format command:  %s\n" % str(args))
+        log.info("Format command:  %s\n" % str(args))
 
         rc = ext2FormatFilesystem(args, "/dev/tty5",
                                   progress,
@@ -772,8 +772,21 @@ class ext4FileSystem(extFileSystem):
         if rc:
             raise SystemError
 
-        extFileSystem.setExt3Options(self, entry, progress, chroot)
- 
+        self.setExt4Options(entry, progress, chroot)
+
+    def setExt4Options(self, entry, message, chroot='/'):
+        devicePath = entry.device.setupDevice(chroot)
+
+        # if no journal, don't turn off the fsck
+        if not isys.ext2HasJournal(devicePath, makeDevNode = 0):
+            return
+
+        rc = iutil.execWithRedirect("/usr/sbin/tune4fs",
+                                    ["-c0", "-i0", "-Odir_index",
+                                     "-ouser_xattr,acl", devicePath],
+                                    stdout = "/dev/tty5",
+                                    stderr = "/dev/tty5")
+
 fileSystemTypeRegister(ext4FileSystem())
 
 class raidMemberDummyFileSystem(FileSystemType):
-- 
1.7.2.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux