From: Fam Zheng <famz@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: Swap request limit definitions
Date: Mon, 13 Feb 2017 13:52:46 +0800 [thread overview]
Message-ID: <20170213055246.GC15004@lemon.lan> (raw)
In-Reply-To: <20170212014724.10618-1-mreitz@redhat.com>
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 <mreitz@redhat.com>
> ---
> 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 <famz@redhat.com>
next prev parent reply other threads:[~2017-02-13 5:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-12 1:47 [Qemu-devel] [PATCH] block: Swap request limit definitions Max Reitz
2017-02-13 5:52 ` Fam Zheng [this message]
2017-02-13 8:39 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2017-02-13 17:13 ` Max Reitz
2017-02-14 9:52 ` Alberto Garcia
2017-02-15 13:42 ` Max Reitz
2017-02-15 16:44 ` Kevin Wolf
2017-02-15 16:48 ` Max Reitz
2017-02-15 17:10 ` Kevin Wolf
2017-02-15 17:15 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170213055246.GC15004@lemon.lan \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).