diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-03-21 21:05:30 +0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2014-04-05 08:08:02 +0400 |
commit | 2cfa34f2d67a36e292cbe6e4c1e60d212b7ba4d1 (patch) | |
tree | 63ab56e96104a41d950d97b3f6d18e248151325f /include/linux/ceph/rados.h | |
parent | d286de796aab9e306e674c6d23c4f3c1f55e394c (diff) | |
download | linux-2cfa34f2d67a36e292cbe6e4c1e60d212b7ba4d1.tar.xz |
libceph: primary_affinity infrastructure
Add primary_affinity infrastructure. primary_affinity values are
stored in an max_osd-sized array, hanging off ceph_osdmap, similar to
a osd_weight array.
Introduce {get,set}_primary_affinity() helpers, primarily to return
CEPH_OSD_DEFAULT_PRIMARY_AFFINITY when no affinity has been set and to
abstract out osd_primary_affinity array allocation and initialization.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'include/linux/ceph/rados.h')
-rw-r--r-- | include/linux/ceph/rados.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h index 2caabef8d369..bb6f40c9cb0f 100644 --- a/include/linux/ceph/rados.h +++ b/include/linux/ceph/rados.h @@ -133,6 +133,10 @@ extern const char *ceph_osd_state_name(int s); #define CEPH_OSD_IN 0x10000 #define CEPH_OSD_OUT 0 +/* osd primary-affinity. fixed point value: 0x10000 == baseline */ +#define CEPH_OSD_MAX_PRIMARY_AFFINITY 0x10000 +#define CEPH_OSD_DEFAULT_PRIMARY_AFFINITY 0x10000 + /* * osd map flag bits |