Tests with I/O errors ===================== The I/O error tests in the caching and backing device have been simulated with the device mapper dm-linear and dm-error targets.
The tests are based on the patch messages, which describe a problem and/or expected behavior, so to exercise the change. Comparisons/comments between the original & modified/test kernels are provided in the next comments. The test script initially sets up fake DM devices in 'good' state with the linear target, and later can switch them to 'bad' state with the error target, and back again. (attached script: 'dm_fake_dev.sh') The bcache setup uses the DM devices above (for caching and backing devices) on top of loop devices in a virtual machine for flexibility. (attached script: 'setup.sh') One test uses a scsi-debug SCSI disk as backing device to offline it. (attached script: 'setup-sda.sh') One test uses 2 bcache devices with 1 shared cache device to ensure only one bcache device is stopped if 1 backing device has failures. (attached script: 'setup-two-bcache-one-cache.sh') -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1829563 Title: bcache: risk of data loss on I/O errors in backing or caching devices Status in linux package in Ubuntu: Invalid Status in linux source package in Bionic: In Progress Status in linux source package in Cosmic: In Progress Bug description: [Impact] * The bcache code in Bionic lacks several fixes to handle I/O errors in both backing devices and caching devices. * Partial or permanent errors in backing or caching devices, specially in writeback mode, can lead to data loss and/or the application is not notified about failed I/O requests. * The bcache device might remain available for I/O requests even if backing device is offline, so writes are undefined. [Test Case] * Detailed test cases/steps for the behavior of almost every patch with code logic changes are provided in bug comments. * The patchset has been tested for regressions on each cache mode (writethrough, writeback, writearound, none) with the xfstests test suite (on ext4), fio (random read-write) and iozone (several read/write tests). [Regression Potential] * The patchset is relatively large and touches several areas in bcache code, however, synthetic testing of the patches has been performed, and extensive regression/stress tests were run (as mentioned in Test Case section). * Many patches in the patchset are 'Fixes' patches to other patches, and no further 'Fixes' currently exist upstream. [Other Info] * Canonical Field Eng. deploys bcache+writeback extensively (e.g., BootStack, UA cloud, except rare all-flash cases). [Original Bug Description] This is a request for a backport of the following upstream patch from 4.18: "bcache: stop bcache device when backing device is offline" https://github.com/torvalds/linux/commit/0f0709e6bfc3ce4e8e1c0e8573490c45f76cfeee Field engineering uses bcache quite extensively and it would be good to have this in the GA/bionic kernel. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1829563/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp