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]

 



On Monday, April 06 2009, Chris Lumens said:
> > > diff --git a/loader/loader.c b/loader/loader.c
> > > index 98ea24c..7b3eb0c 100644
> > > --- a/loader/loader.c
> > > +++ b/loader/loader.c
> > > @@ -1919,7 +1919,7 @@ int main(int argc, char ** argv) {
> > >      if (isVioConsole())
> > >          setenv("TERM", "vt100", 1);
> > >  
> > > -    mlLoadModuleSet("cramfs:vfat:nfs:floppy:edd:pcspkr:squashfs:ext4:ext2:iscsi_tcp:iscsi_ibft");
> > > +    mlLoadModuleSet("cramfs:floppy:edd:pcspkr:squashfs:iscsi_tcp:iscsi_ibft");
> > 
> > cramfs and squashfs shouldn't need explicit loads.  We should then check
> > some of the others and see if they're being loaded by udev also (pcspkr
> > and floppy are the two that immediately spring to mind)
> 
> Okay, I might do this as round two, once this original stuff goes in.

Sure, was more an observation than anything else
 
> > > diff --git a/storage/formats/fs.py b/storage/formats/fs.py
> > > @@ -427,6 +431,23 @@ 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 or self._module in kernel_filesystems:
> > > +            return
> > > +
> > > +        try:
> > > +            rc = iutil.execWithRedirect("modprobe", [self._module],
> > > +                                        stdout="/dev/tty5", stderr="/dev/tty5",
> > > +                                        searchPath=1)
> > > +        except Exception as e:
> > > +            log.error("Could not load kernel module %s: %s" % (self._module, e))
> > > +            self._supported = False
> > > +
> > > +        if rc:
> > > +            log.error("Could not load kernel module %s" % self._module)
> > > +            self._supported = False
> > > +
> > 
> > I still think we need a check against /proc/filesystems here to see if
> > support already exists as built-in vs modular.
> 
> That's what the "self._module in kernel_filesystems" bit is about.

This just goes to show that I'm blind :-)
 
> > Also, I wonder if we're
> > going to have any filesystems that need multiple modules (so a list, not
> > just a string)
> 
> I debated this myself too and chose a string because I didn't see any
> existing cases of needing more than one module.  But that's easy enough
> to fix.

I think that gfs2 needs gfs2 and a dlm module.  We're not loading one,
though, so either they fixed it or I'm mis-remembering.  In any case, if
we need to change down the line, that's certainly easy enough

Thanks for doing this -- it should help a lot with making things more
predictable and it'll also be one fewer "special" thing

Jeremy

_______________________________________________
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