[PATCH] Add gfs support (#754213)

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

 



---
 fsset.py             |   30 ++++++++++++++++++++++++++++++
 loader2/loader.c     |    2 +-
 partitions.py        |    6 +++---
 scripts/mk-images    |    2 +-
 scripts/upd-instroot |    5 +++--
 5 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/fsset.py b/fsset.py
index e157519..e8e5a23 100644
--- a/fsset.py
+++ b/fsset.py
@@ -539,6 +539,36 @@ class jfsFileSystem(FileSystemType):
                                   
 fileSystemTypeRegister(jfsFileSystem())
 
+class gfsFileSystem(FileSystemType):
+    def __init__(self):
+        FileSystemType.__init__(self)
+        self.partedFileSystemType = None
+        self.formattable = 1
+        self.checked = 1
+        self.linuxnativefs = 1
+        if flags.cmdline.has_key("gfs"):
+            self.supported = -1
+        else:
+            self.supported = 0
+
+        self.name = "gfs"
+        self.packages = [ "gfs-utils" ]
+
+        self.maxSizeMB = 8 * 1024 * 1024
+
+    def formatDevice(self, entry, progress, chroot='/'):
+        devicePath = entry.device.setupDevice(chroot)
+        rc = iutil.execWithRedirect("/usr/sbin/mkfs.gfs",
+                                    ["-j", "1", "-p", "lock_nolock",
+                                     "-O", devicePath],
+                                    stdout = "/dev/tty5",
+                                    stderr = "/dev/tty5")
+
+        if rc:
+            raise SystemError
+
+fileSystemTypeRegister(gfsFileSystem())
+
 class gfs2FileSystem(FileSystemType):
     def __init__(self):
         FileSystemType.__init__(self)
diff --git a/loader2/loader.c b/loader2/loader.c
index 84e9088..b68601a 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -1810,7 +1810,7 @@ int main(int argc, char ** argv) {
     else if (FL_UPDATES(flags))
         loadUpdates(&loaderData);
 
-    mlLoadModuleSet("md:raid0:raid1:raid10:raid5:raid6:raid456:dm-raid45:fat:msdos:jbd2:crc16:ext4:jbd:ext3:lock_nolock:gfs2:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc:dm-crypt:dm-mem-cache:dm-region_hash:dm-message", modLoaded, modDeps, modInfo);
+    mlLoadModuleSet("md:raid0:raid1:raid10:raid5:raid6:raid456:dm-raid45:fat:msdos:jbd2:crc16:ext4:jbd:ext3:lock_nolock:gfs2:gfs:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc:dm-crypt:dm-mem-cache:dm-region_hash:dm-message", modLoaded, modDeps, modInfo);
 
     /* crypto modules */
     mlLoadModuleSet("aead:aes_generic:rng:ansi_cprng:krng:anubis:crypto_blkcipher:authenc:blowfish:cast5:cast6:cbc:ccm:chainiv:crypto_hash:cryptomgr:ctr:zlib_deflate:deflate:crypto_null:des:ecb:eseqiv:gf128mul:hmac:khazad:md4:md5:michael_mic:seqiv:serpent:sha256:sha512:tea:tgr192:twofish:wp512:xcbc:xts", modLoaded, modDeps, modInfo);
diff --git a/partitions.py b/partitions.py
index 52d0b8c..208a8d5 100644
--- a/partitions.py
+++ b/partitions.py
@@ -1224,9 +1224,9 @@ class Partitions:
 
                 # no gfs support in grub
                 if (bootreq and bootreq.fstype and
-                    bootreq.fstype.getName() == "gfs2"):
-                    errors.append("Bootable partitions cannot be on a GFS2 "
-                                  "filesystem.")
+                    bootreq.fstype.getName() in ["gfs", "gfs2"]):
+                    errors.append("Bootable partitions cannot be on a GFS "
+                                  "nor a GFS2 filesystem.")
                     
                 # no ext4 support in grub
                 if (bootreq and bootreq.fstype and
diff --git a/scripts/mk-images b/scripts/mk-images
index ef29709..95429f5 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -42,7 +42,7 @@ USBMODS="ohci-hcd uhci-hcd ehci-hcd hid mousedev usb-storage sd_mod sr_mod ub"
 FIREWIREMODS="ieee1394 ohci1394 sbp2"
 IDEMODS="ide-cd ide-cs"
 SCSIMODS="sr_mod sg st sd_mod scsi_mod iscsi_tcp iscsi_ibft"
-FSMODS="fat msdos vfat ext3 ext4 reiserfs jfs xfs gfs2 lock_nolock"
+FSMODS="fat msdos vfat ext3 ext4 reiserfs jfs xfs gfs gfs2 lock_nolock"
 LVMMODS="dm-mod dm-zero dm-snapshot dm-mirror dm-multipath dm-round-robin dm-emc dm-crypt"
 RAIDMODS="md raid0 raid1 raid10 raid5 raid6 raid456 dm-raid45 dm-mem-cache dm-region_hash dm-message"
 SECSTAGE="$RAIDMODS $LVMMODS $FSMODS $IDEMODS $SCSIMODS"
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 09cf644..d83d375 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -118,8 +118,9 @@ PACKAGES="glibc glibc-common setup openssl python python-libs newt slang libseli
 	 libstdc++ expat libgcc readline ncurses yum python-sqlite
 	 python-elementtree pykickstart e2fsprogs-libs iscsi-initiator-utils
 	 db4 rhpxl xorg-x11-server-Xorg libuser system-config-date
-         yum-metadata-parser gfs2-utils libvolume_id rhel-instnum yum-kmod
-	 libdhcp libnl libdhcp6client libdhcp4client device-mapper-multipath
+         yum-metadata-parser gfs-utils kmod-gfs gfs2-utils libvolume_id
+         rhel-instnum yum-kmod libdhcp libnl libdhcp6client libdhcp4client
+         device-mapper-multipath
 	 kpartx dmraid python-pyblock mkinitrd libbdevid libbdevid-python
 	 libselinux-python nss udev keyutils-libs nspr python-iniparse
 	 cryptsetup-luks e4fsprogs fipscheck fipscheck-lib libdrm libmlx4
-- 
1.7.4.4

_______________________________________________
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