qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Jeff Cody <jcody@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] block: remove QED .bdrv_make_empty implementation
Date: Tue, 28 Jan 2014 01:35:45 +0100	[thread overview]
Message-ID: <20140128003545.GB15867@irqsave.net> (raw)
In-Reply-To: <376a25d5e5f1fa1b1c68b60f749138b3b018ec9d.1390856648.git.jcody@redhat.com>

Le Monday 27 Jan 2014 à 16:09:12 (-0500), Jeff Cody a écrit :
> The QED .bdrv_make_empty() implementation does nothing but return
> -ENOTSUP, which causes problems in bdrv_commit().  Since the function
> stub exists for QED, it is called, which then always returns an error.
> 
> The proper way to not support an optional driver function stub is to
> just not implement it, so let's remove the stub.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  block/qed.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/block/qed.c b/block/qed.c
> index 694e6e2..b9ca7ac 100644
> --- a/block/qed.c
> +++ b/block/qed.c
> @@ -731,11 +731,6 @@ static int64_t coroutine_fn bdrv_qed_co_get_block_status(BlockDriverState *bs,
>      return cb.status;
>  }
>  
> -static int bdrv_qed_make_empty(BlockDriverState *bs)
> -{
> -    return -ENOTSUP;
> -}
> -
>  static BDRVQEDState *acb_to_s(QEDAIOCB *acb)
>  {
>      return acb->common.bs->opaque;
> @@ -1617,7 +1612,6 @@ static BlockDriver bdrv_qed = {
>      .bdrv_create              = bdrv_qed_create,
>      .bdrv_has_zero_init       = bdrv_has_zero_init_1,
>      .bdrv_co_get_block_status = bdrv_qed_co_get_block_status,
> -    .bdrv_make_empty          = bdrv_qed_make_empty,
>      .bdrv_aio_readv           = bdrv_qed_aio_readv,
>      .bdrv_aio_writev          = bdrv_qed_aio_writev,
>      .bdrv_co_write_zeroes     = bdrv_qed_co_write_zeroes,
> -- 
> 1.8.3.1
> 
> 
Reviewed-by: Benoit Canet <benoit@irqsave.net>

  reply	other threads:[~2014-01-28  0:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27 21:09 [Qemu-devel] [PATCH 0/2] Remove unsupported / empty .bdrv_make_empty functions Jeff Cody
2014-01-27 21:09 ` [Qemu-devel] [PATCH 1/2] block: remove QED .bdrv_make_empty implementation Jeff Cody
2014-01-28  0:35   ` Benoît Canet [this message]
2014-01-27 21:09 ` [Qemu-devel] [PATCH 2/2] block: remove qcow2 " Jeff Cody
2014-01-28  0:36   ` Benoît Canet
2014-01-27 21:13 ` [Qemu-devel] [PATCH 0/2] Remove unsupported / empty .bdrv_make_empty functions Eric Blake
2014-01-28  9:21 ` Kevin Wolf

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=20140128003545.GB15867@irqsave.net \
    --to=benoit.canet@irqsave.net \
    --cc=jcody@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).