[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] block: Swap request limit definitions
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH] block: Swap request limit definitions |
Date: |
Wed, 15 Feb 2017 14:42:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 14.02.2017 10:52, Alberto Garcia wrote:
> On Mon 13 Feb 2017 06:13:38 PM CET, Max Reitz 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).
>>
>> Very good point. I don't think this could be an issue, though. For one
>> thing, the use of BDRV_REQUEST_MAX_BYTES is very limited.
>
> Ok, but then I wonder what's the benefit of increasing
> BDRV_REQUEST_MAX_BYTES.
The benefit is that the definition looks cleaner.
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH] block: Swap request limit definitions, Max Reitz, 2017/02/11
- Re: [Qemu-block] [Qemu-devel] [PATCH] block: Swap request limit definitions, Fam Zheng, 2017/02/13
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions, Alberto Garcia, 2017/02/13
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions, Max Reitz, 2017/02/13
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions, Alberto Garcia, 2017/02/14
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions,
Max Reitz <=
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions, Kevin Wolf, 2017/02/15
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions, Max Reitz, 2017/02/15
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions, Kevin Wolf, 2017/02/15
- Re: [Qemu-block] [PATCH] block: Swap request limit definitions, Max Reitz, 2017/02/15