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>
#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))