[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to blo
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver |
Date: |
Wed, 19 Jun 2013 13:14:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
Il 19/06/2013 12:50, Kevin Wolf ha scritto:
>> > + /* Publish progress */
>> > + job->sectors_read += n;
>> > + job->common.offset += n * BDRV_SECTOR_SIZE;
> This is interesting, because the function is not only called by the
> background job, but also by write notifiers. So 'offset' in a literal
> sense doesn't make too much sense because we're not operating purely
> sequential.
>
> The QAPI documentation describes 'offset' like this:
>
> # @offset: the current progress value
>
> If we take it as just that, I think we could actually consider this code
> correct, because it's a useful measure for the progress (each sector is
> copied only once, either by the job or by a notifier), even though it
> really has nothing to do with an offset into the image.
Yes, this is similar to what we do for mirroring. I think it is a feature.
Paolo
> Maybe a comment would be appropriate.
- Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, (continued)
- Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Wenchao Xia, 2013/06/13
- Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Wenchao Xia, 2013/06/13
- Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Fam Zheng, 2013/06/13
- Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Wenchao Xia, 2013/06/13
- Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Stefan Hajnoczi, 2013/06/13
Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Fam Zheng, 2013/06/16
Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Kevin Wolf, 2013/06/18
Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver, Kevin Wolf, 2013/06/19