qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 12/17] qemu-img: add a "map" subcommand


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 12/17] qemu-img: add a "map" subcommand
Date: Thu, 18 Jul 2013 10:55:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

Il 18/07/2013 09:25, Fam Zheng ha scritto:
>> > +        /* Probe up to 1 G at a time.  */
>> > +        sector_num = (curr.start + curr.length) >> BDRV_SECTOR_BITS;
>> > +        nsectors_left = DIV_ROUND_UP(length, BDRV_SECTOR_SIZE) - 
>> > sector_num;
>> > +        n = MAX(1 << (30 - BDRV_SECTOR_BITS), nsectors_left);
>> > +        ret = get_block_status(bs, sector_num, &n, &depth);
> Am I misunderstanding here, n is at least 1G, but in your comment it's
> up to 1 G at a time?
> 

You're right, it should be MIN.

Paolo



reply via email to

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