From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: berto@igalia.com, jcody@redhat.com, qemu-devel@nongnu.org,
mreitz@redhat.com, jsnow@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 08/14] mirror: Use BlockBackend for I/O
Date: Tue, 24 May 2016 19:48:17 -0600 [thread overview]
Message-ID: <57450461.9030500@redhat.com> (raw)
In-Reply-To: <1464097654-12977-9-git-send-email-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]
On 05/24/2016 07:47 AM, Kevin Wolf wrote:
> This changes the mirror block job to use the job's BlockBackend for
> performing its I/O. job->bs isn't used by the mirroring code any more
> afterwards.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/mirror.c | 74 ++++++++++++++++++++++++++++++++--------------------------
> blockdev.c | 4 +---
> 2 files changed, 42 insertions(+), 36 deletions(-)
>
> @@ -295,18 +297,19 @@ static void mirror_do_zero_or_discard(MirrorBlockJob *s,
> s->in_flight++;
> s->sectors_in_flight += nb_sectors;
> if (is_discard) {
> - bdrv_aio_discard(s->target, sector_num, op->nb_sectors,
> - mirror_write_complete, op);
> + blk_aio_discard(s->target, sector_num, op->nb_sectors,
> + mirror_write_complete, op);
Eventually, discard should be converted to bytes. (Did I just get
volunteered?)
> } else {
> - bdrv_aio_write_zeroes(s->target, sector_num, op->nb_sectors,
> - s->unmap ? BDRV_REQ_MAY_UNMAP : 0,
> - mirror_write_complete, op);
> + blk_aio_write_zeroes(s->target, sector_num * BDRV_SECTOR_SIZE,
> + op->nb_sectors * BDRV_SECTOR_SIZE,
> + s->unmap ? BDRV_REQ_MAY_UNMAP : 0,
> + mirror_write_complete, op);
Conflicts with the write_zeroes stuff I just posted, let me know if I
need to rebase mine.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-05-25 1:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 13:47 [Qemu-devel] [PATCH v2 00/14] block jobs: Convert I/O to BlockBackend Kevin Wolf
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 01/14] block: keep a list of block jobs Kevin Wolf
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 02/14] block: Cancel jobs first in bdrv_close_all() Kevin Wolf
2016-05-24 22:29 ` Eric Blake
2016-05-25 11:31 ` Alberto Garcia
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 03/14] block: Default to enabled write cache in blk_new() Kevin Wolf
2016-05-25 11:32 ` Alberto Garcia
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 04/14] block: Convert block job core to BlockBackend Kevin Wolf
2016-05-25 0:17 ` Eric Blake
2016-05-25 3:50 ` Changlong Xie
2016-05-25 11:40 ` Alberto Garcia
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 05/14] block: Make blk_co_preadv/pwritev() public Kevin Wolf
2016-05-25 0:24 ` Eric Blake
2016-05-25 9:07 ` Kevin Wolf
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 06/14] stream: Use BlockBackend for I/O Kevin Wolf
2016-05-25 0:27 ` Eric Blake
2016-05-25 11:59 ` Alberto Garcia
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 07/14] mirror: Allow target that already has a BlockBackend Kevin Wolf
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 08/14] mirror: Use BlockBackend for I/O Kevin Wolf
2016-05-25 1:48 ` Eric Blake [this message]
2016-05-25 3:51 ` Changlong Xie
2016-05-25 4:01 ` Eric Blake
2016-05-25 4:12 ` Changlong Xie
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 09/14] backup: Don't leak BackupBlockJob in error path Kevin Wolf
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 10/14] backup: Pack Notifier within BackupBlockJob Kevin Wolf
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 11/14] backup: Remove bs parameter from backup_do_cow() Kevin Wolf
2016-05-25 12:05 ` Alberto Garcia
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 12/14] backup: Use BlockBackend for I/O Kevin Wolf
2016-05-25 1:53 ` Eric Blake
2016-05-25 3:51 ` Changlong Xie
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 13/14] commit: " Kevin Wolf
2016-05-25 1:56 ` Eric Blake
2016-05-25 3:51 ` Changlong Xie
2016-05-25 4:04 ` Eric Blake
2016-05-24 13:47 ` [Qemu-devel] [PATCH v2 14/14] blockjob: Remove BlockJob.bs Kevin Wolf
2016-05-25 6:29 ` Changlong Xie
2016-05-25 11:10 ` Kevin Wolf
2016-05-25 12:05 ` Alberto Garcia
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=57450461.9030500@redhat.com \
--to=eblake@redhat.com \
--cc=berto@igalia.com \
--cc=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).