libceph: record message data byte length

Record the number of bytes of data in a page array rather than the
number of pages in the array.  It can be assumed that the page array
is of sufficient size to hold the number of bytes indicated (and
offset by the indicated alignment).

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Alex Elder
2013-03-07 15:38:26 -06:00
committed by Sage Weil
parent ebf18f4709
commit 4a73ef27ad
2 changed files with 10 additions and 12 deletions

View File

@@ -77,7 +77,7 @@ struct ceph_msg {
struct page **pages; /* data payload. NOT OWNER. */
unsigned int page_alignment; /* io offset in first page */
unsigned int page_count; /* # pages in array or list */
size_t length; /* # data bytes in array or list */
struct ceph_pagelist *pagelist; /* instead of pages */
#ifdef CONFIG_BLOCK
unsigned int bio_seg; /* current bio segment */