summaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/messenger.h
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-01 18:00:16 -0600
committerSage Weil <sage@inktank.com>2013-05-01 21:16:53 -0700
commit97fb1c7f6637ee61c90b8bc186d464cfd426b063 (patch)
tree561715682d70fb55c43acbd0fcedca33d0597237 /include/linux/ceph/messenger.h
parent35b6280899424a0faf5410ce1ee86f9682528e6c (diff)
downloadblackbird-op-linux-97fb1c7f6637ee61c90b8bc186d464cfd426b063.tar.gz
blackbird-op-linux-97fb1c7f6637ee61c90b8bc186d464cfd426b063.zip
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/messenger.h')
-rw-r--r--include/linux/ceph/messenger.h7
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
OpenPOWER on IntegriCloud