diff options
| author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 10:07:25 -0400 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-30 17:00:22 -0400 |
| commit | b7ec35b304b64af2830027350cc99d31e6e537c2 (patch) | |
| tree | c578df39d847e08e88db9d6f5e1b7e5cd4df86b5 /include/linux/ceph | |
| parent | 1a695a905c18548062509178b98bc91e67510864 (diff) | |
libceph: change ceph_osdmap_flag() to take osdc
For the benefit of every single caller, take osdc instead of map.
Also, now that osdc->osdmap can't ever be NULL, drop the check.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
| -rw-r--r-- | include/linux/ceph/osd_client.h | 5 | ||||
| -rw-r--r-- | include/linux/ceph/osdmap.h | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 19b14862d3e0..1b3b6e155392 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -279,6 +279,11 @@ struct ceph_osd_client { | |||
| 279 | struct workqueue_struct *notify_wq; | 279 | struct workqueue_struct *notify_wq; |
| 280 | }; | 280 | }; |
| 281 | 281 | ||
| 282 | static inline bool ceph_osdmap_flag(struct ceph_osd_client *osdc, int flag) | ||
| 283 | { | ||
| 284 | return osdc->osdmap->flags & flag; | ||
| 285 | } | ||
| 286 | |||
| 282 | extern int ceph_osdc_setup(void); | 287 | extern int ceph_osdc_setup(void); |
| 283 | extern void ceph_osdc_cleanup(void); | 288 | extern void ceph_osdc_cleanup(void); |
| 284 | 289 | ||
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index ddc426b22d81..9ccf4dbe55f8 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
| @@ -189,11 +189,6 @@ static inline bool ceph_osd_is_down(struct ceph_osdmap *map, int osd) | |||
| 189 | return !ceph_osd_is_up(map, osd); | 189 | return !ceph_osd_is_up(map, osd); |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | static inline bool ceph_osdmap_flag(struct ceph_osdmap *map, int flag) | ||
| 193 | { | ||
| 194 | return map && (map->flags & flag); | ||
| 195 | } | ||
| 196 | |||
| 197 | extern char *ceph_osdmap_state_str(char *str, int len, int state); | 192 | extern char *ceph_osdmap_state_str(char *str, int len, int state); |
| 198 | extern u32 ceph_get_primary_affinity(struct ceph_osdmap *map, int osd); | 193 | extern u32 ceph_get_primary_affinity(struct ceph_osdmap *map, int osd); |
| 199 | 194 | ||
