[blivet:master 1/2] Further abstract loopbackedtestcase on block_size.

Vratislav Podzimek vpodzime at redhat.com
Thu Oct 2 07:35:15 UTC 2014


On Wed, 2014-10-01 at 14:16 -0400, Anne Mulhern wrote:
> 
> 
> 
> ----- Original Message -----
> > From: "David Lehman" <dlehman at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Wednesday, October 1, 2014 12:55:49 PM
> > Subject: Re: [blivet:master 1/2] Further abstract loopbackedtestcase on	block_size.
> > 
> > On 10/01/2014 10:49 AM, Anne Mulhern wrote:
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > >> From: "Vratislav Podzimek" <vpodzime at redhat.com>
> > >> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> > >> Sent: Wednesday, October 1, 2014 10:05:38 AM
> > >> Subject: Re: [blivet:master 1/2] Further abstract loopbackedtestcase on
> > >> 	block_size.
> > >>
> > >> On Wed, 2014-10-01 at 09:46 -0400, Anne Mulhern wrote:
> > >>>
> > >>>
> > >>>
> > >>> ----- Original Message -----
> > >>>> From: "Vratislav Podzimek" <vpodzime at redhat.com>
> > >>>> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> > >>>> Sent: Wednesday, October 1, 2014 5:47:46 AM
> > >>>> Subject: Re: [blivet:master 1/2] Further abstract loopbackedtestcase on
> > >>>> 	block_size.
> > >>>>
> > >>>> On Tue, 2014-09-30 at 09:02 -0400, mulhern wrote:
> > >>>
> > >>> <-- SNIP -->
> > >>>
> > >>>>> @@ -67,33 +69,38 @@ def getFreeLoopDev():
> > >>>>>   @unittest.skipUnless(os.geteuid() == 0, "requires root privileges")
> > >>>>>   class LoopBackedTestCase(unittest.TestCase):
> > >>>>>
> > >>>>> -    DEFAULT_STORE_SIZE = 102400
> > >>>>> +    DEFAULT_BLOCK_SIZE = Size(1024)
> > >>>> I think 'Size("1 KiB")' would be nicer here.
> > >>>>
> > >>>
> > >>> I think so, too.
> > >>>
> > >>> Can we think about humanReadable() one last time? By default, it displays
> > >>> "1 KiB" as "1024 B".
> > >>> I would prefer "1 KiB" and I think most people would.
> > >>>
> > >>> Trickier is:
> > >>>
> > >>> Which is better "1044 B" or "1.02 KiB"?
> > >>>
> > >>> What about "9.99 KiB" vs. "10229 B"?
> > >> I like the old rule that less than 10 of something means that users will
> > >> probably care about small differences, more than 10 means less than 0.01
> > >> is not that important difference. With B and KiB it gets a bit weird,
> > >> but we hardly ever show such values. And if we really encounter
> > >> something that is smaller than 10 KiB I think it is okay to show the
> > >> number of bytes.
> > >>
> > >> --
> > >> Vratislav Podzimek
> > >>
> > >> Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
> > >>
> > >> _______________________________________________
> > >> anaconda-patches mailing list
> > >> anaconda-patches at lists.fedorahosted.org
> > >> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> > >>
> > >
> > > B and KiBs behave the same as anything else, really.
> > >
> > > I can rephrase as:
> > >
> > > Which is better "1044 Kib" or "1.02 MiB",
> > > "1 GiB" or "1024 Mib",
> > > "9.99 MiB" or "10229 KiB"?
> > >
> > > Does putting the values in larger units make any difference?
> > 
> > I prefer the smaller number of digits (larger unit) in every case. I've
> > found the current behavior odd. I draw the line at one of the larger
> > unit, however -- I prefer "768 MiB" to  "0.75 GiB".
> > 
> 
> That behavior is easy to get...set min_value default to 1 instead of 10 as
> it is now.
Okay, let's go with this change. People will let us know if they
like/dislike it, I guess. Still it seems a bit weird to me that with a 2
TiB disk, we would show them e.g. "1.06 TiB" where that ".06" is
actually 60 GiB, a size of my SSD in my laptop, though.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list