Am 13.07.2018 um 09:15 hat Peter Lieven geschrieben: > the min_sparse convert parameter can overflow (e.g. -S 1024G) > in the conversion from int64_t to int resulting in a negative > min_sparse parameter. Avoid this by limiting the valid parameters > to sane values. In fact anything exceeding the convert buffer size > is also pointless. While at it also forbid values that are non > multiple of 512 to avoid undesired behaviour. For instance, values > between 1 and 511 were legal, but resulted in full allocation. > > Cc: [email protected] > Signed-off-by: Peter Lieven <[email protected]> > --- > V1->V2: - use correct check for sval mod 512 == 0 > - use BDRV_SECTOR_SIZE macro instead of hardcoded 512
Thanks, applied to the block branch. Kevin
