summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Gorski2018-12-06 00:04:33 +0100
committerPiotr Gorski2018-12-06 00:04:33 +0100
commitad73834ad82be47e8d6e1f0deb5cdabd3ed14235 (patch)
treee87d112e3769a19796d2d4d54eb041dd24ac6c2c
parent05742c9b9a11b6b70736d9e1ba8686419a01c819 (diff)
downloadaur-ad73834ad82be47e8d6e1f0deb5cdabd3ed14235.tar.gz
Bump to 4.19.7-1
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
-rw-r--r--.SRCINFO12
-rw-r--r--0002-blk-mq-fix-corruption-with-direct-issue.patch60
-rw-r--r--PKGBUILD12
3 files changed, 74 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0db5ab783139..4ce5e062014d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-uksm
- pkgver = 4.19.6
- pkgrel = 2
+ pkgver = 4.19.7
+ pkgrel = 1
url = https://github.com/dolohow/uksm
arch = x86_64
license = GPL2
@@ -11,8 +11,8 @@ pkgbase = linux-uksm
makedepends = python-sphinx
makedepends = graphviz
options = !strip
- source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.6.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.6.tar.sign
+ source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.7.tar.xz
+ source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.7.tar.sign
source = https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/master/enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch
source = https://raw.githubusercontent.com/dolohow/uksm/master/uksm-4.19.patch
source = config
@@ -21,8 +21,9 @@ pkgbase = linux-uksm
source = 99-linux.hook
source = linux.preset
source = 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
+ source = 0002-blk-mq-fix-corruption-with-direct-issue.patch
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
- sha512sums = 17e82e1d60cd8a3aa0b0ab1b58990919e3a14c2e011394ea568ed7ece2f504f7852bec8797dc3de99cf247fe4034bdd81bad8fe09152529edfae96dae45b7329
+ sha512sums = 794809e6a6b750594112f9686367e33fb09479cfdfcc4e8762b9b9d82f2aedcd439bf2222b806f7849d305889d4c31e801a4a05bca11335c11021a24c0aaa79e
sha512sums = SKIP
sha512sums = e62aa377a0acc4f63f394e27a0fb7316583ff1a6a6afdfcc97593ddffd7d2bc224cfd70b552cb3fb9513cf6b8db4c2fd913d21ec2380db8cd642e37d4d67370c
sha512sums = 81d52d3d9bf542c9bdd3024ef1a956804bfdfb1d9e321100caff76de96da8f0591a4fd843b00252ccc43b9c01441793b680eca4e25532472ef26d9b914dbe411
@@ -32,6 +33,7 @@ pkgbase = linux-uksm
sha512sums = 8742e2eed421e2f29850e18616f435536c12036ff793f5682a3a8c980cf5dbfc88d17fd9539c87de15d9e4663dc3190f964f18a4722940465437927b6052abbf
sha512sums = 2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf
sha512sums = 39c50e70d28ddaa2cca030f1050c3ead72d44d957a533d0d09a5a8b92d3743c5712fef1a60aacfcac8319346dd407247667e1c25a96cd2585e9d9b017ccd707c
+ sha512sums = aef8da49ccc4639f43c2a16d67c207417e26a1ee40d7a98aaa397038ef4a288b2361b951dcb2e1813df287041c482ab0e497fa161edafdc46446ab45311104dc
pkgname = linux-uksm
pkgdesc = The Linux-uksm kernel and modules with the UKSM
diff --git a/0002-blk-mq-fix-corruption-with-direct-issue.patch b/0002-blk-mq-fix-corruption-with-direct-issue.patch
new file mode 100644
index 000000000000..5ca4828bc1f9
--- /dev/null
+++ b/0002-blk-mq-fix-corruption-with-direct-issue.patch
@@ -0,0 +1,60 @@
+From 144c54b5c08cc1afc060281a79a9892e898337c6 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@kernel.dk>
+Date: Tue, 4 Dec 2018 15:47:46 -0700
+Subject: [PATCH 2/2] blk-mq: fix corruption with direct issue
+
+If we attempt a direct issue to a SCSI device, and it returns BUSY, then
+we queue the request up normally. However, the SCSI layer may have
+already setup SG tables etc for this particular command. If we later
+merge with this request, then the old tables are no longer valid. Once
+we issue the IO, we only read/write the original part of the request,
+not the new state of it.
+
+This causes data corruption, and is most often noticed with the file
+system complaining about the just read data being invalid:
+
+[ 235.934465] EXT4-fs error (device sda1): ext4_iget:4831: inode #7142: comm dpkg-query: bad extra_isize 24937 (inode size 256)
+
+because most of it is garbage...
+
+This doesn't happen from the normal issue path, as we will simply defer
+the request to the hardware queue dispatch list if we fail. Once it's on
+the dispatch list, we never merge with it.
+
+Fix this from the direct issue path by flagging the request as
+REQ_NOMERGE so we don't change the size of it before issue.
+
+See also:
+ https://bugzilla.kernel.org/show_bug.cgi?id=201685
+
+Fixes: 6ce3dd6eec1 ("blk-mq: issue directly if hw queue isn't busy in case of 'none'")
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Tested-by: Guenter Roeck <linux@roeck-us.net>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+---
+ block/blk-mq.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/block/blk-mq.c b/block/blk-mq.c
+index e3c39ea8e17b..66d64a13c50a 100644
+--- a/block/blk-mq.c
++++ b/block/blk-mq.c
+@@ -1698,6 +1698,15 @@ static blk_status_t __blk_mq_issue_directly(struct blk_mq_hw_ctx *hctx,
+ break;
+ case BLK_STS_RESOURCE:
+ case BLK_STS_DEV_RESOURCE:
++ /*
++ * If direct dispatch fails, we cannot allow any merging on
++ * this IO. Drivers (like SCSI) may have set up permanent state
++ * for this request, like SG tables and mappings, and if we
++ * merge to it later on then we'll still only do IO to the
++ * original part.
++ */
++ rq->cmd_flags |= REQ_NOMERGE;
++
+ blk_mq_update_dispatch_busy(hctx, true);
+ __blk_mq_requeue_request(rq);
+ break;
+--
+2.20.0.rc2.7.g965798d1f2
+
diff --git a/PKGBUILD b/PKGBUILD
index 68c065c504a7..a0cf5a8a3696 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -52,10 +52,10 @@ _1k_HZ_ticks=
pkgbase=linux-uksm
# pkgname=('linux-uksm' 'linux-uksm-headers' 'linux-uksm-docs')
_major=4.19
-_minor=6
+_minor=7
pkgver=${_major}.${_minor}
_srcname=linux-${pkgver}
-pkgrel=2
+pkgrel=1
arch=('x86_64')
url="https://github.com/dolohow/uksm"
license=('GPL2')
@@ -83,7 +83,8 @@ source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
'99-linux.hook'
# standard config files for mkinitcpio ramdisk
'linux.preset'
- '0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch')
+ '0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch'
+ '0002-blk-mq-fix-corruption-with-direct-issue.patch')
_kernelname=${pkgbase#linux}
: ${_kernelname:=-uksm}
@@ -379,7 +380,7 @@ for _p in "${pkgname[@]}"; do
}"
done
-sha512sums=('17e82e1d60cd8a3aa0b0ab1b58990919e3a14c2e011394ea568ed7ece2f504f7852bec8797dc3de99cf247fe4034bdd81bad8fe09152529edfae96dae45b7329'
+sha512sums=('794809e6a6b750594112f9686367e33fb09479cfdfcc4e8762b9b9d82f2aedcd439bf2222b806f7849d305889d4c31e801a4a05bca11335c11021a24c0aaa79e'
'SKIP'
'e62aa377a0acc4f63f394e27a0fb7316583ff1a6a6afdfcc97593ddffd7d2bc224cfd70b552cb3fb9513cf6b8db4c2fd913d21ec2380db8cd642e37d4d67370c'
'81d52d3d9bf542c9bdd3024ef1a956804bfdfb1d9e321100caff76de96da8f0591a4fd843b00252ccc43b9c01441793b680eca4e25532472ef26d9b914dbe411'
@@ -388,7 +389,8 @@ sha512sums=('17e82e1d60cd8a3aa0b0ab1b58990919e3a14c2e011394ea568ed7ece2f504f7852
'2718b58dbbb15063bacb2bde6489e5b3c59afac4c0e0435b97fe720d42c711b6bcba926f67a8687878bd51373c9cf3adb1915a11666d79ccb220bf36e0788ab7'
'8742e2eed421e2f29850e18616f435536c12036ff793f5682a3a8c980cf5dbfc88d17fd9539c87de15d9e4663dc3190f964f18a4722940465437927b6052abbf'
'2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
- '39c50e70d28ddaa2cca030f1050c3ead72d44d957a533d0d09a5a8b92d3743c5712fef1a60aacfcac8319346dd407247667e1c25a96cd2585e9d9b017ccd707c')
+ '39c50e70d28ddaa2cca030f1050c3ead72d44d957a533d0d09a5a8b92d3743c5712fef1a60aacfcac8319346dd407247667e1c25a96cd2585e9d9b017ccd707c'
+ 'aef8da49ccc4639f43c2a16d67c207417e26a1ee40d7a98aaa397038ef4a288b2361b951dcb2e1813df287041c482ab0e497fa161edafdc46446ab45311104dc')
validpgpkeys=(
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman