qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4] Stop VM on ENOSPC error.
Date: Tue, 20 Jan 2009 17:31:59 +0200	[thread overview]
Message-ID: <20090120153159.GA8319@redhat.com> (raw)
In-Reply-To: <18805.58968.356765.658443@mariner.uk.xensource.com>

On Tue, Jan 20, 2009 at 02:57:28PM +0000, Ian Jackson wrote:
> Gleb Natapov writes ("Re: [Qemu-devel] [PATCH v4] Stop VM on ENOSPC error."):
> > On Tue, Jan 20, 2009 at 02:01:21PM +0000, Ian Jackson wrote:
> > > Are we sure that the ide layer is the right place to do this ?
> > > Perhaps it would be better to do it in block.c.  That way it would
> > > seamlessly affect scsi too and other kinds of weird block devices
> > > on other platforms.
> ...
> > I thought about it and I see only two places where this can be done. In
> > ide/scsi/pv-block layer or in individual block implementations
> > (qcow,raw, etc). The problem doing it in generic block.c layer is that
> > how should it handle errors during blocking writes? It can't return
> > error to the caller and it can't wait inside the function. Doing this in
> > the ide layer allows for error handling flexibility that this patch
> > provides.
> 
> Hrm, yes, I see.
> 
> We could abolish the blocking calls.  Or rather, we could say that a
> device emulation which wants the stop-on-enospc behaviour must never
> make the blocking calls.
> 
I would like to abolish the blocking calls from all file formats, but in
reality it is almost impossible. Qcow2 metadata updates is a big mess to
do asynchronously. The best thing we can do is to move it to another thread.

So are you OK with my current approach?

--
			Gleb.

  reply	other threads:[~2009-01-20 15:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-20 10:56 [Qemu-devel] [PATCH v4] Stop VM on ENOSPC error Gleb Natapov
2009-01-20 14:01 ` Ian Jackson
2009-01-20 14:16   ` Gleb Natapov
2009-01-20 14:57     ` Ian Jackson
2009-01-20 15:31       ` Gleb Natapov [this message]
2009-01-20 16:50         ` Ian Jackson
2009-01-20 18:19           ` Jamie Lokier
2009-01-20 18:23           ` Gleb Natapov
2009-01-21 16:37             ` Ian Jackson
2009-01-21 17:00               ` Gleb Natapov
2009-01-21 17:25                 ` Ian Jackson
2009-01-21 18:01                   ` Gleb Natapov
2009-01-22 12:39                     ` Ian Jackson
2009-01-21 19:00 ` Anthony Liguori

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=20090120153159.GA8319@redhat.com \
    --to=gleb@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).