qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/17] block: expect errors from bdrv_co_is_allo


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 06/17] block: expect errors from bdrv_co_is_allocated
Date: Fri, 05 Jul 2013 12:28:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Il 05/07/2013 11:19, Stefan Hajnoczi ha scritto:
> >              /* If the cluster is allocated, we don't need to take action */
> >              ret = bdrv_is_allocated(bs, sector, n, &n);
> > +            if (ret < 0) {
> > +                error_report("error while reading from file");
> > +                goto out;
> > +            }
> 
> We should print the errno valid and saying "while reading from file" is
> a little misleading:
> 
> "error while checking cluster allocation status: %d", ret

I think this is too specific.  In the end, errors from bdrv_is_allocated
are almost always due to a problem reading the metadata from the file.
I will change it to "error reading image metadata", or something like that.

(And also use strerror).

Paolo



reply via email to

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