On 4/4/22 14:13, Damien Le Moal wrote:
On 4/4/22 14:09, Axel Beckert wrote:Hi Damien, Damien Le Moal wrote:My hunch is that this drive simply reacts badly to read log commands and should be marked with a horkage to blacklist that command for it.Hrm, do really mean drive or controller? If you really mean "drive", shall all who are affected by this send in all the affected HDD's details? (Taking Petra back into Cc for that.)I mean drive. Nothing new here. There are plenty of drives like that :)
Actually, there is a possibility that this is the controller that needs to have ATA_FLAG_NO_LOG_PAGE flag set. This is rare though. Only one controller has this flag today (sata_fsl).
Your tests using the sg_sat_read_gplog command showed that the drive or adapter definitely does not support READ LOG DMA EXT, so we can already add ATA_HORKAGE_NO_DMA_LOG for the "SAMSUNG HM160HC" drive.
If that is not enough, then we will need to add ATA_HORKAGE_NO_LOG_DIR which will disable all READ LOG EXT commands, or ATA_FLAG_NO_LOG_PAGE for the adapter. However, since running sg_sat_read_gplog did not seem to have locked up the adapter, I suspect the adapter itself is fine.
I think you already have mine, but just to be sure, here's the affected HDD's details: # fdisk -l /dev/sda Disk /dev/sda: 149.05 GiB, 160041885696 bytes, 312581808 sectors Disk model: SAMSUNG HM160HC Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000500cc […] # smartctl -i /dev/sda smartctl 7.2 2020-12-30 r5155 [i686-linux-5.15.0-3-686-pae] (local build)Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org=== START OF INFORMATION SECTION === Model Family: SAMSUNG SpinPoint M5 Device Model: SAMSUNG HM160HC Serial Number: S12TJD0SA62821 LU WWN Device Id: 5 0f0000 003162821 Firmware Version: LQ100-10 User Capacity: 160’041’885’696 bytes [160 GB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS, ATA/ATAPI-7 T13/1532D revision 0 Transport Type: Parallel, Unknown (0x00f) Local Time is: Mon Apr 4 07:02:54 2022 CEST SMART support is: Available - device has SMART capability. SMART support is: EnabledCleanups for read log handling in 5.15 actually now use that command to check accesses to any log page. Meaning that prior to 5.15, the command was not issued for that drive.I think you meant 5.16 in this paragraph. 5.15 works well. 5.16 is the one which no more works.Yes.I will send a patch to blacklist read log for that drive later today, to try. If that patch works, I will queue it and cc stable so that it gets backported.I assume this still requires recompilation as this blacklist is probably compiled into the kernel and not just a file in the initramfs.Correct. You will need to compile and install a kernel. Can you do that ? If you cannot, can someone from the Debian project provide a patched compiled kernel for testing ?Regards, Axel
-- Damien Le Moal Western Digital Research