[rhinstaller/blivet/pulls/195 master] Allow aligning free regions to disk grainSize (#1244671)

bcl installerbot-noreply at redhat.com
Wed Aug 5 18:55:28 UTC 2015


> @@ -439,7 +441,12 @@ def getFreeRegions(disks):
>      free = []
>      for disk in disks:
>          for f in disk.format.partedDisk.getFreeSpaceRegions():
> -            if f.length >= disk.format.alignment.grainSize:
> +            grain_size = disk.format.alignment.grainSize
> +            if f.length >= grain_size:
> +                if align:
> +                    log.debug("lenght of free region aligned from %d to %d",
> +                              f.length, f.length - (f.length % grain_size))
> +                    f.length -= (f.length % grain_size)

I'd calculate the new length once, just to make sure future changes don't miss one of them.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/195#discussion_r36340050


More information about the anaconda-patches mailing list