mbox series

[0/3] qsd: Add --daemonize; and add job quit tests

Message ID 20211222114153.67721-1-hreitz@redhat.com (mailing list archive)
Headers show
Series qsd: Add --daemonize; and add job quit tests | expand

Message

Hanna Czenczek Dec. 22, 2021, 11:41 a.m. UTC
Hi,

This series began as an attempt to write a reproducer for the following
case:

  You have a mirror job in READY state with a target that’s slow.  There
  is still a lot of data to be written (because of active I/O in the
  guest).  You quit qemu, and you expect quitting to be reasonably
  quick.
  Old qemu used to still complete the job, which may take forever, new
  qemu cancels the job, which is better.

That’s basically patch 3 in this series, which tests this behavior once
for mirror and once for active commit.

Problem is, how to simulate a slow target for this; if you use a
throttle node in the same qemu process that you’re trying to test, qemu
will just drain it when quitting, and so the supposedly slow target
becomes very fast.

So we need an external instance, and what better to use but the storage
daemon.  I found that it would be nice if for this it had a --daemonize
option (well, it would be nice in general), and so the first two patches
implement that.


Hanna Reitz (3):
  qsd: Add pre-init argument parsing pass
  qsd: Add --daemonize
  iotests/185: Add post-READY quit tests

 docs/tools/qemu-storage-daemon.rst   |   7 +
 storage-daemon/qemu-storage-daemon.c | 188 +++++++++++++++++++++++++-
 tests/qemu-iotests/185               | 190 ++++++++++++++++++++++++++-
 tests/qemu-iotests/185.out           |  48 +++++++
 4 files changed, 430 insertions(+), 3 deletions(-)