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

Re: [PATCH 04/16] Add support for linear device-mapper devices.



On Wed, 2010-12-01 at 10:48 -0500, Chris Lumens wrote:
> > +    def __init__(self, name, format=None, size=None, dmUuid=None,
> > +                 exists=None, parents=None, sysfsPath=''):
> > +        """ Create a DMLinearDevice instance.
> > +
> > +            Arguments:
> > +
> > +                name -- the device name (generally a device node's basename)
> > +
> > +            Keyword Arguments:
> > +
> > +                size -- the device's size (units/format TBD)
> > +                dmUuid -- the device's device-mapper UUID
> > +                sysfsPath -- sysfs device path
> > +                format -- a DeviceFormat instance
> > +                parents -- a list of required Device instances
> > +                exists -- indicates whether this is an existing device
> > +        """
> > +        if not parents:
> > +            raise ValueError("DMLinearDevice requires a backing block device")
> > +
> > +        dmUuid = "ANACONDA-%s" % name
> > +
> > +        DMDevice.__init__(self, name, format=format, size=size,
> > +                          parents=parents, sysfsPath=sysfsPath,
> > +                          exists=exists, target="linear", dmUuid=dmUuid)
> 
> Do you really intend to override any dmUuid passed in to __init__ with
> the default later on like this?

For these devices, yes. However, we could set up the UUID in the
devicetree and pass it to the constructor instead. A little more
straightforward, probably. I'm working on a small set of follow-on
cleanup patches and will include the aforementioned.

Dave

> 
> Otherwise, this looks fine except for all the udev_settle but I suppose
> there's nothing we can do about that.
> 
> - Chris
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list



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