libceph: record bio length
The bio is the only data item type that doesn't record its full length. Fix that. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
@@ -116,7 +116,10 @@ struct ceph_msg_data {
|
|||||||
enum ceph_msg_data_type type;
|
enum ceph_msg_data_type type;
|
||||||
union {
|
union {
|
||||||
#ifdef CONFIG_BLOCK
|
#ifdef CONFIG_BLOCK
|
||||||
struct bio *bio;
|
struct {
|
||||||
|
struct bio *bio;
|
||||||
|
size_t bio_length;
|
||||||
|
};
|
||||||
#endif /* CONFIG_BLOCK */
|
#endif /* CONFIG_BLOCK */
|
||||||
struct {
|
struct {
|
||||||
struct page **pages; /* NOT OWNER. */
|
struct page **pages; /* NOT OWNER. */
|
||||||
|
@@ -3032,6 +3032,7 @@ void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio,
|
|||||||
data = ceph_msg_data_create(CEPH_MSG_DATA_BIO);
|
data = ceph_msg_data_create(CEPH_MSG_DATA_BIO);
|
||||||
BUG_ON(!data);
|
BUG_ON(!data);
|
||||||
data->bio = bio;
|
data->bio = bio;
|
||||||
|
data->bio_length = length;
|
||||||
|
|
||||||
msg->data = data;
|
msg->data = data;
|
||||||
msg->data_length = length;
|
msg->data_length = length;
|
||||||
|
Reference in New Issue
Block a user