[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache fl
From: |
Ian Jackson |
Subject: |
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush |
Date: |
Wed, 2 Apr 2008 17:27:54 +0100 |
Paul Brook writes ("Re: [Qemu-devel] [PATCH] Asynchronous reliable and
configurable cache flush"):
> On Tuesday 01 April 2008, Ian Jackson wrote:
> > +static void scsi_flush_cb(void *opaque, int ret) {
> > + SCSIRequest *r = opaque;
> > + if (ret) {
> > + BADF("scsi-disc: IO error on flush: %s\n", strerror(-ret));
>
> This is wrong for two reasons: BADF already adds a suitable prefix,
> and is for reporting qemu bugs (i.e. missing features or things that
> should never happen). This is just a normal IO error, which we
> correctly report to the guest.
I don't think flush failures are a normal IO error. They can only
occur when the corresponding host block device is having serious
trouble. Normally (if it's actually a host disk) this is very bad.
The principle I'm trying to follow with this is to not throw away the
errno value. When we turn a block device write failure (which might
be EIO or perhaps something weirder like EBADF indicating a bug in
qemu) into a SCSI error, we don't have the ability to properly report
that errno value to the guest. So we should log it somewhere.
In a previous thread on this subject we seemed to conclude that qemu's
stderr is fine for this purpose. But if not then I'm happy to be
advised to send it somewhere else ...
You're right about the prefix though (and it was the wrong prefix,
too, with a variant spelling of `disk').
Ian.
- [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/01
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Paul Brook, 2008/04/01
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Jamie Lokier, 2008/04/02
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Paul Brook, 2008/04/02
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Jamie Lokier, 2008/04/02
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/02
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Jamie Lokier, 2008/04/03
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/03
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush,
Ian Jackson <=
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Samuel Thibault, 2008/04/01
[Qemu-devel] Re: [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/02