From: Gerd Hoffmann <kraxel@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: stefanha@gmail.com, qemu-devel@nongnu.org, nab@linux-iscsi.org
Subject: [Qemu-devel] Re: [PATCH 09/16] scsi-disk: Allocate iovec dynamically
Date: Thu, 18 Nov 2010 16:33:41 +0100 [thread overview]
Message-ID: <4CE54755.8010205@redhat.com> (raw)
In-Reply-To: <20101118144723.61032F90AB@ochil.suse.de>
Hi,
> +static size_t scsi_req_iov_len(SCSIDiskReq *r)
> +{
> + size_t iov_len = 0;
> + int i;
> +
> + for (i = 0; i< r->iov_num; i++)
> + iov_len += r->iov[i].iov_len;
> +
> + return iov_len;
> +}
You are aware that there is a QEMUIOVector type with helper functions
which keeps track of both number of elements and total size?
cheers,
Gerd
next prev parent reply other threads:[~2010-11-18 15:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-18 14:47 [Qemu-devel] [PATCH 09/16] scsi-disk: Allocate iovec dynamically Hannes Reinecke
2010-11-18 15:33 ` Gerd Hoffmann [this message]
2010-11-18 16:28 ` [Qemu-devel] " Hannes Reinecke
2010-11-19 11:43 ` Kevin Wolf
2010-11-19 12:30 ` Hannes Reinecke
2010-11-19 12:46 ` 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=4CE54755.8010205@redhat.com \
--to=kraxel@redhat.com \
--cc=hare@suse.de \
--cc=nab@linux-iscsi.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 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.