qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "andrzej zaborowski" <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [REPOST] [PATCH 0/2] IDE error checking
Date: Wed, 17 Sep 2008 04:20:05 +0200	[thread overview]
Message-ID: <fb249edb0809161920y185645c3l72b1672ea960497c@mail.gmail.com> (raw)
In-Reply-To: <48C343CB.2000208@codemonkey.ws>

2008/9/7 Anthony Liguori <anthony@codemonkey.ws>:
> Ian Jackson wrote:
>>
>> In these two patches I make the IDE controller emulation pay attention
>> to errors returned by the bdrv functions.
>>
>> The first of these patches was first posted in February 2008 and has
>> been discussed extensively.
>>
>> There was some discussion as to whether it would be better, in cases
>> where the error was ENOSPC, to stop the guest than to pass it an IDE
>> error.  However it must be clear that regardless of whether that would
>> be better in some circumstances, giving the guest an IDE error is
>> better than silently ignoring the error, throwing away the guest's
>> data.
>>
>
> The proper solution is not significantly more difficult.  Just add a
> switch(errno) { case ENOSPC: vm_stop(0); term_printf("Ran out of disk
> space\n"); break; }.  That's all I'm asking for.

I will commit these two patches if there are no further comments /
iterations to them.  There's been enough discussion about the issue
and this is definitely an improvement, there can be perhaps further
improvements later.

I will not commit a patch that does the vm_stop(0) thing because I
don't see a reason hard discs should be treated differently than other
peripherals.  Any peripheral being physically distroyed is a critical
situation to the OS and the OS should be left to decide what to do
with it.  Furthermore a ENOSPC doesn't destroy all the capability of
the emulated drive, it's just a disc that lost the capability to write
changes.  It should report write errors.  It should continue to read.
Note that the disc isn't any more critical than other peripherals to
the system, there are diskless systems, with possibly hotpluggable
storage, there are VMs using many images in different formats some of
which can't return an ENOSPC.

I submitted a patch to report IDE errors in early 2006 when I lost
data due to lack of write error reporting and there's no change till
today.

Cheers

      reply	other threads:[~2008-09-17  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01 16:15 [Qemu-devel] [REPOST] [PATCH 0/2] IDE error checking Ian Jackson
2008-09-01 16:02 ` [Qemu-devel] [PATCH 1/2] Actually check read/write errors when doing IDE DMA and IDE PIO writes Ian Jackson
2008-09-01 16:22   ` [Qemu-devel] [PATCH 2/2] [ide] Check that asynchronous (DMA) submission succeeds Ian Jackson
2008-09-07  3:00 ` [Qemu-devel] [REPOST] [PATCH 0/2] IDE error checking Anthony Liguori
2008-09-17  2:20   ` andrzej zaborowski [this message]

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=fb249edb0809161920y185645c3l72b1672ea960497c@mail.gmail.com \
    --to=balrogg@gmail.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).