From: Damien Le Moal <dlemoal@kernel.org>
To: eyal@eyal.emu.id.au, list linux-ide <linux-ide@vger.kernel.org>,
Niklas Cassel <cassel@kernel.org>
Subject: Re: ata timeout exceptions
Date: Wed, 17 Dec 2025 10:35:56 +0900 [thread overview]
Message-ID: <13bf2e98-1774-4444-bc56-38a39d539d8e@kernel.org> (raw)
In-Reply-To: <080383fe-63cf-4198-966a-b32d798bea06@eyal.emu.id.au>
On 12/17/25 08:39, Eyal Lebedinsky wrote:
> Resolved.
>
> Limiting disk access bandwidth (as suggested by Damien Le Moal <dlemoal@kernel.org>)
> # echo 1280 > /sys/block/sdX/queue/max_sectors_kb
> did the trick. No pauses/resets anymore for over a month.
We now have patches queued up to limit max_sectors_kb for devices and
controllers behaving badly. If you send us your device information (hdparm -I)
and controller info (PCI ID of your AHCI adapter), we can add a permanent quirk.
Though we would need to determine if is is the device or the adapter that is
mis-behaving, and also ideally, the command size at which things break.
We had another case with a device breaking above 4MiB commands. A quirk setting
max hw sectors to 8191 sectors solved the issue.
>
> Setting
> # echo 180 >/sys/block/sda/device/timeout
> did not help, only made the pauses longer before the reset.
>
> Thanks everyone.
> Eyal
>
> On 3/11/25 15:13, Eyal Lebedinsky wrote:
>> I have a sata disk that is probably on its last legs.
>> It is a plain disk (no RAID or such). If it matters, it is an old 8TB Seagate SMA disk.
>> It sees very little activity.
>>
>> Every two hours a small rsync copies a directory into this disk. A few 100s of files are copied each time, a few 10s of GB in total.
>>
>> For the last few weeks it started to log timeout errors (not always) like this:
>>
>> kernel: ata2.00: exception Emask 0x0 SAct 0x2020 SErr 0x0 action 0x6 frozen
>> kernel: ata2.00: failed command: WRITE FPDMA QUEUED
>> kernel: ata2.00: cmd 61/80:28:a0:10:df/00:00:d1:01:00/40 tag 5 ncq dma 65536 out
>> res 40/00:00:00:4f:c2/00:00:00:00:00/40 Emask 0x4 (timeout)
>> kernel: ata2.00: status: { DRDY }
>> kernel: ata2.00: failed command: WRITE FPDMA QUEUED
>> kernel: ata2.00: cmd 61/00:68:18:15:30/20:00:20:01:00/40 tag 13 ncq dma 4194304 out
>> res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
>> kernel: ata2.00: status: { DRDY }
>> kernel: ata2: hard resetting link
>> kernel: ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
>> kernel: ata2.00: configured for UDMA/133
>> kernel: ata2: EH complete
>
> [trimmed]
>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2025-12-17 1:36 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 4:13 ata timeout exceptions Eyal Lebedinsky
2025-11-09 20:40 ` Niklas Cassel
2025-11-09 22:41 ` Eyal Lebedinsky
2025-11-10 13:11 ` Niklas Cassel
2025-11-14 4:32 ` Eyal Lebedinsky
2025-11-18 15:17 ` Niklas Cassel
2025-11-18 23:05 ` Eyal Lebedinsky
2025-11-19 5:41 ` Damien Le Moal
2025-11-19 13:37 ` Eyal Lebedinsky
2025-11-20 3:34 ` Damien Le Moal
2025-11-20 11:38 ` Eyal Lebedinsky
2025-11-20 12:18 ` Damien Le Moal
2025-11-20 23:53 ` Eyal Lebedinsky
2025-12-16 23:39 ` Eyal Lebedinsky
2025-12-17 1:35 ` Damien Le Moal [this message]
2025-12-17 11:56 ` Eyal Lebedinsky
2025-12-17 12:02 ` Niklas Cassel
2025-12-20 4:03 ` Eyal Lebedinsky
2025-12-21 8:34 ` Damien Le Moal
2025-12-21 12:12 ` Eyal Lebedinsky
2025-12-21 22:43 ` Eyal Lebedinsky
2025-12-21 23:14 ` Damien Le Moal
2025-12-22 2:10 ` Eyal Lebedinsky
2025-12-22 3:43 ` Damien Le Moal
2025-12-22 5:57 ` Eyal Lebedinsky
2025-12-30 22:43 ` Eyal Lebedinsky
2026-01-02 1:21 ` Damien Le Moal
2026-01-02 6:30 ` Eyal Lebedinsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13bf2e98-1774-4444-bc56-38a39d539d8e@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=eyal@eyal.emu.id.au \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox