diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ceph/messenger.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 889fe4720133..fb2b18a20c13 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
@@ -64,12 +64,12 @@ struct ceph_messenger { | |||
64 | u32 required_features; | 64 | u32 required_features; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | #define ceph_msg_has_pages(m) ((m)->pages != NULL) | 67 | #define ceph_msg_has_pages(m) ((m)->p.pages != NULL) |
68 | #define ceph_msg_has_pagelist(m) ((m)->pagelist != NULL) | 68 | #define ceph_msg_has_pagelist(m) ((m)->l.pagelist != NULL) |
69 | #ifdef CONFIG_BLOCK | 69 | #ifdef CONFIG_BLOCK |
70 | #define ceph_msg_has_bio(m) ((m)->bio != NULL) | 70 | #define ceph_msg_has_bio(m) ((m)->b.bio != NULL) |
71 | #endif /* CONFIG_BLOCK */ | 71 | #endif /* CONFIG_BLOCK */ |
72 | #define ceph_msg_has_trail(m) ((m)->trail != NULL) | 72 | #define ceph_msg_has_trail(m) ((m)->t.trail != NULL) |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * a single message. it contains a header (src, dest, message type, etc.), | 75 | * a single message. it contains a header (src, dest, message type, etc.), |
@@ -82,16 +82,25 @@ struct ceph_msg { | |||
82 | struct kvec front; /* unaligned blobs of message */ | 82 | struct kvec front; /* unaligned blobs of message */ |
83 | struct ceph_buffer *middle; | 83 | struct ceph_buffer *middle; |
84 | 84 | ||
85 | struct page **pages; /* data payload. NOT OWNER. */ | 85 | /* data payload */ |
86 | unsigned int page_alignment; /* io offset in first page */ | 86 | struct { |
87 | size_t length; /* # data bytes in array or list */ | 87 | struct page **pages; /* NOT OWNER. */ |
88 | struct ceph_pagelist *pagelist; /* instead of pages */ | 88 | size_t length; /* # data bytes in array */ |
89 | unsigned int alignment; /* first page */ | ||
90 | } p; | ||
91 | struct { | ||
92 | struct ceph_pagelist *pagelist; | ||
93 | } l; | ||
89 | #ifdef CONFIG_BLOCK | 94 | #ifdef CONFIG_BLOCK |
90 | unsigned int bio_seg; /* current bio segment */ | 95 | struct { |
91 | struct bio *bio; /* instead of pages/pagelist */ | 96 | struct bio *bio_iter; /* iterator */ |
92 | struct bio *bio_iter; /* bio iterator */ | 97 | struct bio *bio; |
98 | unsigned int bio_seg; /* current seg in bio */ | ||
99 | } b; | ||
93 | #endif /* CONFIG_BLOCK */ | 100 | #endif /* CONFIG_BLOCK */ |
94 | struct ceph_pagelist *trail; /* the trailing part of the data */ | 101 | struct { |
102 | struct ceph_pagelist *trail; /* trailing part of data */ | ||
103 | } t; | ||
95 | 104 | ||
96 | struct ceph_connection *con; | 105 | struct ceph_connection *con; |
97 | struct list_head list_head; /* links for connection lists */ | 106 | struct list_head list_head; /* links for connection lists */ |