diff options
Diffstat (limited to 'include/linux/ceph/osdmap.h')
-rw-r--r-- | include/linux/ceph/osdmap.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 821e16fff39a..ddc426b22d81 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
@@ -172,19 +172,19 @@ struct ceph_osdmap { | |||
172 | int crush_scratch_ary[CEPH_PG_MAX_SIZE * 3]; | 172 | int crush_scratch_ary[CEPH_PG_MAX_SIZE * 3]; |
173 | }; | 173 | }; |
174 | 174 | ||
175 | static inline int ceph_osd_exists(struct ceph_osdmap *map, int osd) | 175 | static inline bool ceph_osd_exists(struct ceph_osdmap *map, int osd) |
176 | { | 176 | { |
177 | return osd >= 0 && osd < map->max_osd && | 177 | return osd >= 0 && osd < map->max_osd && |
178 | (map->osd_state[osd] & CEPH_OSD_EXISTS); | 178 | (map->osd_state[osd] & CEPH_OSD_EXISTS); |
179 | } | 179 | } |
180 | 180 | ||
181 | static inline int ceph_osd_is_up(struct ceph_osdmap *map, int osd) | 181 | static inline bool ceph_osd_is_up(struct ceph_osdmap *map, int osd) |
182 | { | 182 | { |
183 | return ceph_osd_exists(map, osd) && | 183 | return ceph_osd_exists(map, osd) && |
184 | (map->osd_state[osd] & CEPH_OSD_UP); | 184 | (map->osd_state[osd] & CEPH_OSD_UP); |
185 | } | 185 | } |
186 | 186 | ||
187 | static inline int ceph_osd_is_down(struct ceph_osdmap *map, int osd) | 187 | static inline bool ceph_osd_is_down(struct ceph_osdmap *map, int osd) |
188 | { | 188 | { |
189 | return !ceph_osd_is_up(map, osd); | 189 | return !ceph_osd_is_up(map, osd); |
190 | } | 190 | } |