qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: jsnow@redhat.com, kwolf@redhat.com, qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH 0/4] block: Avoid copy-on-read assertions
Date: Sat, 30 Sep 2017 14:53:41 -0500	[thread overview]
Message-ID: <20170930195345.23338-1-eblake@redhat.com> (raw)

During my quest to switch block status to be byte-based, John
forced me to evaluate whether we have a situation during
copy-on-read where we could exceed BDRV_REQUEST_MAX_BYTES [1].
Sure enough, we have a number of pre-existing bugs in the
copy-on-read code.  Fix those (patch 3), along with adding a
test (patch 4, but needs a couple of additions in patch 1 and
2 to make the test even possible).  Swapping patch 3 and 4
demonstrates that the test indeed exposes flaws.

[1] https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg07286.html

Eric Blake (4):
  qemu-io: Add -C for opening with copy-on-read
  block: Add blkdebug hook for copy-on-read
  block: Perform copy-on-read in loop
  iotests: Add test 197 for covering copy-on-read

 qapi/block-core.json             |   5 +-
 block/io.c                       | 118 +++++++++++++++++++++++++++------------
 qemu-io.c                        |  15 ++++-
 tests/qemu-iotests/common.filter |   1 +
 tests/qemu-iotests/197           |  93 ++++++++++++++++++++++++++++++
 tests/qemu-iotests/197.out       |  24 ++++++++
 tests/qemu-iotests/group         |   1 +
 7 files changed, 216 insertions(+), 41 deletions(-)
 create mode 100755 tests/qemu-iotests/197
 create mode 100644 tests/qemu-iotests/197.out

-- 
2.13.6

             reply	other threads:[~2017-09-30 19:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30 19:53 Eric Blake [this message]
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   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-10-02 14:52   ` [Qemu-devel] " 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=20170930195345.23338-1-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@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).