All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-5.0 v5 0/3] Fix some AIO context locking in jobs
@ 2020-04-07 11:56 Stefan Reiter
  2020-04-07 11:56 ` [PATCH for-5.0 v5 1/3] job: take each job's lock individually in job_txn_apply Stefan Reiter
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Stefan Reiter @ 2020-04-07 11:56 UTC (permalink / raw)
  To: qemu-devel, qemu-block
  Cc: kwolf, vsementsov, t.lamprecht, slp, mreitz, stefanha, jsnow,
	dietmar

Contains three seperate but related patches cleaning up and fixing some
issues regarding aio_context_acquire/aio_context_release for jobs. Mostly
affects blockjobs running for devices that have IO threads enabled AFAICT.


Changes from v4:
* Do job_ref/job_unref in job_txn_apply and job_exit since we need the job to
  survive the callback to access the potentially changed lock afterwards
* Reduce patch 2/3 to an assert, the context should already be acquired since
  it's a bdrv handler
* Collect R-by for 3/3

I've marked it 'for-5.0' this time, I think it would make sense to be
picked up together with Kevin's "block: Fix blk->in_flight during
blk_wait_while_drained()" series. With that series and these three patches
applied I can no longer reproduce any of the reported related crashes/hangs.


Changes from v3:
* commit_job appears to be unset in certain cases when replication_close is
  called, only access when necessary to avoid SIGSEGV

Missed this when shuffling around patches, sorry for noise with still-broken v3.

Changes from v2:
* reordered patch 1 to the end to not introduce temporary breakages
* added more fixes to job txn patch (should now pass the tests)

Changes from v1:
* fixed commit message for patch 1
* added patches 2 and 3


qemu: Stefan Reiter (3):
  job: take each job's lock individually in job_txn_apply
  replication: assert we own context before job_cancel_sync
  backup: don't acquire aio_context in backup_clean

 block/backup.c        |  4 ----
 block/replication.c   |  5 ++++-
 blockdev.c            |  9 ++++++++
 job-qmp.c             |  9 ++++++++
 job.c                 | 50 ++++++++++++++++++++++++++++++++++---------
 tests/test-blockjob.c |  2 ++
 6 files changed, 64 insertions(+), 15 deletions(-)

-- 
2.26.0



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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-07 11:56 [PATCH for-5.0 v5 0/3] Fix some AIO context locking in jobs Stefan Reiter
2020-04-07 11:56 ` [PATCH for-5.0 v5 1/3] job: take each job's lock individually in job_txn_apply Stefan Reiter
2020-04-07 13:26   ` Kevin Wolf
2020-04-07 11:56 ` [PATCH for-5.0 v5 2/3] replication: assert we own context before job_cancel_sync Stefan Reiter
2020-04-07 11:56 ` [PATCH for-5.0 v5 3/3] backup: don't acquire aio_context in backup_clean Stefan Reiter
2020-04-07 14:22 ` [PATCH for-5.0 v5 0/3] Fix some AIO context locking in jobs 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.