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>
This commit is contained in:
@@ -279,6 +279,11 @@ struct ceph_osd_client {
|
||||
struct workqueue_struct *notify_wq;
|
||||
};
|
||||
|
||||
static inline bool ceph_osdmap_flag(struct ceph_osd_client *osdc, int flag)
|
||||
{
|
||||
return osdc->osdmap->flags & flag;
|
||||
}
|
||||
|
||||
extern int ceph_osdc_setup(void);
|
||||
extern void ceph_osdc_cleanup(void);
|
||||
|
||||
|
@@ -189,11 +189,6 @@ static inline bool ceph_osd_is_down(struct ceph_osdmap *map, int osd)
|
||||
return !ceph_osd_is_up(map, osd);
|
||||
}
|
||||
|
||||
static inline bool ceph_osdmap_flag(struct ceph_osdmap *map, int flag)
|
||||
{
|
||||
return map && (map->flags & flag);
|
||||
}
|
||||
|
||||
extern char *ceph_osdmap_state_str(char *str, int len, int state);
|
||||
extern u32 ceph_get_primary_affinity(struct ceph_osdmap *map, int osd);
|
||||
|
||||
|
Reference in New Issue
Block a user