mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
d286de796a
commit
2cfa34f2d6
4 changed files with 57 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue