[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] QCOW2: fix bug - report read success on failure
From: |
Chunqiang Tang |
Subject: |
[Qemu-devel] Re: [PATCH] QCOW2: fix bug - report read success on failure |
Date: |
Thu, 3 Feb 2011 12:14:25 -0500 |
> Oops, thanks for catching this. I thought this was fixed long ago, but
> apparently it wasn't.
Not me, the testing tool caught it without my supervision. :-)
> > @@ -495,8 +497,10 @@ static void qcow2_aio_read_cb(void *opaque, int
ret)
> > }
> > } else if (acb->cluster_offset & QCOW_OFLAG_COMPRESSED) {
> > /* add AIO support for compressed blocks ? */
> > - if (qcow2_decompress_cluster(bs, acb->cluster_offset) < 0)
> > + if (qcow2_decompress_cluster(bs, acb->cluster_offset) < 0) {
> > + ret = -EIO;
> > goto done;
> > + }
>
> I think here we should change qcow2_decompessed_cluster() to return the
> real error code instead of -1, so that we can pass it on instead of
> turning everything into -EIO.
I agree. Could you please prepare the official patch? I just throw in
ideas I got from my testing tool.