summaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/osdmap.h
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-03-24 17:12:47 +0200
committerSage Weil <sage@inktank.com>2014-04-04 21:08:08 -0700
commit2abebdbca7997422bfab6bf8b6559384a6b95294 (patch)
tree27b6168487c4308843f453f58eb00923271fa004 /include/linux/ceph/osdmap.h
parent246138fa6787db6f4016f26604fdc05dc9f95627 (diff)
downloadlinux-2abebdbca7997422bfab6bf8b6559384a6b95294.tar.gz
linux-2abebdbca7997422bfab6bf8b6559384a6b95294.tar.bz2
linux-2abebdbca7997422bfab6bf8b6559384a6b95294.zip
libceph: ceph_can_shift_osds(pool) and pool type defines
Bring in pg_pool_t::can_shift_osds() counterpart along with pool type defines. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'include/linux/ceph/osdmap.h')
-rw-r--r--include/linux/ceph/osdmap.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index 0895797b9e28..4e28c1e5d62f 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -41,6 +41,18 @@ struct ceph_pg_pool_info {
char *name;
};
+static inline bool ceph_can_shift_osds(struct ceph_pg_pool_info *pool)
+{
+ switch (pool->type) {
+ case CEPH_POOL_TYPE_REP:
+ return true;
+ case CEPH_POOL_TYPE_EC:
+ return false;
+ default:
+ BUG_ON(1);
+ }
+}
+
struct ceph_object_locator {
s64 pool;
};