Package: flashcache Version: 3.1.3+git20150701-5 Severity: normal Tags: patch User: [email protected] Usertags: origin-ubuntu artful ubuntu-patch
Dear Maintainer, the block layer code in the kernel changed in 4.13 to replace bi_error with bi_status in the bio structure. This causes the DKMS module to fail compile stage when build for 4.13 or later kernels. Patch add support for the new interface to flashcache. The resulting module was tested by creating a flashcache module on top of file backed loop block devices and did still work with the change. *** /tmp/tmpYJOu12/bug_body In Ubuntu, the attached patch was applied to achieve the following: DKMS module no longer compiles with 4.13 kernels. * Fix DKMS compile for 4.13+ kernels (LP: #1706426). IMPORTANT: Before adding this patch, the flachcache driver MUST be fixed (see Debian bug #873949). Thanks for considering the patch. -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-93-generic (SMP w/8 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -Nru flashcache-3.1.3+git20150701/debian/files flashcache-3.1.3+git20150701/debian/files --- flashcache-3.1.3+git20150701/debian/files 1970-01-01 01:00:00.000000000 +0100 +++ flashcache-3.1.3+git20150701/debian/files 2017-08-31 09:49:24.000000000 +0200 @@ -0,0 +1 @@ +flashcache_3.1.3+git20150701-5ubuntu1_source.buildinfo kernel optional diff -Nru flashcache-3.1.3+git20150701/debian/patches/compat-4.13.patch flashcache-3.1.3+git20150701/debian/patches/compat-4.13.patch --- flashcache-3.1.3+git20150701/debian/patches/compat-4.13.patch 1970-01-01 01:00:00.000000000 +0100 +++ flashcache-3.1.3+git20150701/debian/patches/compat-4.13.patch 2017-08-30 19:46:08.000000000 +0200 @@ -0,0 +1,21 @@ +Description: Allow compile on 4.13 and later kernels + In 4.13 bi_error was replaced by bi_status. Fix code to convert IO errors + to the new status variable. +Author: Stefan Bader <[email protected]> +Forwarded: No +Index: flashcache-3.1.3+git20150701/src/flashcache_subr.c +=================================================================== +--- flashcache-3.1.3+git20150701.orig/src/flashcache_subr.c ++++ flashcache-3.1.3+git20150701/src/flashcache_subr.c +@@ -739,7 +739,11 @@ flashcache_bio_endio(struct bio *bio, in + #elif LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) + bio_endio(bio, error); + #else ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) + bio->bi_error = error; ++#else ++ bio->bi_status = errno_to_blk_status(error); ++#endif + bio_endio(bio); + #endif + } diff -Nru flashcache-3.1.3+git20150701/debian/patches/series flashcache-3.1.3+git20150701/debian/patches/series --- flashcache-3.1.3+git20150701/debian/patches/series 2016-12-03 11:37:14.000000000 +0100 +++ flashcache-3.1.3+git20150701/debian/patches/series 2017-08-31 09:44:58.000000000 +0200 @@ -3,3 +3,5 @@ fix-build-error-on-linux-4.3.patch switch-from-ioctl-to-dm-target-messages.patch compat-4.8.patch +# init-bi-op-flags.patch <-- submitted as separate bug report +compat-4.13.patch

