diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2017-06-15 16:30:53 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-07-07 17:25:15 +0200 |
commit | dc98ff7230e5ccf11c621dff0d590e83574a7184 (patch) | |
tree | bc98e0f8cf3c0d5800ac6b6d57519d99ffacfc6f /include/linux/ceph/osdmap.h | |
parent | 8e48cf00c48fdefb01f70db81f31438cd0c29dcc (diff) | |
download | linux-dc98ff7230e5ccf11c621dff0d590e83574a7184.tar.gz linux-dc98ff7230e5ccf11c621dff0d590e83574a7184.tar.bz2 linux-dc98ff7230e5ccf11c621dff0d590e83574a7184.zip |
libceph: introduce ceph_spg, ceph_pg_to_primary_shard()
Store both raw pgid and actual spgid in ceph_osd_request_target.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph/osdmap.h')
-rw-r--r-- | include/linux/ceph/osdmap.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 938656f70807..7ae5b416b4b6 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h @@ -24,6 +24,13 @@ struct ceph_pg { uint32_t seed; }; +#define CEPH_SPG_NOSHARD -1 + +struct ceph_spg { + struct ceph_pg pgid; + s8 shard; +}; + int ceph_pg_compare(const struct ceph_pg *lhs, const struct ceph_pg *rhs); #define CEPH_POOL_FLAG_HASHPSPOOL (1ULL << 0) /* hash pg seed and pool id @@ -271,6 +278,9 @@ void ceph_pg_to_up_acting_osds(struct ceph_osdmap *osdmap, const struct ceph_pg *raw_pgid, struct ceph_osds *up, struct ceph_osds *acting); +bool ceph_pg_to_primary_shard(struct ceph_osdmap *osdmap, + const struct ceph_pg *raw_pgid, + struct ceph_spg *spgid); int ceph_pg_to_acting_primary(struct ceph_osdmap *osdmap, const struct ceph_pg *raw_pgid); |