Package: blktap-dkms Version: 2.0.93-0.5 Severity: important Tags: patch User: a...@ubuntu.com Usertags: origin-ubuntu xenial ubuntu-patch
Mainline 4.4 switches how we detect atomicity. Follow that change when compiling against 4.4 based kernels. We are using this in Ubuntu with our latest kernels. Thanks for considering the patch. -apw -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (100, 'xenial-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-2-generic (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
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 2015-12-17 08:41:17.000000000 +0000 +++ blktap-dkms-2.0.93/debian/patches/series 2016-02-04 09:42:41.000000000 +0000 @@ -3,3 +3,4 @@ bi_sector-fix.patch mempool_resize.patch disallow_mempools_with_ctor.patch +use-gfpflags_allow_blocking-when-available.patch diff -Nru blktap-dkms-2.0.93/debian/patches/use-gfpflags_allow_blocking-when-available.patch blktap-dkms-2.0.93/debian/patches/use-gfpflags_allow_blocking-when-available.patch --- blktap-dkms-2.0.93/debian/patches/use-gfpflags_allow_blocking-when-available.patch 1970-01-01 01:00:00.000000000 +0100 +++ blktap-dkms-2.0.93/debian/patches/use-gfpflags_allow_blocking-when-available.patch 2016-01-22 15:26:56.000000000 +0000 @@ -0,0 +1,28 @@ +Description: use gfpflags_allow_blocking when available + Follow changes in mainline 4.4 which moves to using + gfpflags_allow_blocking() to identify critical sections. +Author: Andy Whitcroft <a...@ubuntu.com> + +--- blktap-dkms-2.0.93.orig/request.c ++++ blktap-dkms-2.0.93/request.c +@@ -26,6 +26,7 @@ + #include <linux/sched.h> + #include <linux/device.h> + #include <linux/slab.h> ++#include <linux/version.h> + + #include "blktap.h" + +@@ -338,8 +339,11 @@ static void* + __mempool_page_alloc(gfp_t gfp_mask, void *pool_data) + { + struct page *page; +- ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) + if (!(gfp_mask & __GFP_WAIT)) ++#else ++ if (!gfpflags_allow_blocking(gfp_mask)) ++#endif + return NULL; + + page = alloc_page(gfp_mask);