From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 10/13] raw-posix: Convert to bdrv_co_pwrite_zeroes()
Date: Fri, 3 Jun 2016 18:21:22 +0200 [thread overview]
Message-ID: <20160603162122.GD5712@noname.redhat.com> (raw)
In-Reply-To: <1464815413-613-11-git-send-email-eblake@redhat.com>
Am 01.06.2016 um 23:10 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> block/raw-posix.c | 34 +++++++++++++++++-----------------
> trace-events | 2 +-
> 2 files changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/block/raw-posix.c b/block/raw-posix.c
> index a4f5a1b..8bfcb4a 100644
> --- a/block/raw-posix.c
> +++ b/block/raw-posix.c
> @@ -1252,8 +1252,8 @@ static int aio_worker(void *arg)
> }
>
> static int paio_submit_co(BlockDriverState *bs, int fd,
> - int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
> - int type)
> + int64_t offset, QEMUIOVector *qiov,
> + int count, int type)
> {
> RawPosixAIOData *acb = g_new(RawPosixAIOData, 1);
> ThreadPool *pool;
> @@ -1262,16 +1262,16 @@ static int paio_submit_co(BlockDriverState *bs, int fd,
> acb->aio_type = type;
> acb->aio_fildes = fd;
>
> - acb->aio_nbytes = nb_sectors * BDRV_SECTOR_SIZE;
> - acb->aio_offset = sector_num * BDRV_SECTOR_SIZE;
> + acb->aio_nbytes = count;
> + acb->aio_offset = offset;
>
> if (qiov) {
> acb->aio_iov = qiov->iov;
> acb->aio_niov = qiov->niov;
> - assert(qiov->size == acb->aio_nbytes);
> + assert(qiov->size == count);
> }
>
> - trace_paio_submit_co(sector_num, nb_sectors, type);
> + trace_paio_submit_co(offset, qiov->size, type);
As discussed on IRC, I'm fixing this up in my branch with
s/qiov->size/count/ because qiov can be NULL.
This fixes qemu-iotests 048 for raw.
> pool = aio_get_thread_pool(bdrv_get_aio_context(bs));
> return thread_pool_submit_co(pool, aio_worker, acb);
> }
Kevin
next prev parent reply other threads:[~2016-06-03 16:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 21:10 [Qemu-devel] [PATCH v2 00/13] Kill sector-based write_zeroes Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 01/13] iscsi: Use block size as minimum zero/discard alignment Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 02/13] block: Track write zero limits in bytes Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 03/13] block: Add .bdrv_co_pwrite_zeroes() Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 04/13] block: Switch bdrv_write_zeroes() to byte interface Eric Blake
2016-06-02 11:01 ` Kevin Wolf
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 05/13] iscsi: Convert to bdrv_co_pwrite_zeroes() Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 06/13] qcow2: " Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 07/13] blkreplay: " Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 08/13] gluster: " Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 09/13] qed: " Eric Blake
2016-06-02 11:16 ` Kevin Wolf
2016-06-02 12:40 ` Eric Blake
2016-06-02 12:45 ` Kevin Wolf
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 10/13] raw-posix: " Eric Blake
2016-06-03 16:21 ` Kevin Wolf [this message]
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 11/13] raw_bsd: " Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 12/13] vmdk: " Eric Blake
2016-06-01 21:10 ` [Qemu-devel] [PATCH v2 13/13] block: Kill bdrv_co_write_zeroes() Eric Blake
2016-06-02 11:26 ` [Qemu-devel] [PATCH v2 00/13] Kill sector-based write_zeroes Kevin Wolf
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=20160603162122.GD5712@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@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).