qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [patch 6/7] QEMU live block copy


From: Marcelo Tosatti
Subject: Re: [Qemu-devel] [patch 6/7] QEMU live block copy
Date: Fri, 3 Jun 2011 12:59:42 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, May 24, 2011 at 10:15:09PM +0300, Blue Swirl wrote:
> > +static bool aio_inflight(BdrvCopyState *s, int64_t sector)
> > +{
> > +    int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;
> > +
> > +    if (s->aio_bitmap &&
> > +        (sector << BDRV_SECTOR_BITS) < bdrv_getlength(s->src)) {
> > +        return !!(s->aio_bitmap[chunk / (sizeof(unsigned long) * 8)] &
> > +            (1UL << (chunk % (sizeof(unsigned long) * 8))));
> 
> Please use the bitmap functions in bitmap.h, also in the next function.

Can't do, this bitmap can be larger than 2^32, while bitmap.h uses 'int'
for index.

> > +    if (bdrv_open(s->src, s->src_filename, open_flags, NULL) < 0) {
> > +        error_report("%s: %s: cannot fallback to source image\n", __func__,
> > +                     s->src_filename);
> 
> Below qerror_report() is used.

What is the problem? Don't get the point.

Fixed other comments, thanks for reviewing.




reply via email to

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