All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] block: fix blk_aio_*() segfault when blk->root == NULL
@ 2018-02-08 17:18 Stefan Hajnoczi
  2018-02-08 17:18 ` [Qemu-devel] [PATCH 1/3] block: add BlockBackend->in_flight counter Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Stefan Hajnoczi @ 2018-02-08 17:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, John Snow, mark.kanda, Stefan Hajnoczi

Using bdrv_inc_in_flight(blk_bs(blk)) doesn't work since BlockBackend->root may
be NULL.

This patch series solves the issue by adding an BlockBackend->in_flight counter
so requests can be tracked even when there is no BlockDriverState.

This should fix the IDE and virtio-blk segfaults that have been encountered
when there is no BlockDriverState.

The patch is based on work by Kevin Wolf.

Kevin Wolf (1):
  block: test blk_aio_flush() with blk->root == NULL

Stefan Hajnoczi (2):
  block: add BlockBackend->in_flight counter
  Revert "IDE: Do not flush empty CDROM drives"

 tests/Makefile.include     |  2 ++
 block.c                    |  2 +-
 block/block-backend.c      | 59 +++++++++++++++++++++++++++++----
 hw/ide/core.c              | 10 +-----
 tests/test-block-backend.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 138 insertions(+), 17 deletions(-)
 create mode 100644 tests/test-block-backend.c

-- 
2.14.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-02-12 14:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 17:18 [Qemu-devel] [PATCH 0/3] block: fix blk_aio_*() segfault when blk->root == NULL Stefan Hajnoczi
2018-02-08 17:18 ` [Qemu-devel] [PATCH 1/3] block: add BlockBackend->in_flight counter Stefan Hajnoczi
2018-02-09 15:20   ` Eric Blake
2018-02-09 16:28   ` Paolo Bonzini
2018-02-09 17:23     ` Kevin Wolf
2018-02-09 17:26       ` Paolo Bonzini
2018-02-12 14:08         ` Stefan Hajnoczi
2018-02-08 17:18 ` [Qemu-devel] [PATCH 2/3] block: test blk_aio_flush() with blk->root == NULL Stefan Hajnoczi
2018-02-09 15:23   ` Eric Blake
2018-02-12 14:10     ` Stefan Hajnoczi
2018-02-08 17:18 ` [Qemu-devel] [PATCH 3/3] Revert "IDE: Do not flush empty CDROM drives" Stefan Hajnoczi
2018-02-09 15:27   ` Eric Blake
2018-02-09 15:34 ` [Qemu-devel] [PATCH 0/3] block: fix blk_aio_*() segfault when blk->root == NULL Eric Blake

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.