On Sun 12 Feb 2017 02:47:24 AM CET, Max Reitz <mre...@redhat.com> wrote:

> -#define BDRV_REQUEST_MAX_SECTORS MIN(SIZE_MAX >> BDRV_SECTOR_BITS, \
> -                                     INT_MAX >> BDRV_SECTOR_BITS)
> -#define BDRV_REQUEST_MAX_BYTES (BDRV_REQUEST_MAX_SECTORS << BDRV_SECTOR_BITS)
> +#define BDRV_REQUEST_MAX_BYTES      MIN(SIZE_MAX, INT_MAX)
> +#define BDRV_REQUEST_MAX_SECTORS    (BDRV_REQUEST_MAX_BYTES >> 
> BDRV_SECTOR_BITS)

I'm just pointing it out because I don't know if this can cause
problems, but this patch would make BDRV_REQUEST_MAX_BYTES not a
multiple of the sector size (INT_MAX is actually a prime number).

Berto

Reply via email to