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

Re: [PATCH 2/4] Add support for detecting lvm vorigin snapshot volumes. (#633038)



> @@ -2133,13 +2152,8 @@ class LVMVolumeGroupDevice(DMDevice):
>          # TODO: just ask lvm if isModified returns False
>  
>          # total the sizes of any LVs
> -        used = 0
> -        size = self.size
> -        log.debug("%s size is %dMB" % (self.name, size))
> -        for lv in self.lvs:
> -            log.debug("lv %s uses %dMB" % (lv.name, lv.vgSpaceUsed))
> -            used += self.align(lv.vgSpaceUsed, roundup=True)
> -
> +        log.debug("%s size is %dMB" % (self.name, self.size))
> +        used = sum(lv.size for lv in self.lvs) + self.snapshotSpace

Don't you want brackets around the list comprehension here?

- Chris


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