From: Eric Blake <eblake@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, stefanha@redhat.com,
qemu-devel@nongnu.org, anthony@codemonkey.ws,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 11/12] block/get_block_status: avoid redundant callouts on raw devices
Date: Fri, 13 Sep 2013 12:28:29 -0600 [thread overview]
Message-ID: <5233594D.70906@redhat.com> (raw)
In-Reply-To: <1379067909-22984-12-git-send-email-pl@kamp.de>
[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]
On 09/13/2013 04:25 AM, Peter Lieven wrote:
> if a raw device like an iscsi target or host device is used
> the current implementation makes a second call out to get
> the block status of bs->file. however, the raw driver already
> has called bdrv_get_block_status on bs->file.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> block.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/block.c b/block.c
> index cf9db62..282943b 100644
> --- a/block.c
> +++ b/block.c
> @@ -3167,7 +3167,8 @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs,
>
> if (bs->file &&
> (ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) &&
> - (ret & BDRV_BLOCK_OFFSET_VALID)) {
> + (ret & BDRV_BLOCK_OFFSET_VALID) &&
> + strcmp(bs->drv->format_name, "raw")) {
> ret2 = bdrv_co_get_block_status(bs->file, ret >> BDRV_SECTOR_BITS,
> *pnum, pnum);
> if (ret2 >= 0) {
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-09-13 18:28 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 10:24 [Qemu-devel] [PATCH 00/12] block: logical block provisioning enhancements Peter Lieven
2013-09-13 10:24 ` [Qemu-devel] [PATCH 01/12] block: make BdrvRequestFlags public Peter Lieven
2013-09-13 16:29 ` Eric Blake
2013-09-13 10:24 ` [Qemu-devel] [PATCH 02/12] block: add flags to bdrv_*_write_zeroes Peter Lieven
2013-09-13 16:58 ` Eric Blake
2013-09-13 10:25 ` [Qemu-devel] [PATCH 03/12] block: introduce BDRV_REQ_MAY_UNMAP in bdrv_co_write_zeroes Peter Lieven
2013-09-13 18:07 ` Eric Blake
2013-09-13 10:25 ` [Qemu-devel] [PATCH 04/12] iscsi: add .bdrv_co_write_zeroes Peter Lieven
2013-09-13 18:10 ` Eric Blake
2013-09-13 10:25 ` [Qemu-devel] [PATCH 05/12] block: add logical block provisioning information to BlockDriverInfo Peter Lieven
2013-09-13 10:34 ` Paolo Bonzini
2013-09-13 10:44 ` Peter Lieven
2013-09-13 11:45 ` Paolo Bonzini
2013-09-13 12:22 ` Peter Lieven
2013-09-13 12:58 ` Paolo Bonzini
2013-09-16 11:30 ` Peter Lieven
2013-09-16 11:37 ` Paolo Bonzini
2013-09-13 10:25 ` [Qemu-devel] [PATCH 06/12] iscsi: add .bdrv_get_info Peter Lieven
2013-09-13 18:19 ` Eric Blake
2013-09-13 10:25 ` [Qemu-devel] [PATCH 07/12] block: introduce bdrv_zeroize Peter Lieven
2013-09-13 10:47 ` Peter Lieven
2013-09-13 18:23 ` Eric Blake
2013-09-13 10:25 ` [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert Peter Lieven
2013-09-13 10:36 ` Paolo Bonzini
2013-09-13 10:46 ` Peter Lieven
2013-09-13 11:35 ` Paolo Bonzini
2013-09-13 18:25 ` Eric Blake
2013-09-13 19:48 ` Peter Lieven
2013-09-13 19:52 ` Eric Blake
2013-09-16 11:01 ` Paolo Bonzini
2013-09-13 10:25 ` [Qemu-devel] [PATCH 09/12] block/get_block_status: set *pnum = 0 on error Peter Lieven
2013-09-13 18:26 ` Eric Blake
2013-09-13 10:25 ` [Qemu-devel] [PATCH 10/12] block/get_block_status: avoid segfault if there is no backing_hd Peter Lieven
2013-09-13 18:26 ` Eric Blake
2013-09-13 10:25 ` [Qemu-devel] [PATCH 11/12] block/get_block_status: avoid redundant callouts on raw devices Peter Lieven
2013-09-13 18:28 ` Eric Blake [this message]
2013-09-13 10:25 ` [Qemu-devel] [PATCH 12/12] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks Peter Lieven
2013-09-13 13:53 ` Eric Blake
2013-09-16 5:47 ` Peter Lieven
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=5233594D.70906@redhat.com \
--to=eblake@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@redhat.com \
/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).