Commit f6c3a386 authored by Boaz Harrosh's avatar Boaz Harrosh

libosd: osd_dev_is_ver1 - Minor API cleanup

define a new osd_dev_is_ver1 that operates on devices
and the old osd_req_is_ver1 uses that new API.
Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
parent 3dbb6073
......@@ -113,6 +113,15 @@ static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v)
#endif
}
static inline bool osd_dev_is_ver1(struct osd_dev *od)
{
#ifdef OSD_VER1_SUPPORT
return od->version == OSD_VER1;
#else
return false;
#endif
}
struct osd_request;
typedef void (osd_req_done_fn)(struct osd_request *or, void *private);
......@@ -149,14 +158,9 @@ struct osd_request {
int async_error;
};
/* OSD Version control */
static inline bool osd_req_is_ver1(struct osd_request *or)
{
#ifdef OSD_VER1_SUPPORT
return or->osd_dev->version == OSD_VER1;
#else
return false;
#endif
return osd_dev_is_ver1(or->osd_dev);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment