qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [REPOST] [PATCH 0/2] IDE error checking


From: andrzej zaborowski
Subject: Re: [Qemu-devel] [REPOST] [PATCH 0/2] IDE error checking
Date: Wed, 17 Sep 2008 04:20:05 +0200

2008/9/7 Anthony Liguori <address@hidden>:
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]