libceph: set page info with byte length
When setting page array information for message data, provide the
byte length rather than the page count ceph_msg_data_set_pages().
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index cec39cb..fc59fcc 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2690,13 +2690,13 @@
EXPORT_SYMBOL(ceph_con_keepalive);
void ceph_msg_data_set_pages(struct ceph_msg *msg, struct page **pages,
- unsigned int page_count, size_t alignment)
+ size_t length, size_t alignment)
{
/* BUG_ON(msg->pages); */
/* BUG_ON(msg->page_count); */
msg->pages = pages;
- msg->page_count = page_count;
+ msg->page_count = calc_pages_for((u64)alignment, (u64)length);
msg->page_alignment = alignment & ~PAGE_MASK;
}
EXPORT_SYMBOL(ceph_msg_data_set_pages);