Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c851c495 authored by Alex Elder's avatar Alex Elder Committed by Sage Weil
Browse files

libceph: record bio length



The bio is the only data item type that doesn't record its full
length.  Fix that.

Signed-off-by: default avatarAlex Elder <elder@inktank.com>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent f759ebb9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -116,7 +116,10 @@ struct ceph_msg_data {
	enum ceph_msg_data_type		type;
	union {
#ifdef CONFIG_BLOCK
		struct {
			struct bio	*bio;
			size_t		bio_length;
		};
#endif /* CONFIG_BLOCK */
		struct {
			struct page	**pages;	/* NOT OWNER. */
+1 −0
Original line number Diff line number Diff line
@@ -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);
	BUG_ON(!data);
	data->bio = bio;
	data->bio_length = length;

	msg->data = data;
	msg->data_length = length;