提交 765b34fd 编写于 作者: A Asias He 提交者: Nicholas Bellinger

tcm_vhost: Introduce iov_num_pages

Add a helper to calculate the number of pages needed for a iov entry.

(nab: Drop unnecessary inline)
Signed-off-by: NAsias He <asias@redhat.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 9d6064a3
......@@ -77,6 +77,12 @@ static struct workqueue_struct *tcm_vhost_workqueue;
static DEFINE_MUTEX(tcm_vhost_mutex);
static LIST_HEAD(tcm_vhost_list);
static int iov_num_pages(struct iovec *iov)
{
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册