All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com,
	Fam Zheng <famz@redhat.com>,
	qemu-block@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] block: Add blkdebug hook for copy-on-read
Date: Sat, 30 Sep 2017 23:00:25 -0400	[thread overview]
Message-ID: <20171001030025.GE4313@localhost.localdomain> (raw)
In-Reply-To: <20170930195345.23338-3-eblake@redhat.com>

On Sat, Sep 30, 2017 at 02:53:43PM -0500, Eric Blake wrote:
> Make it possible to inject errors on writes performed during a
> read operation due to copy-on-read semantics.
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>


Reviewed-by: Jeff Cody <jcody@redhat.com>


> ---
>  qapi/block-core.json | 5 ++++-
>  block/io.c           | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 750bb0c77c..ab96e348e6 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -2538,6 +2538,8 @@
>  #
>  # @l1_shrink_free_l2_clusters: discard the l2 tables. (since 2.11)
>  #
> +# @cor_write: a write due to copy-on-read (since 2.11)
> +#
>  # Since: 2.9
>  ##
>  { 'enum': 'BlkdebugEvent', 'prefix': 'BLKDBG',
> @@ -2555,7 +2557,8 @@
>              'flush_to_disk', 'pwritev_rmw_head', 'pwritev_rmw_after_head',
>              'pwritev_rmw_tail', 'pwritev_rmw_after_tail', 'pwritev',
>              'pwritev_zero', 'pwritev_done', 'empty_image_prepare',
> -            'l1_shrink_write_table', 'l1_shrink_free_l2_clusters' ] }
> +            'l1_shrink_write_table', 'l1_shrink_free_l2_clusters',
> +            'cor_write'] }
> 
>  ##
>  # @BlkdebugInjectErrorOptions:
> diff --git a/block/io.c b/block/io.c
> index d633b0f851..97d9fa655d 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -983,6 +983,7 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child,
>          goto err;
>      }
> 
> +    bdrv_debug_event(bs, BLKDBG_COR_WRITE);
>      if (drv->bdrv_co_pwrite_zeroes &&
>          buffer_is_zero(bounce_buffer, iov.iov_len)) {
>          /* FIXME: Should we (perhaps conditionally) be setting
> -- 
> 2.13.6
> 
> 

  reply	other threads:[~2017-10-01  3:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30 19:53 [Qemu-devel] [PATCH 0/4] block: Avoid copy-on-read assertions Eric Blake
2017-09-30 19:53 ` [Qemu-devel] [PATCH 1/4] qemu-io: Add -C for opening with copy-on-read Eric Blake
2017-10-01  3:00   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-10-02 14:52   ` [Qemu-devel] " Kevin Wolf
2017-10-02 18:03   ` John Snow
2017-10-02 19:28   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-09-30 19:53 ` [Qemu-devel] [PATCH 2/4] block: Add blkdebug hook for copy-on-read Eric Blake
2017-10-01  3:00   ` Jeff Cody [this message]
2017-10-02 14:52   ` Kevin Wolf
2017-10-02 18:08   ` John Snow
2017-10-02 19:28   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-09-30 19:53 ` [Qemu-devel] [PATCH 3/4] block: Perform copy-on-read in loop Eric Blake
2017-09-30 20:11 ` [Qemu-devel] [PATCH 4/4] iotests: Add test 197 for covering copy-on-read Eric Blake
2017-10-01  3:03   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-10-02 13:55     ` Eric Blake
2017-10-02 14:04       ` Jeff Cody
2017-09-30 21:19 ` [Qemu-devel] [PATCH 0/4] block: Avoid copy-on-read assertions no-reply
2017-09-30 22:05   ` Eric Blake
2017-10-02 14:50     ` Kevin Wolf
2017-10-02 15:10       ` Eric Blake

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=20171001030025.GE4313@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.