From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, hare@suse.de, vrozenfe@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/4] dma-helpers: change BlockBackend to opaque value in DMAIOFunc
Date: Tue, 17 May 2016 10:40:56 +0800 [thread overview]
Message-ID: <20160517024056.GB21731@ad.usersys.redhat.com> (raw)
In-Reply-To: <1462966873-30473-3-git-send-email-pbonzini@redhat.com>
On Wed, 05/11 13:41, Paolo Bonzini wrote:
> diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h
> index b0fbb9b..ddc4afc 100644
> --- a/include/sysemu/dma.h
> +++ b/include/sysemu/dma.h
> @@ -197,14 +197,15 @@ void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len);
> void qemu_sglist_destroy(QEMUSGList *qsg);
> #endif
>
> -typedef BlockAIOCB *DMAIOFunc(BlockBackend *blk, int64_t sector_num,
> +typedef BlockAIOCB *DMAIOFunc(int64_t sector_num,
> QEMUIOVector *iov, int nb_sectors,
> - BlockCompletionFunc *cb, void *opaque);
> + BlockCompletionFunc *cb, void *cb_opaque,
> + void *opaque);
>
The patch itself looks good, but I'm wondering if it's time to introduce:
typedef struct {
BlockCompletionFunc *cb;
void *opaque;
} BlockCompletion;
for more readability in such cases.
Fam
next prev parent reply other threads:[~2016-05-17 2:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 11:41 [Qemu-devel] [PATCH 0/4] scsi-block: receive the right SCSI status on reads and writes Paolo Bonzini
2016-05-11 11:41 ` [Qemu-devel] [PATCH 1/4] scsi-disk: introduce a common base class Paolo Bonzini
2016-05-11 11:41 ` [Qemu-devel] [PATCH 2/4] dma-helpers: change BlockBackend to opaque value in DMAIOFunc Paolo Bonzini
2016-05-17 2:40 ` Fam Zheng [this message]
2016-05-11 11:41 ` [Qemu-devel] [PATCH 3/4] scsi-disk: introduce dma_readv and dma_writev Paolo Bonzini
2016-05-19 15:11 ` Eric Blake
2016-05-19 15:13 ` Paolo Bonzini
2016-05-11 11:41 ` [Qemu-devel] [PATCH 4/4] scsi-block: always use SG_IO 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=20160517024056.GB21731@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=hare@suse.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vrozenfe@redhat.com \
/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).