aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-07 16:38:26 -0500
committerSage Weil <sage@inktank.com>2013-05-02 00:16:39 -0400
commitf1baeb2b9fc1c2c87ec02f1bf8cb88e108d4fbce (patch)
tree5ca6b72adeeea2423367ea3313902cf61fd45980 /net/ceph/messenger.c
parent02afca6ca00b7972887c5cc77068356f33bdfc18 (diff)
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>
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r--net/ceph/messenger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index cec39cb623f0..fc59fcc9be77 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2690,13 +2690,13 @@ void ceph_con_keepalive(struct ceph_connection *con)
2690EXPORT_SYMBOL(ceph_con_keepalive); 2690EXPORT_SYMBOL(ceph_con_keepalive);
2691 2691
2692void ceph_msg_data_set_pages(struct ceph_msg *msg, struct page **pages, 2692void ceph_msg_data_set_pages(struct ceph_msg *msg, struct page **pages,
2693 unsigned int page_count, size_t alignment) 2693 size_t length, size_t alignment)
2694{ 2694{
2695 /* BUG_ON(msg->pages); */ 2695 /* BUG_ON(msg->pages); */
2696 /* BUG_ON(msg->page_count); */ 2696 /* BUG_ON(msg->page_count); */
2697 2697
2698 msg->pages = pages; 2698 msg->pages = pages;
2699 msg->page_count = page_count; 2699 msg->page_count = calc_pages_for((u64)alignment, (u64)length);
2700 msg->page_alignment = alignment & ~PAGE_MASK; 2700 msg->page_alignment = alignment & ~PAGE_MASK;
2701} 2701}
2702EXPORT_SYMBOL(ceph_msg_data_set_pages); 2702EXPORT_SYMBOL(ceph_msg_data_set_pages);