qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] block: Add Error argument to bdrv_refresh_limits()
Date: Wed, 16 Jul 2014 12:07:06 -0600	[thread overview]
Message-ID: <53C6BF4A.6010309@redhat.com> (raw)
In-Reply-To: <1405525697-9378-2-git-send-email-kwolf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]

On 07/16/2014 09:48 AM, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block.c                   | 33 +++++++++++++++++++++++----------
>  block/iscsi.c             |  3 +--
>  block/qcow2.c             |  4 +---
>  block/qed.c               |  4 +---
>  block/raw-posix.c         |  4 +---
>  block/raw_bsd.c           |  3 +--
>  block/stream.c            |  2 +-
>  block/vmdk.c              |  4 +---
>  include/block/block.h     |  2 +-
>  include/block/block_int.h |  2 +-
>  10 files changed, 32 insertions(+), 29 deletions(-)
> 

>      /* Take some limits from the children as a default */
>      if (bs->file) {
> -        bdrv_refresh_limits(bs->file);
> +        bdrv_refresh_limits(bs->file, &local_err);
> +        if (local_err) {
> +            error_propagate(errp, local_err);
> +            return;
> +        }

Nice that you are no longer ignoring failure from the child.


> @@ -1154,7 +1167,7 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd)
>      bdrv_op_unblock(bs->backing_hd, BLOCK_OP_TYPE_COMMIT,
>                      bs->backing_blocker);
>  out:
> -    bdrv_refresh_limits(bs);
> +    bdrv_refresh_limits(bs, NULL);
>  }
>  
>  /*
> @@ -1778,7 +1791,7 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_state)
>                                                BDRV_O_CACHE_WB);
>      reopen_state->bs->read_only = !(reopen_state->flags & BDRV_O_RDWR);
>  
> -    bdrv_refresh_limits(reopen_state->bs);
> +    bdrv_refresh_limits(reopen_state->bs, NULL);

> +++ b/block/stream.c
> @@ -76,7 +76,7 @@ static void close_unused_images(BlockDriverState *top, BlockDriverState *base,
>          bdrv_unref(unused);
>      }
>  
> -    bdrv_refresh_limits(top);
> +    bdrv_refresh_limits(top, NULL);
>  }
>  

Should these three callers be concerned about failure?  If so, would
&error_abort be better than NULL?  But as for this patch, you are
preserving existing semantics, so you could save it for a later patch.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
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: 604 bytes --]

  reply	other threads:[~2014-07-16 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 15:48 [Qemu-devel] [PATCH for-2.1 0/2] raw-posix: Fail gracefully if no working alignment is found Kevin Wolf
2014-07-16 15:48 ` [Qemu-devel] [PATCH 1/2] block: Add Error argument to bdrv_refresh_limits() Kevin Wolf
2014-07-16 18:07   ` Eric Blake [this message]
2014-07-16 19:08     ` Kevin Wolf
2014-07-16 15:48 ` [Qemu-devel] [PATCH 2/2] raw-posix: Fail gracefully if no working alignment is found Kevin Wolf
2014-07-16 18:08   ` Eric Blake
2014-07-18 12:22 ` [Qemu-devel] [PATCH for-2.1 0/2] " Stefan Hajnoczi

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=53C6BF4A.6010309@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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).