Package: blktap-dkms Version: 2.0.93-0.7 Severity: important Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu yakkety ubuntu-patch
Dear Maintainer, starting with kernel 4.7 there have been some modifications to the block layer which break the build of the DKMS module with those kernels. The attached patch adds some compat code to allow the module to again compile with the newer kernels. In Ubuntu, the attached patch was applied to achieve the following: * Fix build problems with kernels 4.7 onwards. Various changes in the block device request queue interface (LP: #1625032). Thanks for considering the patch. -- System Information: Debian Release: jessie/sid APT prefers trusty-updates APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty-proposed'), (500, 'trusty'), (100, 'trusty-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.13.0-96-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
diff -Nru blktap-dkms-2.0.93/debian/changelog blktap-dkms-2.0.93/debian/changelog diff -Nru blktap-dkms-2.0.93/debian/control blktap-dkms-2.0.93/debian/control --- blktap-dkms-2.0.93/debian/control 2016-08-12 19:15:04.000000000 +0200 +++ blktap-dkms-2.0.93/debian/control 2016-09-21 13:11:53.000000000 +0200 @@ -1,8 +1,7 @@ Source: blktap-dkms Section: kernel Priority: optional -Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com> -XSBC-Original-Maintainer: Debian Xen Team <pkg-xen-de...@lists.alioth.debian.org> +Maintainer: Debian Xen Team <pkg-xen-de...@lists.alioth.debian.org> Uploaders: Jon Ludlam <jonathan.lud...@eu.citrix.com>, Thomas Goirand <z...@debian.org> Standards-Version: 3.9.2 Build-Depends: debhelper (>= 7.0.50~), dkms diff -Nru blktap-dkms-2.0.93/debian/patches/follow-4.8-blkdev-changes.patch blktap-dkms-2.0.93/debian/patches/follow-4.8-blkdev-changes.patch --- blktap-dkms-2.0.93/debian/patches/follow-4.8-blkdev-changes.patch 1970-01-01 01:00:00.000000000 +0100 +++ blktap-dkms-2.0.93/debian/patches/follow-4.8-blkdev-changes.patch 2016-09-21 12:56:32.000000000 +0200 @@ -0,0 +1,57 @@ +Description: Follow 4.8(and 4.7) changes for block device requests + Various changes: + - REQ_FLUSH renamed to REQ_PREFLUSH [4.8+] + - REQ_DISCARD dropped, leaving REQ_OP_DISCARD [4.8+] + - blk_queue_flush() replaced with blk_queue_write_cache() [4.7+] + - flush_flags dropped, merged into queue_flags [4.7+] +Author: Stefan Bader <stefan.ba...@canonical.com> +Index: blktap-dkms-2.0.93/device.c +=================================================================== +--- blktap-dkms-2.0.93.orig/device.c 2016-09-20 19:14:39.000000000 +0200 ++++ blktap-dkms-2.0.93/device.c 2016-09-20 20:00:10.013723426 +0200 +@@ -216,13 +216,21 @@ blktap_device_make_request(struct blktap + goto fail; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0) + if (rq->cmd_flags & REQ_FLUSH) { ++#else ++ if (rq->cmd_flags & REQ_PREFLUSH) { ++#endif + request->operation = BLKTAP_OP_FLUSH; + request->nr_pages = 0; + goto submit; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0) + if (rq->cmd_flags & REQ_DISCARD) { ++#else ++ if (rq->cmd_flags & REQ_OP_DISCARD) { ++#endif + request->operation = BLKTAP_OP_TRIM; + request->nr_pages = 0; + goto submit; +@@ -349,7 +357,11 @@ blktap_device_configure(struct blktap *t + + /* Enable cache control */ + if (info->flags & BLKTAP_DEVICE_FLAG_FLUSH) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) + blk_queue_flush(rq, REQ_FLUSH); ++#else ++ blk_queue_write_cache(rq, true, false); ++#endif + + /* Block discards */ + if (info->flags & BLKTAP_DEVICE_FLAG_TRIM) { +@@ -575,7 +587,11 @@ blktap_device_create(struct blktap *tap, + (unsigned long long)get_capacity(gd), + rq->limits.discard_granularity, + queue_discard_alignment(rq), ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) + rq->flush_flags); ++#else ++ test_bit(QUEUE_FLAG_WC, rq->queue_flags)); ++#endif + + return 0; + diff -Nru blktap-dkms-2.0.93/debian/patches/series blktap-dkms-2.0.93/debian/patches/series --- blktap-dkms-2.0.93/debian/patches/series 2016-08-12 19:15:04.000000000 +0200 +++ blktap-dkms-2.0.93/debian/patches/series 2016-09-20 19:59:55.000000000 +0200 @@ -5,3 +5,4 @@ disallow_mempools_with_ctor.patch use-gfpflags_allow_blocking-when-available.patch follow-block_device_operations-release-return-void.patch +follow-4.8-blkdev-changes.patch