Using bcache can destroy the filesystem. Mine was gone after 3rd non sucesfull try to mount the rootfs. It was not possible to recover any file. (I had backups...) Another report on the bcache mailing list: https://www.spinics.net/lists/linux-bcache/msg05290.html I would sugest to mask it with a warning that there is an bcache issue.
thanks for the report
masked the package and searching for more informations
maybe no need to mask , 4.14.1 released !
Sent to stable list an hour ago: https://www.spinics.net/lists/stable/msg198707.html: Hi--- Previously sent to stable was this patch, and it's made it into Linus's tree for 4.16. It's a rather urgent data corruption issue that affects at minimum bcache but possibly other block subsystems. Several users have lost data. The issue was introduced in the 4.15 branch by 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index"). I'd really appreciate anything that can be done to get this into a stable 4.15 release soon. Thanks-- Mike + update (not yet indexed) I don't know what I was thinking here, but I meant 4.14/4.15 and not 4.15/4.16. :P Mike
Can you please try this patch? Probably a good candidate along with the 4.14.1 bump. commit 62530ed8b1d07a45dec94d46e521c0c6c2d476e6 Author: Michael Lyle <mlyle@lyle.org> Date: Thu Nov 16 23:47:25 2017 -0800 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 <mlyle@lyle.org> Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Reported-by: Pavel Goran <via-bcache@pvgoran.name> Reported-by: Campbell Steven <casteven@gmail.com> Reviewed-by: Coly Li <colyli@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Cc: <stable@vger.kernel.org> # 4.14 Signed-off-by: Jens Axboe <axboe@kernel.dk> diff --git a/block/bio.c b/block/bio.c index b94a802f8ba3..459cc857f3d9 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;
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=62530ed8b1d07a45dec94d46e521c0c6c2d476e6
(In reply to Tomáš Mózes from comment #6) > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/ > ?id=62530ed8b1d07a45dec94d46e521c0c6c2d476e6 Thanks for the info. I will add this patch and release with 4.14.1.
added in gentoo-sources-4.14.1
This bug affects sys-kernel/vanilla-sources-4.14.0 and sys-kernel/vanilla-sources-4.14.1 too.
you are right
masked as well
(In reply to Mike Pagano from comment #7) > (In reply to Tomáš Mózes from comment #6) > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/ > > ?id=62530ed8b1d07a45dec94d46e521c0c6c2d476e6 > > Thanks for the info. I will add this patch and release with 4.14.1. Thanks. It has been queued up for 4.14 already: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.14/bio-ensure-__bio_clone_fast-copies-bi_partno.patch
Masked: commit 3f3676066690d9a176a613f9779360b2030bb4a0 Author: Alice Ferrazzi <alicef@gentoo.org> Date: Tue Nov 21 12:33:45 2017 +0000 profiles: mask sys-kernel/vanilla-sources-4.14.1.ebuild (bug 638206) commit 1c37d6db7962c1a7db9c1ca63960ab2c8254894b Author: Alice Ferrazzi <alicef@gentoo.org> Date: Tue Nov 21 17:26:28 2017 +0900 profiles: mask sys-kernel/gentoo-sources-4.14.0 (bug 638206) Released new version with patch included: commit 0a8c30502306c781db8b2c973506e3c62da400e5 (HEAD -> master, origin/master, origin/HEAD) Author: Mike Pagano <mpagano@gentoo.org> Date: Tue Nov 21 07:47:51 2017 -0500 sys-kernel/gentoo-sources: Linux patch 4.14.1 including a fix for bcache data corruption bug. See bug #638206. Package-Manager: Portage-2.3.13, Repoman-2.3.3 I think we're done, right?
Thanks, it looks good indeed, should be fine :)
(In reply to bug2017 from comment #0) > Using bcache can destroy the filesystem. Mine was gone after 3rd non > sucesfull try to mount the rootfs. It was not possible to recover any file. > (I had backups...) > > Another report on the bcache mailing list: > https://www.spinics.net/lists/linux-bcache/msg05290.html > > I would sugest to mask it with a warning that there is an bcache issue. Can you please report back if it helped you? I don't use bcache and 4.14.0 works fine for me (except for one machine).
masked and removed affected kernel sys-kernel/vanilla-sources-4.14.0 sys-kernel/vanilla-sources-4.14.1 sys-kernel/gentoo-sources-4.14.0
masked ck-sources-4.14.0 waiting mainteiner for removal
Acknowledged. Thanks for the ping.
System is restored, about 170GB written, everything looks fine. (Btrfs scrub, reboot ...)
@bug2017 thanks for the follow up