From: Fam Zheng <famz@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
pbonzini@redhat.com, qemu-devel@nongnu.org,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image
Date: Mon, 9 Nov 2015 10:12:54 +0800 [thread overview]
Message-ID: <20151109021254.GC17373@ad.usersys.redhat.com> (raw)
In-Reply-To: <563CF31E.6030707@redhat.com>
On Fri, 11/06 19:36, Max Reitz wrote:
> > + next_sector = sector_num;
> > + next_chunk = sector_num / sectors_per_chunk;
>
> @next_sector and @next_chunk set here...
>
> > hbitmap_next_sector = s->sector_num;
> > - sector_num = s->sector_num;
> > - sectors_per_chunk = s->granularity >> BDRV_SECTOR_BITS;
> > - end = s->bdev_length / BDRV_SECTOR_SIZE;
> >
> > /* Extend the QEMUIOVector to include all adjacent blocks that will
> > * be copied in this operation.
> > @@ -198,14 +191,6 @@ static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s)
> > next_sector = sector_num;
> > next_chunk = sector_num / sectors_per_chunk;
>
> ...and here already. So the above seems superfluous, considering that
> they are not read in between.
>
> (If you keep hbitmap_next_sector = s->sector_num; above the sector_num =
> ... block, that may reduce conflicts further)
Indeed, thanks for noticing this.
> > + case MIRROR_METHOD_DISCARD:
> > + return mirror_do_zero_or_discard(s, sector_num,
> > + contiguous_sectors,
> > + false);
>
> s/false/true/?
Yes, thanks.
Fam
next prev parent reply other threads:[~2015-11-09 2:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 10:22 [Qemu-devel] [PATCH] mirror: Improve zero-write and discard with fragmented image Fam Zheng
2015-11-06 18:36 ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-11-09 2:12 ` Fam Zheng [this message]
2015-11-09 16:04 ` [Qemu-devel] " Kevin Wolf
2015-11-09 16:18 ` Paolo Bonzini
2015-11-09 16:29 ` Kevin Wolf
2015-11-10 6:14 ` Fam Zheng
2015-11-10 9:01 ` Paolo Bonzini
2015-11-10 10:12 ` Kevin Wolf
2015-11-10 10:30 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151109021254.GC17373@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.