Bug 264139 - ata: NCQ_DSM_TRIM trim method for Seagate IronWolf 110 SATA SSD hangs drives
Summary: ata: NCQ_DSM_TRIM trim method for Seagate IronWolf 110 SATA SSD hangs drives
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.3-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2022-05-21 22:16 UTC by Alexey Koscheev
Modified: 2024-04-29 02:45 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (imp)
imp: mfc-stable13+


Attachments
messages.txt (6.14 KB, text/plain)
2022-05-21 22:16 UTC, Alexey Koscheev
no flags Details
camcontrol identify (2.17 KB, text/plain)
2022-05-22 08:37 UTC, Alexey Koscheev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Koscheev 2022-05-21 22:16:10 UTC
Created attachment 234095 [details]
messages.txt

I have ssd Seagate IronWolf 110 SATA SSD ZA1920NM10001.

smartctl -a output:

Model Family:     Seagate IronWolf 110 SATA SSD
Device Model:     ZA1920NM10001
Serial Number:    ***
LU WWN Device Id: 5 000c50 03ea095a7
Firmware Version: SF44011J
User Capacity:    1,920,383,410,176 bytes [1.92 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-4, ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun May 22 01:04:13 2022 MSK
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

By default kernel selects NCQ_DSM_TRIM as delete method for trim.
This leads to unstable work of drives (freezes).
Log messages are attached.

Workaround is: kern.cam.ada.X.delete_method=DSM_TRIM.

I suppose sys/cam/ata/ata_da.c need to be changed.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-05-22 01:59:10 UTC
Added (from what I can tell) in base 298002 by imp@ via https://reviews.freebsd.org/D4609 (request feedback)
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2022-05-22 02:01:07 UTC
@Reporter Does setting kern.cam.da.*.delete_method to alternative values suppress the behaviour?
Comment 3 Warner Losh freebsd_committer freebsd_triage 2022-05-22 05:05:24 UTC
Can you send camcontrol adaX identify and send the results so I can add a quirk?
Comment 4 Alexey Koscheev 2022-05-22 08:31:57 UTC
(In reply to Kubilay Kocak from comment #2)
Workaround is: kern.cam.ada.X.delete_method=DSM_TRIM.
Comment 5 Alexey Koscheev 2022-05-22 08:37:24 UTC
Created attachment 234108 [details]
camcontrol identify
Comment 6 Alexey Koscheev 2022-05-22 08:44:08 UTC
(In reply to Warner Losh from comment #3)
I added the attachment ("camcontrol identify").
Comment 7 Warner Losh freebsd_committer freebsd_triage 2023-01-01 21:32:47 UTC
Sorry for the delay. I'll try to get this committed before 13.next.
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-02-19 05:19:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a6cef617660a424fcaa8343787f96d0ae720a284

commit a6cef617660a424fcaa8343787f96d0ae720a284
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-02-19 05:10:55 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-02-19 05:18:38 +0000

    ada: Another NCQ Trim instability drive

    The Seagate IronWolf 110 SATA SSD drive has been reported to be unstable
    with NCQ trim enabled.

    PR: 264139
    Sponsored by:           Netflix

 sys/cam/ata/ata_da.c | 5 +++++
 1 file changed, 5 insertions(+)
Comment 9 Warner Losh freebsd_committer freebsd_triage 2024-02-19 05:30:54 UTC
Fixed in -current, will MFC to 14, 13 but it may be too late for 13.3.
Comment 10 Mark Linimon freebsd_committer freebsd_triage 2024-02-19 06:45:11 UTC
^Triage: 12.x is OBE.  I should have cleaned this up earlier.
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-03-12 04:52:29 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=47fff7407c22c2c4b36b4f9f27ddfa70bb8f3fee

commit 47fff7407c22c2c4b36b4f9f27ddfa70bb8f3fee
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-02-19 05:10:55 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-03-12 04:46:28 +0000

    ada: Another NCQ Trim instability drive

    The Seagate IronWolf 110 SATA SSD drive has been reported to be unstable
    with NCQ trim enabled.

    PR: 264139
    Sponsored by:           Netflix

    (cherry picked from commit a6cef617660a424fcaa8343787f96d0ae720a284)

 sys/cam/ata/ata_da.c | 5 +++++
 1 file changed, 5 insertions(+)
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-04-29 02:38:37 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=6063683eb83ad7f96850869ffe3d12c6db2dcbb9

commit 6063683eb83ad7f96850869ffe3d12c6db2dcbb9
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-04-29 02:34:51 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-04-29 02:35:12 +0000

    ada: Another NCQ Trim instability drive

    The Seagate IronWolf 110 SATA SSD drive has been reported to be unstable
    with NCQ trim enabled.

    PR: 264139
    Sponsored by:           Netflix

    (cherry picked from commit a6cef617660a424fcaa8343787f96d0ae720a284)

 sys/cam/ata/ata_da.c | 5 +++++
 1 file changed, 5 insertions(+)
Comment 13 Warner Losh freebsd_committer freebsd_triage 2024-04-29 02:45:31 UTC
All merged.