libceph: distinguish page array and pagelist count

Use distinct fields for tracking the number of pages in a message's
page array and in a message's page list.  Currently only one or the
other is used at a time, but that will be changing soon.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Alex Elder
2013-02-25 17:35:46 -06:00
committed by Sage Weil
parent 60cf5992d9
commit d4b515fa10
4 changed files with 14 additions and 11 deletions

View File

@@ -75,9 +75,10 @@ struct ceph_msg {
struct kvec front; /* unaligned blobs of message */
struct ceph_buffer *middle;
struct page **pages; /* data payload. NOT OWNER. */
unsigned nr_pages; /* size of page array */
unsigned page_count; /* size of page array */
unsigned page_alignment; /* io offset in first page */
struct ceph_pagelist *pagelist; /* instead of pages */
unsigned int pagelist_count; /* number of pages in pagelist */
struct ceph_connection *con;
struct list_head list_head;