summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-04-09 09:16:46 -0700
committerGitHub <[email protected]>2020-04-09 09:16:46 -0700
commit68dde63d138882860109178f4ab0b7b1b1bb3cfd (patch)
treed2400bcdb5bb4c7689fa2392023002aa0a2990e6 /include
parent01c4f2bf2933319e876e8f695e97d0719a9db0ed (diff)
Linux 5.7 compat: blk_alloc_queue()
Commit https://github.com/torvalds/linux/commit/3d745ea5 simplified the blk_alloc_queue() interface by updating it to take the request queue as an argument. Add a wrapper function which accepts the new arguments and internally uses the available interfaces. Other minor changes include increasing the Linux-Maximum to 5.6 now that 5.6 has been released. It was not bumped to 5.7 because this release has not yet been finalized and is still subject to change. Added local 'struct zvol_state_os *zso' variable to zvol_alloc. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10181 Closes #10187
Diffstat (limited to 'include')
-rw-r--r--include/os/linux/kernel/linux/blkdev_compat.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h
index 3ba14ef40..b46a6e40a 100644
--- a/include/os/linux/kernel/linux/blkdev_compat.h
+++ b/include/os/linux/kernel/linux/blkdev_compat.h
@@ -487,4 +487,18 @@ blk_generic_end_io_acct(struct request_queue *q, int rw,
#endif
}
+static inline struct request_queue *
+blk_generic_alloc_queue(make_request_fn make_request, int node_id)
+{
+#if defined(HAVE_BLK_ALLOC_QUEUE_REQUEST_FN)
+ return (blk_alloc_queue(make_request, node_id));
+#else
+ struct request_queue *q = blk_alloc_queue(GFP_KERNEL);
+ if (q != NULL)
+ blk_queue_make_request(q, make_request);
+
+ return (q);
+#endif
+}
+
#endif /* _ZFS_BLKDEV_H */