All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-5.0 v3 0/3] block: Fix blk->in_flight during blk_wait_while_drained()
@ 2020-04-07 12:12 Kevin Wolf
  2020-04-07 12:12 ` [PATCH for-5.0 v3 1/3] block-backend: Reorder flush/pdiscard function definitions Kevin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Kevin Wolf @ 2020-04-07 12:12 UTC (permalink / raw)
  To: qemu-block
  Cc: kwolf, vsementsov, s.reiter, qemu-devel, dietmar, stefanha,
	mreitz, t.lamprecht

This fixes deadlocks when draining a BlockBackend in an iothread that
receives new requests at the same time.

v3:
- Call blk_inc/dec_in_flight() in blk_prw() rather than inside the
  coroutines [Max]

v2:
- Rework the whole thing so that direct callers of blk_co_*() aren't
  broken after the series [Max]

Kevin Wolf (3):
  block-backend: Reorder flush/pdiscard function definitions
  block: Increase BB.in_flight for coroutine and sync interfaces
  block: Fix blk->in_flight during blk_wait_while_drained()

 include/sysemu/block-backend.h |   1 -
 block/block-backend.c          | 206 ++++++++++++++++++++-------------
 2 files changed, 128 insertions(+), 79 deletions(-)

-- 
2.20.1



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

end of thread, other threads:[~2020-04-07 17:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 12:12 [PATCH for-5.0 v3 0/3] block: Fix blk->in_flight during blk_wait_while_drained() Kevin Wolf
2020-04-07 12:12 ` [PATCH for-5.0 v3 1/3] block-backend: Reorder flush/pdiscard function definitions Kevin Wolf
2020-04-07 12:12 ` [PATCH for-5.0 v3 2/3] block: Increase BB.in_flight for coroutine and sync interfaces Kevin Wolf
2020-04-07 12:54   ` Max Reitz
2020-04-07 14:22   ` Vladimir Sementsov-Ogievskiy
2020-04-07 14:42     ` Kevin Wolf
2020-04-07 14:56       ` Vladimir Sementsov-Ogievskiy
2020-04-07 16:27         ` Kevin Wolf
2020-04-07 17:36           ` Vladimir Sementsov-Ogievskiy
2020-04-07 12:12 ` [PATCH for-5.0 v3 3/3] block: Fix blk->in_flight during blk_wait_while_drained() Kevin Wolf

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.