qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] block: mirror - zero unallocat


From: Kevin Wolf
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present
Date: Wed, 30 Sep 2015 17:28:08 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 30.09.2015 um 17:11 hat Jeff Cody geschrieben:
> On Mon, Sep 28, 2015 at 04:23:16PM +0100, Stefan Hajnoczi wrote:
> > On Sun, Sep 27, 2015 at 11:29:18PM -0400, Jeff Cody wrote:
> > > +    if (s->zero_cycle) {
> > > +        ret = bdrv_get_block_status(s->target, sector_num, nb_sectors, 
> > > &pnum);
> > > +        if (!(ret & BDRV_BLOCK_ZERO)) {
> > > +            bdrv_aio_write_zeroes(s->target, sector_num, op->nb_sectors,
> > > +                                  s->unmap ? BDRV_REQ_MAY_UNMAP : 0,
> > > +                                  mirror_write_complete, op);
> > 
> > mirror_write_complete will advance s->common.offset.  Won't the progress
> > be incorrect if we do that for both zeroing and regular mirroring?
> 
> Good point.  However, Is it really wrong to count it in the progress,
> if we do the zero mirror pass?  I

It's wrong as long as you increment the progress (offset), but don't
consider it in the expected value for completion (length).

Kevin



reply via email to

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