Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 314540 Details for
Bug 444527
RFE: ext4/ext4dev support in anaconda for RHEL5
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
ext4dev and ext4 support - detection and formatting (nonsystem partitions)
ext4_ext4dev_support.patch (text/plain), 9.37 KB, created by
Radek Vykydal
on 2008-08-19 14:00:19 UTC
(
hide
)
Description:
ext4dev and ext4 support - detection and formatting (nonsystem partitions)
Filename:
MIME Type:
Creator:
Radek Vykydal
Created:
2008-08-19 14:00:19 UTC
Size:
9.37 KB
patch
obsolete
>diff --git a/anaconda.spec b/anaconda.spec >index 8225a1d..b9d190e 100644 >--- a/anaconda.spec >+++ b/anaconda.spec >@@ -23,6 +23,7 @@ Requires: libxml2-python, python-urlgrabber > Requires: system-logos, pykickstart, system-config-date > Requires: device-mapper >= 1.01.05-3 > Requires: dosfstools >= 2.11-6.2 e2fsprogs >+Requires: e4fsprogs > Requires: python-pyblock >= 0.26-1 > Requires: libbdevid >= 5.1.2-1, libbdevid-python > Requires: audit-libs >diff --git a/fsset.py b/fsset.py >index 78bcdbe..bf2686b 100644 >--- a/fsset.py >+++ b/fsset.py >@@ -690,6 +690,116 @@ class ext3FileSystem(extFileSystem): > > fileSystemTypeRegister(ext3FileSystem()) > >+class ext4FileSystem(extFileSystem): >+ >+ # features are parsed from dumpe4fs output >+ # taken from e4fsprogs lib/blkid/probe.h, lib/e2p/features.c >+ specialFeatures = [ >+ 'huge_file', >+ 'gdt_checksum', >+ 'dir_nlink', >+ 'extra_size', >+ 'extents', >+ 'extent', >+ '64brt', >+ 'flex_bg', >+ ] >+ >+ # taken from e4fsprogs lib/blkid/probe.c >+ def probe(device): >+ flags, features = getExtFSFlagsFeatures(device) >+ if not features: >+ log.debug("%s not probed as ext4" % (device,)) >+ return False >+ for f in features: >+ if f in ext4FileSystem.specialFeatures: >+ if flags and "test_filesystem" in flags: >+ ext4 = fileSystemTypeGet("ext4") >+ ext4dev = fileSystemTypeGet("ext4dev") >+ if not ext4dev.isMountable() and ext4.isMountable(): >+ log.debug("%s probed as ext4" % (device,)) >+ return True >+ else: >+ log.debug("%s probed as ext4" % (device,)) >+ return True >+ break >+ log.debug("%s not probed as ext4" % (device,)) >+ return False >+ >+ probe = staticmethod(probe) >+ >+ def __init__(self): >+ extFileSystem.__init__(self) >+ self.name = "ext4" >+ self.linuxnativefs = 0 >+ # options are set in mke4fs.conf >+ #self.extraFormatArgs = [ "-j", "-I", "256"] >+ self.partedFileSystemType = parted.file_system_type_get("ext3") >+ >+ self.packages = [ "e4fsprogs" ] >+ >+ # this is tech preview at present... >+ if flags.cmdline.has_key("ext4"): >+ self.supported = -1 >+ else: >+ self.supported = 0 >+ >+ def labelDevice(self, entry, chroot): >+ devicePath = entry.device.setupDevice(chroot) >+ label = labelFactory.createLabel(entry.mountpoint, self.maxLabelChars, >+ kslabel = entry.label) >+ >+ rc = iutil.execWithRedirect("/usr/sbin/e4label", >+ [devicePath, label], >+ stdout = "/dev/tty5", >+ stderr = "/dev/tty5") >+ if rc: >+ raise SystemError >+ entry.setLabel(label) >+ >+ def formatDevice(self, entry, progress, chroot='/'): >+ devicePath = entry.device.setupDevice(chroot) >+ devArgs = self.getDeviceArgs(entry.device) >+ args = [ "/usr/sbin/mke4fs", "-T", self.name, devicePath, "-i", str(entry.bytesPerInode) ] >+ >+ args.extend(devArgs) >+ args.extend(self.extraFormatArgs) >+ >+ log.info("Format command: %s\n" % str(args)) >+ >+ rc = ext2FormatFilesystem(args, "/dev/tty5", >+ progress, >+ entry.mountpoint) >+ if rc: >+ raise SystemError >+ >+ extFileSystem.setExt3Options(self, entry, progress, chroot) >+ >+fileSystemTypeRegister(ext4FileSystem()) >+ >+class ext4devFileSystem(ext4FileSystem): >+ >+ # taken from e4fsprogs lib/blkid/probe.c >+ def probe(device): >+ flags, features = getExtFSFlagsFeatures(device) >+ if flags and ('test_filesystem' in flags): >+ ext4 = fileSystemTypeGet("ext4") >+ ext4dev = fileSystemTypeGet("ext4dev") >+ if ext4dev.isMountable() or not ext4.isMountable(): >+ log.debug("%s probed as ext4dev" % (device,)) >+ return True >+ log.debug("%s not probed as ext4dev" % (device,)) >+ return False >+ probe = staticmethod(probe) >+ >+ def __init__(self): >+ ext4FileSystem.__init__(self) >+ self.name = "ext4dev" >+ # options are set in mke4fs.conf >+ #self.extraFormatArgs = [ "-j", "-I", "256", "-E", "test_fs" ] >+ >+fileSystemTypeRegister(ext4devFileSystem()) >+ > class raidMemberDummyFileSystem(FileSystemType): > def __init__(self): > FileSystemType.__init__(self) >@@ -2868,6 +2978,10 @@ def getFStoTry(device): > create = 0 > else: > create = 1 >+ if ext4devFileSystem.probe(device): >+ rc.append("ext4dev") >+ if ext4FileSystem.probe(device): >+ rc.append("ext4") > if isys.ext2HasJournal(device, makeDevNode = create): > rc.append("ext3") > rc.append("ext2") >@@ -3003,3 +3117,23 @@ def getDiskPart(dev): > partNum = None > > return (name, partNum) >+ >+def getExtFSFlagsFeatures(device): >+ >+ args = ["-h", device] >+ output = iutil.execWithCapture("dumpe4fs", args, stderr = "/dev/tty5") >+ >+ flags = None >+ features = None >+ >+ for line in output.split("\n"): >+ if line[:20] == "Filesystem features:": >+ features = line[20:].split() >+ if line[:17] == "Filesystem flags:": >+ flags = line[17:].split() >+ if flags is not None and features is not None: >+ break >+ >+ return (flags, features) >+ >+ >diff --git a/loader2/loader.c b/loader2/loader.c >index 905177e..226d483 100644 >--- a/loader2/loader.c >+++ b/loader2/loader.c >@@ -1660,7 +1660,7 @@ int main(int argc, char ** argv) { > else if (FL_UPDATES(flags)) > loadUpdates(&loaderData); > >- mlLoadModuleSet("md:raid0:raid1:raid5:raid6:raid456:fat:msdos:jbd:ext3:lock_nolock:gfs2:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc", modLoaded, modDeps, modInfo); >+ mlLoadModuleSet("md:raid0:raid1:raid5:raid6:raid456:fat:msdos:jbd2:crc16:ext4dev:jbd:ext3:lock_nolock:gfs2:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc", modLoaded, modDeps, modInfo); > > usbInitializeMouse(modLoaded, modDeps, modInfo); > >diff --git a/partedUtils.py b/partedUtils.py >index 25a8f0d..e257777 100644 >--- a/partedUtils.py >+++ b/partedUtils.py >@@ -484,7 +484,12 @@ def sniffFilesystemType(device): > # ext2 check > if struct.unpack("<H", buf[1080:1082]) == (0xef53,): > if isys.ext2HasJournal(dev, makeDevNode = 0): >- return "ext3" >+ if fsset.ext4devFileSystem.probe(dev): >+ return "ext4dev" >+ elif fsset.ext4FileSystem.probe(dev): >+ return "ext4" >+ else: >+ return "ext3" > else: > return "ext2" > >diff --git a/partitions.py b/partitions.py >index 96b0cd9..c3e5cf5 100644 >--- a/partitions.py >+++ b/partitions.py >@@ -1021,6 +1021,12 @@ class Partitions: > errors.append("Bootable partitions cannot be on a GFS2 " > "filesystem.") > >+ # no ext4dev or ext4 support in grub >+ if (bootreq and bootreq.fstype and >+ bootreq.fstype.getName() in ["ext4", "ext4dev"]): >+ errors.append("Bootable partitions cannot be on an %s " >+ "filesystem." % bootreq.fstype.getName()) >+ > > if foundSwap == 0: > warnings.append(_("You have not specified a swap partition. " >diff --git a/scripts/mk-images b/scripts/mk-images >index c2bc3bc..26a1bd5 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" > SCSIMODS="sr_mod sg st sd_mod scsi_mod iscsi_tcp iscsi_ibft" >-FSMODS="fat msdos vfat ext3 reiserfs jfs xfs gfs2 lock_nolock" >+FSMODS="fat msdos vfat ext3 ext4dev reiserfs jfs xfs 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 raid5 raid6 raid456" > SECSTAGE="$RAIDMODS $LVMMODS $FSMODS $IDEMODS $SCSIMODS" >diff --git a/scripts/upd-instroot b/scripts/upd-instroot >index b85a435..238f518 100755 >--- a/scripts/upd-instroot >+++ b/scripts/upd-instroot >@@ -124,7 +124,8 @@ PACKAGES="glibc glibc-common setup openssl python newt slang libselinux > yum-metadata-parser gfs2-utils libvolume_id rhel-instnum > libdhcp libnl libdhcp6client libdhcp4client device-mapper-multipath > kpartx dmraid python-pyblock mkinitrd libbdevid libbdevid-python >- libselinux-python nss udev keyutils-libs nspr python-iniparse" >+ libselinux-python nss udev keyutils-libs nspr python-iniparse >+ e4fsprogs" > > if [ $ARCH = i386 -o $ARCH = x86_64 ]; then > PACKAGES="$PACKAGES pcmciautils" >@@ -192,7 +193,7 @@ PACKAGESGR="anaconda XFree86-libs libpng XFree86-75dpi-fonts > fonts-malayalam fonts-oriya fonts-kannada fonts-telugu > fonts-gujarati fonts-hindi fonts-punjabi fonts-tamil synaptics > firstboot pycairo pirut dejavu-lgc-fonts >- dmraid python-pyblock libbdevid libbdevid-python" >+ dmraid python-pyblock libbdevid libbdevid-python e4fsprogs" > > # > # stuff ONLY included for rescue mode
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 444527
:
314196
|
314198
| 314540 |
314545
|
314546