From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0BA1A1396D9 for ; Tue, 21 Nov 2017 11:34:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5466DE0E4B; Tue, 21 Nov 2017 11:34:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 25AC4E0E4B for ; Tue, 21 Nov 2017 11:34:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9005C340806 for ; Tue, 21 Nov 2017 11:34:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 33B4CA26C for ; Tue, 21 Nov 2017 11:34:13 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1511264042.e643729a50271d73aebedf7166075449cb64403a.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:4.14 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 2100_bcache-data-corruption-fix-for-bi-partno.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: e643729a50271d73aebedf7166075449cb64403a X-VCS-Branch: 4.14 Date: Tue, 21 Nov 2017 11:34:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b62cb8aa-05cd-40e8-9b76-161153f1c12a X-Archives-Hash: c6550f746c45b6f19905a77d9f5d214a commit: e643729a50271d73aebedf7166075449cb64403a Author: Mike Pagano gentoo org> AuthorDate: Tue Nov 21 11:34:02 2017 +0000 Commit: Mike Pagano gentoo org> CommitDate: Tue Nov 21 11:34:02 2017 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e643729a Add fix for bcache data corruption bug. See bug #638206. 0000_README | 4 +++ ..._bcache-data-corruption-fix-for-bi-partno.patch | 38 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/0000_README b/0000_README index a8d45fc..5bfe726 100644 --- a/0000_README +++ b/0000_README @@ -55,6 +55,10 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. +Patch: 2100_bcache-data-corruption-fix-for-bi-partno.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=62530ed8b1d07a45dec94d46e521c0c6c2d476e6 +Desc: bio: ensure __bio_clone_fast copies bi_partno. + Patch: 2300_enable-poweroff-on-Mac-Pro-11.patch From: http://kernel.ubuntu.com/git/ubuntu/ubuntu-xenial.git/patch/drivers/pci/quirks.c?id=5080ff61a438f3dd80b88b423e1a20791d8a774c Desc: Workaround to enable poweroff on Mac Pro 11. See bug #601964. diff --git a/2100_bcache-data-corruption-fix-for-bi-partno.patch b/2100_bcache-data-corruption-fix-for-bi-partno.patch new file mode 100644 index 0000000..dd4aed6 --- /dev/null +++ b/2100_bcache-data-corruption-fix-for-bi-partno.patch @@ -0,0 +1,38 @@ +From 62530ed8b1d07a45dec94d46e521c0c6c2d476e6 Mon Sep 17 00:00:00 2001 +From: Michael Lyle +Date: Thu, 16 Nov 2017 23:47:25 -0800 +Subject: bio: ensure __bio_clone_fast copies bi_partno + +A new field was introduced in 74d46992e0d9, bi_partno, instead of using +bdev->bd_contains and encoding the partition information in the bi_bdev +field. __bio_clone_fast was changed to copy the disk information, but +not the partition information. At minimum, this regressed bcache and +caused data corruption. + +Signed-off-by: Michael Lyle +Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") +Reported-by: Pavel Goran +Reported-by: Campbell Steven +Reviewed-by: Coly Li +Reviewed-by: Ming Lei +Cc: # 4.14 +Signed-off-by: Jens Axboe +--- + block/bio.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/block/bio.c b/block/bio.c +index b94a802..459cc85 100644 +--- a/block/bio.c ++++ b/block/bio.c +@@ -597,6 +597,7 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src) + * so we don't set nor calculate new physical/hw segment counts here + */ + bio->bi_disk = bio_src->bi_disk; ++ bio->bi_partno = bio_src->bi_partno; + bio_set_flag(bio, BIO_CLONED); + bio->bi_opf = bio_src->bi_opf; + bio->bi_write_hint = bio_src->bi_write_hint; +-- +cgit v1.1 +