summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-03-22 09:26:38 -0700
committerBrian Behlendorf <[email protected]>2011-03-22 12:15:54 -0700
commit3517f0b7e928e1a8e7634828fb92d194ea35004d (patch)
tree61a0804339678a89475d742215e54a4b258deedb /include/linux
parent1073d746d6421eb5faf8a3cf8534d82a2beb0512 (diff)
Linux 2.6.27 compat, blk_queue_stackable()
The blk_queue_stackable() queue flag was added in 2.6.27 to handle dm stacking drivers. Prior to this request stacking drivers were detected by checking (q->request_fn == NULL), for earlier kernels we revert to this legacy behavior.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev_compat.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h
index d2e80ec88..3bf1f4574 100644
--- a/include/linux/blkdev_compat.h
+++ b/include/linux/blkdev_compat.h
@@ -172,6 +172,17 @@ __blk_rq_bytes(struct request *req)
#define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS)
#endif
+/*
+ * 2.6.27 API change,
+ * The blk_queue_stackable() queue flag was added in 2.6.27 to handle dm
+ * stacking drivers. Prior to this request stacking drivers were detected
+ * by checking (q->request_fn == NULL), for earlier kernels we revert to
+ * this legacy behavior.
+ */
+#ifndef blk_queue_stackable
+#define blk_queue_stackable(q) ((q)->request_fn == NULL)
+#endif
+
#ifndef HAVE_GET_DISK_RO
static inline int
get_disk_ro(struct gendisk *disk)