diff options
author | Alex Elder <elder@inktank.com> | 2013-03-02 04:00:16 +0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 08:16:53 +0400 |
commit | 97fb1c7f6637ee61c90b8bc186d464cfd426b063 (patch) | |
tree | 561715682d70fb55c43acbd0fcedca33d0597237 /include/linux/ceph | |
parent | 35b6280899424a0faf5410ce1ee86f9682528e6c (diff) | |
download | linux-97fb1c7f6637ee61c90b8bc186d464cfd426b063.tar.xz |
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>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r-- | include/linux/ceph/messenger.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 1991a6f9dc90..889fe4720133 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h @@ -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 |