Re: [PATCH] Only load a module if the filesystem is supported (#490795, #494108).

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

 



> > For filesystems that we officially support, there is no change here.  For
> > those that require a cmdline option for support, module loading has now
> > moved from within the loader to inside the __init__ methods for the formats
> > themselves.  The intention here is to avoid kernel errors in modules that
> > the user never even wants to have involved.
> 
> Why not just always have it so that we load them in the __init__ if
> needed?  Then we could drop even more duplication between the loader and
> liveinst.sh (which needs this change too)

So, extend what I've already done to all the other filesystems too?
Sure, that is totally doable.  The only reason I didn't do that to begin
with was...

> Mounts from the loader should still be fine as we'll get the module
> auto-loaded by udev these days if it's needed.

...I didn't think about this part.

> > --- a/loader/loader.c
> > +++ b/loader/loader.c
> > @@ -2071,7 +2071,7 @@ int main(int argc, char ** argv) {
> >      stop_fw_loader(&loaderData);
> >      start_fw_loader(&loaderData);
> >  
> > -    mlLoadModuleSet("raid0:raid1:raid5:raid6:raid456:raid10:linear:fat:msdos:gfs2:reiserfs:jfs:xfs:btrfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-crypt:cbc:sha256:lrw:xts");
> > +    mlLoadModuleSet("raid0:raid1:raid5:raid6:raid456:raid10:linear:fat:msdos:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-crypt:cbc:sha256:lrw:xts");
> 
> So that would let us lose msdos, fat and xfs from this list

Assuming udev does what it is supposed to, we could also get rid of
vfat, ext4, and ext2 from the much earlier load in loader.c, right?

> > diff --git a/storage/formats/fs.py b/storage/formats/fs.py
> > @@ -427,6 +428,21 @@ class FS(DeviceFormat):
> >          if rc >= 4:
> >              raise FSError("filesystem check failed: %s" % rc)
> >  
> > +    def loadModule(self):
> > +        """Load whatever kernel module is required to support this filesystem."""
> > +        if not self._module:
> > +            return
> > +
> > +        try:
> > +            rc = iutil.execWithRedirect("modprobe", [self._module],
> > +                                        stdout="/dev/tty5", stderr="/dev/tty5",
> > +                                        searchPath=1)
> > +        except Exception as e:
> > +            raise FSError("Could not load %s kernel module: %s" % (self._module, e))
> > +
> > +        if rc:
> > +            raise FSError("Could not load %s kernel module." % self._module)
> 
> Should we raise an error here or just make it so the fs is unsupported,
> much like we do if the filesystem utils aren't available?  To also
> handle my thought, we'd need to check if the fs was listed in
> /proc/filesystems before doing the modprobe as well

I'm fine with making the FS unsupported, as long as we also log an
error.

Why do we need to check /proc/filesystems?  Assuming trying to double
load the module doesn't cause explosions, I can't see what the harm here
would be.

- Chris

_______________________________________________
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