From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Asias He <asias@redhat.com>
Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
virtualization@lists.linux-foundation.org,
target-devel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] tcm_vhost: Introduce iov_num_pages
Date: Tue, 29 Jan 2013 10:51:45 -0800 [thread overview]
Message-ID: <1359485505.23290.1383.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <1358824827-16169-2-git-send-email-asias@redhat.com>
Hi Asias,
On Tue, 2013-01-22 at 11:20 +0800, Asias He wrote:
> Add a helper to calculate the number of pages needed for a iov entry.
>
> Signed-off-by: Asias He <asias@redhat.com>
> ---
Apologies for the long delay. Applied to target-pending/for-next with a
minor nit below.
Thank you,
--nab
> drivers/vhost/tcm_vhost.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
> index 3720604..ca35c16 100644
> --- a/drivers/vhost/tcm_vhost.c
> +++ b/drivers/vhost/tcm_vhost.c
> @@ -77,6 +77,12 @@ static struct workqueue_struct *tcm_vhost_workqueue;
> static DEFINE_MUTEX(tcm_vhost_mutex);
> static LIST_HEAD(tcm_vhost_list);
>
> +static inline int iov_num_pages(struct iovec *iov)
Dropping the unnecessary inline here.
> +{
> + return (PAGE_ALIGN((unsigned long)iov->iov_base + iov->iov_len) -
> + ((unsigned long)iov->iov_base & PAGE_MASK)) >> PAGE_SHIFT;
> +}
> +
> static int tcm_vhost_check_true(struct se_portal_group *se_tpg)
> {
> return 1;
next prev parent reply other threads:[~2013-01-29 18:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 3:20 [PATCH v2 0/3] tcm_vhost: Optimize gup in vhost_scsi_map_to_sgl Asias He
2013-01-22 3:20 ` [PATCH v2 1/3] tcm_vhost: Introduce iov_num_pages Asias He
2013-01-29 18:51 ` Nicholas A. Bellinger [this message]
2013-01-22 3:20 ` [PATCH v2 2/3] tcm_vhost: Use iov_num_pages to calculate sgl_count Asias He
2013-01-29 18:52 ` Nicholas A. Bellinger
2013-01-22 3:20 ` [PATCH v2 3/3] tcm_vhost: Optimize gup in vhost_scsi_map_to_sgl Asias He
2013-01-29 18:53 ` Nicholas A. Bellinger
2013-01-29 19:16 ` Michael S. Tsirkin
2013-01-29 19:21 ` Nicholas A. Bellinger
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=1359485505.23290.1383.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=asias@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=target-devel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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