I/O Error Test 3
================
commit "bcache: fix inaccurate io state for detached bcache devices"
Probçem: on detached bcache devices, iostat reports non-zero 'avgqu-sz'
and '%util' even after IO stopped.
Original kernel: iostat fields are non-zero on I/O idle.
Modified kernel: iostat fields are all zero on I/O idle.
Original
--------
# uname -rv
4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019
# ./setup.sh >/dev/null 2>&1
[ 118.371172] bcache: register_bdev() registered backing device dm-0
[ 118.377221] bcache: run_cache_set() invalidating existing data
[ 118.386614] bcache: register_cache() registered cache device dm-1
[ 120.373682] bcache: bch_cached_dev_attach() Caching dm-0 as bcache0 on set
4f2b6518-1a58-42e0-8720-42b535cb826f
# lsblk -e 252
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 1G 0 loop
└─fake-loop0 253:0 0 1024M 0 dm
└─bcache0 251:0 0 1024M 0 disk
loop1 7:1 0 1G 0 loop
└─fake-loop1 253:1 0 1024M 0 dm
└─bcache0 251:0 0 1024M 0 disk
# echo 1 > /sys/block/bcache0/bcache/detach
[ 131.847360] bcache: cached_dev_detach_finish() Caching disabled for dm-0
# lsblk -e 252
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 1G 0 loop
└─fake-loop0 253:0 0 1024M 0 dm
└─bcache0 251:0 0 1024M 0 disk
loop1 7:1 0 1G 0 loop
└─fake-loop1 253:1 0 1024M 0 dm
# dd if=/dev/zero of=/dev/bcache0 bs=4k
dd: error writing '/dev/bcache0': No space left on device
262142+0 records in
262141+0 records out
1073729536 bytes (1.1 GB, 1.0 GiB) copied, 3.86316 s, 278 MB/s
# sync
# iostat -xy 1 10 /dev/bcache0 | grep bcache0
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 262224.00 0.00 0.00 0.00 100.00
Modified
--------
# uname -rv
4.15.0-55-generic #60+test20190703build1bcache1-Ubuntu SMP Wed Jul 3 21:41:37
UTC
# ./setup.sh >/dev/null 2>&1
[ 26.923296] bcache: register_bdev() registered backing device dm-0
[ 26.928998] bcache: run_cache_set() invalidating existing data
[ 26.940144] bcache: register_cache() registered cache device dm-1
[ 28.920772] bcache: bch_cached_dev_attach() Caching dm-0 as bcache0 on set
bf256397-22a4-40ac-8ff3-0026fd28354c
# lsblk -e 252
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 1G 0 loop
└─fake-loop0 253:0 0 1024M 0 dm
└─bcache0 251:0 0 1024M 0 disk
loop1 7:1 0 1G 0 loop
└─fake-loop1 253:1 0 1024M 0 dm
└─bcache0 251:0 0 1024M 0 disk
# echo 1 > /sys/block/bcache0/bcache/detach
[ 42.292538] bcache: cached_dev_detach_finish() Caching disabled for dm-0
# lsblk -e 252
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 1G 0 loop
└─fake-loop0 253:0 0 1024M 0 dm
└─bcache0 251:0 0 1024M 0 disk
loop1 7:1 0 1G 0 loop
└─fake-loop1 253:1 0 1024M 0 dm
# dd if=/dev/zero of=/dev/bcache0 bs=4k
dd: error writing '/dev/bcache0': No space left on device
262142+0 records in
262141+0 records out
1073729536 bytes (1.1 GB, 1.0 GiB) copied, 3.86123 s, 278 MB/s
# sync
# iostat -xy 1 10 /dev/bcache0 | grep bcache0
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
bcache0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1829563
Title:
bcache: risk of data loss on I/O errors in backing or caching devices
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1829563/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs