libceph: define ceph_msg_has_*() data macros
Define and use macros ceph_msg_has_*() to determine whether to operate on the pages, pagelist, bio, and trail fields of a message. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
@@ -64,6 +64,13 @@ struct ceph_messenger {
|
||||
u32 required_features;
|
||||
};
|
||||
|
||||
#define ceph_msg_has_pages(m) ((m)->pages != NULL)
|
||||
#define ceph_msg_has_pagelist(m) ((m)->pagelist != NULL)
|
||||
#ifdef CONFIG_BLOCK
|
||||
#define ceph_msg_has_bio(m) ((m)->bio != NULL)
|
||||
#endif /* CONFIG_BLOCK */
|
||||
#define ceph_msg_has_trail(m) ((m)->trail != NULL)
|
||||
|
||||
/*
|
||||
* a single message. it contains a header (src, dest, message type, etc.),
|
||||
* footer (crc values, mainly), a "front" message body, and possibly a
|
||||
|
Reference in New Issue
Block a user