----- Original Message -----
From: "Anne Mulhern" <amulhern(a)redhat.com>
To: "anaconda patch review" <anaconda-patches(a)lists.fedorahosted.org>
Sent: Saturday, December 21, 2013 6:35:18 PM
Subject: Re: [PATCH 6/6] Convert everything to use Size.
----- Original Message -----
> From: "Brian C. Lane" <bcl(a)redhat.com>
> To: anaconda-patches(a)lists.fedorahosted.org
> Sent: Friday, December 20, 2013 7:30:05 PM
> Subject: Re: [PATCH 6/6] Convert everything to use Size.
>
> On Fri, Dec 20, 2013 at 11:59:59AM -0600, David Lehman wrote:
> > Size essentially stores sizes in bytes and provides methods for
> > conversion between various units.
> >
> > All sizes originating from within blivet are based on binary prefixes
> > except where required to interface with other tools (see ntfsresize).
> > ---
>
> I really like how this looks. Makes things much more readable and should
> eliminate all those pesky float rounding problems.
>
> comments:
>
> 1. There are several places where spec is used instead of en_spec for
> constants.
>
> 2. inconsistent use of spaces between the size and the units, I think
> they are more readable with spaces.
>
> 3. getPossiblePhysicalExtents dropped floor from the args. It is still
> used in the function.
>
> 4. In FileDevice._create buf is undefined and zero unused. Or we could
> just use dd for this like we do in wipe.
>
> That's all I spotted. Now I need a nap :)
>
I think that where self._size is set in StorageDevice constructor it should
be made a Size
or already be a Size.
MD_CHUNK_SIZE is no longer used anywhere, it should be removed instead of
changed.
self.chunkSize is set in MDRaidArrayDevice, instead.
In raid.py I defined this integer rounding up function, div_up. Maybe it
would be
better in Size, somewhere?
Probably all the raid methods that have to do with size should be
reviewed...some of
the mdraid tests are failing.
I looked at this a little more today, and it looks like mdraid.get_raid_superblock_size
has changed its return type from MiB to Size, i.e., bytes. This is good, but its clients
are now all going to behave differently as well and should probably get a look.
- mulhern
- mulhern
> --
> Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA
> (PST8PDT)
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches