Re: blktests dm/002 always fails for me
From: "hch@infradead.org" <hch@infradead.org>
Date: 2024-06-24 11:46:54
Also in:
dm-devel
On Mon, Jun 24, 2024 at 11:21:33AM +0000, Shinichiro Kawasaki wrote:
I took a look in the test script and dm-dust code again, and now I think the dd command is expected to success. The added bad blocks have default wr_fail_cnt value 0, then write error should not happen for the dd command. (Bryan, if this understanding is wrong, please let me know.) So the error log that Christoph observes indicates that the dd command failed, and this failure is unexpected. I can not think of any cause of the failure.
Yes, it does indeed fail, this is 002.full with your patch: dd: error writing '/dev/mapper/dust1': Invalid argument 1+0 records in 0+0 records out 0 bytes copied, 0.000373943 s, 0.0 kB/s
Christoph, may I ask you to share the kernel messages during the test run? Also, I would like to check the dd command output. The one liner patch below to the blktests will create resutls/vdb/dm/002.full with the dd output.
the relevant lines of dmesg output below: [ 57.773967] run blktests dm/002 at 2024-06-24 11:43:53 [ 57.791251] I/O error, dev vdb, sector 774 op 0x0:(READ) flags 0x80700 phys_seg 250 prio class 0 [ 57.791849] I/O error, dev vdb, sector 520 op 0x0:(READ) flags 0x84700 phys_seg 254 prio class 0 [ 57.792420] I/O error, dev vdb, sector 520 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.792805] I/O error, dev vdb, sector 521 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.793190] I/O error, dev vdb, sector 522 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.793578] I/O error, dev vdb, sector 523 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.793955] I/O error, dev vdb, sector 524 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.794318] I/O error, dev vdb, sector 525 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.794700] I/O error, dev vdb, sector 526 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.795130] I/O error, dev vdb, sector 527 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 57.795516] Buffer I/O error on dev dm-0, logical block 65, async page read [ 57.800743] device-mapper: dust: dust_add_block: badblock added at block 60 with write fail count 0 [ 57.802587] device-mapper: dust: dust_add_block: badblock added at block 67 with write fail count 0 [ 57.804359] device-mapper: dust: dust_add_block: badblock added at block 72 with write fail count 0 [ 57.811253] device-mapper: dust: dust_add_block: badblock added at block 60 with write fail count 0 [ 57.813065] device-mapper: dust: dust_add_block: badblock added at block 67 with write fail count 0 [ 57.814786] device-mapper: dust: dust_add_block: badblock added at block 72 with write fail count 0 [ 57.818023] device-mapper: dust: enabling read failures on bad sectors [ 57.826500] Buffer I/O error on dev dm-0, logical block 8, async page read