Re: [PATCH v2 4/4] utils: Deprecate inexact fractional suffix sizes

2021-02-24 Thread Eric Blake
On 2/23/21 11:20 AM, Daniel P. Berrangé wrote: > On Thu, Feb 11, 2021 at 02:44:38PM -0600, Eric Blake wrote: >> The value '1.1k' is inexact; 1126.4 bytes is not possible, so we >> happen to truncate it to 1126. Our use of fractional sizes is >> intended for convenience, but when a user specifies

Re: [PATCH v2 4/4] utils: Deprecate inexact fractional suffix sizes

2021-02-23 Thread Daniel P . Berrangé
On Thu, Feb 11, 2021 at 02:44:38PM -0600, Eric Blake wrote: > The value '1.1k' is inexact; 1126.4 bytes is not possible, so we > happen to truncate it to 1126. Our use of fractional sizes is > intended for convenience, but when a user specifies a fraction that is > not a clean translation to

[PATCH v2 4/4] utils: Deprecate inexact fractional suffix sizes

2021-02-11 Thread Eric Blake
The value '1.1k' is inexact; 1126.4 bytes is not possible, so we happen to truncate it to 1126. Our use of fractional sizes is intended for convenience, but when a user specifies a fraction that is not a clean translation to binary, truncating/rounding behind their backs can cause confusion.