All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: qemu block <qemu-block@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Clean Block Driver Shutdown
Date: Tue, 17 Oct 2017 12:33:33 +0200	[thread overview]
Message-ID: <8e2160db-338f-f1dc-7f5e-8faa3dce7090@kamp.de> (raw)

Hi,

I noticed that Qemu quits at several points with an exit() if the supplied parameters in the commandline are incorrect.
This at some stages happens after there have already been connections to storage backends established.
These connections are not cleanly shut down in this case. For posix file backends that doesn't matter, but for other
backends this leads to errors. E.g. iSCSI Targets log an aborted iSCSI connection due to tcp reset.

I wonder what is the best way to fix this. A simply call to bdrv_close_all() in an atexit handler seems to work.
But is this a good solution? Maybe register this handler only until the VM starts.
Or do we need an atexit handler in each block driver that requires a clean shutdown?

Thanks,
Peter

             reply	other threads:[~2017-10-17 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 10:33 Peter Lieven [this message]
2017-10-17 11:46 ` [Qemu-devel] [Qemu-block] Clean Block Driver Shutdown Kevin Wolf
2017-10-17 11:49   ` Peter Lieven
2017-10-20 10:08   ` Stefan Hajnoczi
2017-11-07 10:22     ` Markus Armbruster
2017-11-07 10:48       ` Peter Lieven
2017-11-07 11:02         ` Markus Armbruster
2017-11-07 11:09           ` Peter Lieven
2017-11-07 11:11         ` Kevin Wolf

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=8e2160db-338f-f1dc-7f5e-8faa3dce7090@kamp.de \
    --to=pl@kamp.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 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.