[PATCH 1/5] Don't prevent grow actions on devices with no max size.

David Lehman dlehman at redhat.com
Thu Mar 20 22:29:59 UTC 2014


On Thu, 2014-03-20 at 16:36 -0400, Anne Mulhern wrote:
> 
> 
> 
> ----- Original Message -----
> > From: "David Lehman" <dlehman at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Thursday, March 20, 2014 1:06:36 PM
> > Subject: [PATCH 1/5] Don't prevent grow actions on devices with no max size.
> > 
> > ---
> >  blivet/deviceaction.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
> > index cfb8022..d9a6a87 100644
> > --- a/blivet/deviceaction.py
> > +++ b/blivet/deviceaction.py
> > @@ -381,7 +381,7 @@ class ActionResizeDevice(DeviceAction):
> >          if newsize < device.minSize:
> >              raise ValueError("new size is too small")
> >  
> > -        if newsize > device.maxSize:
> > +        if device.maxSize and newsize > device.maxSize:
> >              raise ValueError("new size is too large")
> >  
> >          DeviceAction.__init__(self, device)
> > --
> > 1.8.5.3
> > 
> > _______________________________________________
> > anaconda-patches mailing list
> > anaconda-patches at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> > 
> 
> This should work with the current situation where 0 is a special value that means "mo max size".
> 
> What does "no max size" mean?

It means no known max size. There are no device-type-imposed size limits
in blivet at all. There are probably some limits, but I don't know what
they are.

> 
> Would it be useful to have a special Size value to represent that concept, rather than Size(0), which also represents 0?

I think it would be useful, but I haven't thought through the details.

> 
> - mulhern
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches




More information about the anaconda-patches mailing list