On Fri, Feb 21, 2025 at 05:08:21PM +0000, Philip Pemberton wrote: > On 21/02/2025 01:57, Niklas Cassel wrote: > > Please try this patch: > > https://lore.kernel.org/linux-ide/20250221015422.20687-2-cassel@xxxxxxxxxx/T/#u > > > > and see if it fixes your problem. > > > > Please also make sure to check that you can still write and read back what > > you wrote to the device (with the read data matching the written data). > > I can confirm the patch works! Thanks for testing, and thanks for actually taking the time to debug this! > Dump the original contents of the disk: > # ddrescue /dev/sdb zip_orig > GNU ddrescue 1.27 > Press Ctrl-C to interrupt > ipos: 100597 kB, non-trimmed: 0 B, current rate: 589 kB/s > opos: 100597 kB, non-scraped: 0 B, average rate: 792 kB/s > non-tried: 0 B, bad-sector: 0 B, error rate: 0 B/s > rescued: 100663 kB, bad areas: 0, run time: 2m 6s > pct rescued: 100.00%, read errors: 0, remaining time: n/a > time since last successful read: n/a > Copying non-tried blocks... Pass 1 (forwards) > Finished > > Create 100MB of randomness, write it to the disk: > # dd if=/dev/urandom of=ziptest bs=512 count=196608 > 196608+0 records in > 196608+0 records out > 100663296 bytes (101 MB, 96 MiB) copied, 2.74086 s, 36.7 MB/s > # dd if=ziptest of=/dev/sdb bs=512 > 196608+0 records in > 196608+0 records out > 100663296 bytes (101 MB, 96 MiB) copied, 226.022 s, 445 kB/s > > Read it back: > # ddrescue /dev/sdb ziptest_read > GNU ddrescue 1.27 > Press Ctrl-C to interrupt > ipos: 100597 kB, non-trimmed: 0 B, current rate: 196 kB/s > opos: 100597 kB, non-scraped: 0 B, average rate: 1059 kB/s > non-tried: 0 B, bad-sector: 0 B, error rate: 0 B/s > rescued: 100663 kB, bad areas: 0, run time: 1m 34s > pct rescued: 100.00%, read errors: 0, remaining time: n/a > time since last successful read: n/a > Copying non-tried blocks... Pass 1 (forwards) > Finished > > Compare: > # md5sum ziptest* > f132f7ad38beef40d45ce9f96a6e9f92 ziptest > f132f7ad38beef40d45ce9f96a6e9f92 ziptest_read Certainly good enough for me, I will add your Tested-by tag! Considering that this has been broken for 19 years, a few more weeks will be quick in comparison. I will queue it for 6.15 just to get some extra testing. Kind regards, Niklas