From: Stefan Hajnoczi <stefanha@gmail.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-block@nongnu.org, kwolf@redhat.com, qemu-devel@nongnu.org,
dgilbert@redhat.com, stefanha@redhat.com, pbonzini@redhat.com,
pjp@redhat.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 0/4] IDE: Do not flush empty drives
Date: Wed, 9 Aug 2017 16:53:55 +0100 [thread overview]
Message-ID: <20170809155355.GA8330@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170808175711.12203-1-jsnow@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]
On Tue, Aug 08, 2017 at 01:57:07PM -0400, John Snow wrote:
> Patches one and two here are a 2.10 bandaid that avoids a crash.
> Patches three and four are a more comprehensive fix as written by
> Kevin in another discussion and are being posted here for the sake
> of a discussion.
>
> Patch three as written causes hangs in iotests 20, 39, 97, 98, 129,
> 153, 176, and 185. 124 actually segfaults.
>
> For the purposes of 2.10, we'll likely just want patches 1 and 2
> for now.
>
> The problem in a nutshell: incrementing the in-flight counter of the
> BDS from the BB layer assumes that every BB always has a BDS. That's
> not true; and some devices like IDE have not in the past checked to
> see if a given blk_ operation WOULD fail.
>
> This culminates in a new regression where issuing a cache flush to a
> CDROM (which is, for some reason, specification valid) will crash QEMU
> due to a null dereference when attempting to atomically increment that
> backend's in-flight counter.
>
> John Snow (1):
> IDE: Do not flush empty CDROM drives
>
> Kevin Wolf (3):
> IDE: test flush on empty CDROM
> block-backend: shift in-flight counter to BB from BDS
> block-backend: test flush op on empty backend
>
> block.c | 2 +-
> block/block-backend.c | 40 +++++++++++++++++++++++++-----
> hw/ide/core.c | 11 +++++---
> tests/Makefile.include | 2 ++
> tests/ide-test.c | 19 ++++++++++++++
> tests/test-block-backend.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 125 insertions(+), 11 deletions(-)
> create mode 100644 tests/test-block-backend.c
John will be offline until Monday. I'm sending a new patch series for
2.10 with updated versions of Patch 1 & 2.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
prev parent reply other threads:[~2017-08-09 15:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 17:57 [Qemu-devel] [PATCH 0/4] IDE: Do not flush empty drives John Snow
2017-08-08 17:57 ` [Qemu-devel] [PATCH 1/4] IDE: Do not flush empty CDROM drives John Snow
2017-08-08 19:19 ` Eric Blake
2017-08-09 9:34 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-08-08 17:57 ` [Qemu-devel] [PATCH 2/4] IDE: test flush on empty CDROM John Snow
2017-08-08 19:20 ` Eric Blake
2017-08-08 19:32 ` John Snow
2017-08-09 9:35 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-08-08 17:57 ` [Qemu-devel] [PATCH 3/4] block-backend: shift in-flight counter to BB from BDS John Snow
2017-08-08 18:34 ` Paolo Bonzini
2017-08-08 18:48 ` John Snow
2017-08-09 16:01 ` Kevin Wolf
2017-08-08 17:57 ` [Qemu-devel] [PATCH 4/4] block-backend: test flush op on empty backend John Snow
2017-08-09 16:02 ` Kevin Wolf
2017-08-09 15:53 ` Stefan Hajnoczi [this message]
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=20170809155355.GA8330@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=dgilbert@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pjp@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 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).