]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
UBUNTU: hio -- stub out BIOVEC_PHYS_MERGEABLE for 4.20+
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 6 Feb 2019 19:49:13 +0000 (13:49 -0600)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 2 Nov 2021 07:24:44 +0000 (08:24 +0100)
This was moved to be internal to the block core in 4.20. It looks
to me like the driver doesn't need to be doing this anyway, as
the block layer already tries to merge bio segments when possible.
But in the worst case we still just end up with segments which
could have been merged but are not merged, which doesn't look to
be fatal.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
ubuntu/hio/hio.c

index 1c14fbc40252e0b9cd6d4dfe3ff783e371696b06..595af5f525e4a54f3b277929a15e5c7ecf131694 100644 (file)
@@ -4597,6 +4597,18 @@ static bool xen_biovec_phys_mergeable_fixed(const struct bio_vec *vec1,
 
 #endif
 
+/*
+ * BIOVEC_PHYS_MERGEABLE not available from 4.20 onward, and it seems likely
+ * that all the merging that can be done has been done by the block core
+ * already. Just stub it out.
+ */
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(4,20,0))
+# ifdef BIOVEC_PHYS_MERGEABLE
+#  undef BIOVEC_PHYS_MERGEABLE
+# endif
+# define BIOVEC_PHYS_MERGEABLE(vec1, vec2) (0)
+#endif
+
 static inline int ssd_bio_map_sg(struct ssd_device *dev, struct bio *bio, struct scatterlist *sgl)
 {
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))