[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#913431: Debian Installer Bullseye RC 2 release



Le 23/03/2023 à 11:41, Vincent Danjean a écrit :
   Hi,

Le 23/03/2023 à 10:06, Emanuele Rocca a écrit :
Hi Vincent,

On 2021-06-20 10:54, Vincent Danjean wrote:
Would someone give a feedback to the (old) patch proposed
in #913431 in order to be able to also use power-of-two units
in the Debian Installer?

It took a while, sorry about that. :)

There is (now) a function in partman-base called valid_human [1] which
checks if the partition size specified by the user is valid. Probably
when you first wrote the patch this wasn't the case.

That function needs to be modified as well to accept GiB and friends.

   This would be very easy (just add a 'i?' when it can be added).
Before rewriting the patch, I would like to be sure there is no
big flaw. In particular, to handle power-of-two units, I'm using
the 'expr' command, as bash arithmetic uses only limited integers
whereas expr uses gmp:
$ echo $((40 * 1000000000 * 1000000000 * 1000 + 1))
7458848197692096513
$ expr 40 '*' 1000000000 '*' 1000000000 '*' 1000 + 1
40000000000000000000001

Can you confirm me that using 'expr' in the installer context is ok?

After a quick check with the 11.5.0 installer (I already have it
in a VM), expr is available in the installer, but it is not using
gmp. So, in the installer context:
$ expr 40 '*' 1000000000 '*' 1000000000 '*' 1000 + 1
7458848197692096513

So it means that, in the installer context, with bash or expr, there would
be a limit of about a few Exa bytes when using power-of-two units
(nothing would change for decimal units)
The limit would be exactly 9223372036854775807 bytes, that is about
9,22 EB or 7,99 EiB.

Would this be a acceptable limit or not ? I'm not sure as I already
manage storages with a few PiB nowadays.

  Regards
    Vincent


   Regards
     Vincent

[1] https://salsa.debian.org/installer-team/partman-base/-/blob/master/lib/base.sh#L373



Reply to: