[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] block: Swap request limit definiti
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] block: Swap request limit definitions |
Date: |
Mon, 13 Feb 2017 13:52:46 +0800 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Sun, 02/12 02:47, Max Reitz wrote:
> Defining BDRV_REQUEST_MAX_SECTORS based on BDRV_REQUEST_MAX_BYTES is
> simpler than the other way around.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> include/block/block.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/include/block/block.h b/include/block/block.h
> index 4e81f2069b..101ef33f6b 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h
> @@ -114,9 +114,8 @@ typedef struct HDGeometry {
> #define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS)
> #define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1)
>
> -#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)
>
> /*
> * Allocation status flags
> --
> 2.11.0
>
>
Reviewed-by: Fam Zheng <address@hidden>
- [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 <=
- 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, 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
- 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