----- 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.
- 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