From: Boaz Harrosh <bharrosh@panasas.com>
To: Benny Halevy <bhalevy@panasas.com>,
open-osd mailing-list <osd-dev@open-osd.org>,
pNFS Mailing List <pnfs@linux-nfs.org>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 2/2] libosd: osd_dev_is_ver1 - Minor API cleanup
Date: Tue, 30 Jun 2009 20:10:58 +0300 [thread overview]
Message-ID: <4A4A4722.6090009@panasas.com> (raw)
In-Reply-To: <4A4A467A.7020600@panasas.com>
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: Boaz Harrosh <bharrosh@panasas.com>
---
include/scsi/osd_initiator.h | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h
index 0d29cc3..7bda109 100644
--- a/include/scsi/osd_initiator.h
+++ b/include/scsi/osd_initiator.h
@@ -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);
}
/*
--
1.6.2.1
prev parent reply other threads:[~2009-06-30 17:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-30 17:08 [PATCH 0/2] libosd: Support for device lookup by osd_device_info Boaz Harrosh
2009-06-30 17:10 ` [PATCH 1/2] libosd: osd_dev_info: Unique Identification of an OSD device Boaz Harrosh
2009-06-30 17:42 ` Benny Halevy
2009-06-30 17:10 ` Boaz Harrosh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A4A4722.6090009@panasas.com \
--to=bharrosh@panasas.com \
--cc=bhalevy@panasas.com \
--cc=linux-scsi@vger.kernel.org \
--cc=osd-dev@open-osd.org \
--cc=pnfs@linux-nfs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.