[PATCH] fsset.py tweaks for ext4dev & xfs

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

 



ext4dev just got a "test_fs" flag which soon must be set in order for
the kernel to mount it; this will prevent ext3 from accidentally getting
mounted as ext4, and making it hard to go back.  (when ext4 goes prime-time,
the need for this flag will be removed).

Perhaps anaconda.spec should also depend on e2fsprogs >= 1.40.5
with this change.

Also tweak the xfs class a bit; most mkfs arguments specified are actually
defaults now, and there is a nicer labeling command available, xfs_admin - a
665-byte bash script which I added to upd-instroot too.

*cough* not actually tested in anaconda but what can go wrong?  ;)

Thanks,

-Eric

Index: anaconda-11.4.0.30/fsset.py
===================================================================
--- anaconda-11.4.0.30.orig/fsset.py
+++ anaconda-11.4.0.30/fsset.py
@@ -411,9 +411,7 @@ class xfsFileSystem(FileSystemType):
     def formatDevice(self, entry, progress, chroot='/'):
         devicePath = entry.device.setupDevice(chroot)
 
-        rc = iutil.execWithRedirect("mkfs.xfs",
-                                    ["-f", "-l", "internal", 
-                                     "-i", "attr=2", devicePath],
+        rc = iutil.execWithRedirect("mkfs.xfs", ["-f", devicePath],
                                     stdout = "/dev/tty5",
                                     stderr = "/dev/tty5", searchPath = 1)
 
@@ -424,9 +422,8 @@ class xfsFileSystem(FileSystemType):
         devicePath = entry.device.setupDevice(chroot)
         label = labelFactory.createLabel(entry.mountpoint, self.maxLabelChars,
                                          kslabel = entry.label)
-        db_cmd = "label " + label
-        rc = iutil.execWithRedirect("xfs_db",
-                                    ["-x", "-c", db_cmd, devicePath],
+        rc = iutil.execWithRedirect("xfs_admin",
+                                    ["-L", label, devicePath],
                                     stdout = "/dev/tty5",
                                     stderr = "/dev/tty5", searchPath = 1)
         if rc:
@@ -718,9 +715,10 @@ class ext4FileSystem(extFileSystem):
         extFileSystem.__init__(self)
         self.name = "ext4dev"
         self.partedFileSystemType = parted.file_system_type_get("ext3")
-        self.extraFormatArgs = [ "-j", "-I", "256" ]
+	# 256-byte inodes are actually default now, but let's be sure.
+        self.extraFormatArgs = [ "-j", "-I", "256", "-E", "test_fs" ]
 
-        # this is way way way experimental at present...
+        # this is way way experimental at present...
         if flags.cmdline.has_key("iamanext4developer"):
             self.supported = -1
         else:
Index: anaconda-11.4.0.30/scripts/upd-instroot
===================================================================
--- anaconda-11.4.0.30.orig/scripts/upd-instroot
+++ anaconda-11.4.0.30/scripts/upd-instroot
@@ -378,6 +378,7 @@ sbin/tune2fs
 sbin/xfsdump
 sbin/xfsrestore
 sbin/xfs_repair
+usr/sbin/xfs_admin
 usr/sbin/xfs_db
 usr/sbin/xfs_check
 usr/sbin/xfs_copy


_______________________________________________
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