All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Boszormenyi Zoltan <zboszor@pr.hu>, linux-ide@vger.kernel.org
Cc: Steve Tilden <stilden@sicom.com>
Subject: Re: Queued TRIM without NCQ support
Date: Sun, 18 Jan 2015 00:16:49 -0600	[thread overview]
Message-ID: <54BB4FD1.5000506@gmail.com> (raw)
In-Reply-To: <54AE6A90.7030704@pr.hu>

On 08/01/15 05:31 AM, Boszormenyi Zoltan wrote:
> Hi,
>
> I came across an SSD (Transcend SSD370) that I cannot
> successfully e2fsck/fstrim when connected to an SATA2 interface.
>
> The problem is:
>
> [80839.972834] ata9.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
> [80839.972845] ata9.00: failed command: DATA SET MANAGEMENT
> [80839.972855] ata9.00: cmd 06/01:01:00:00:00/00:00:00:00:00/a0 tag 8 dma 512 out
>           res 40/00:ff:16:62:86/00:00:00:00:00/40 Emask 0x4 (timeout)
> [80839.972861] ata9.00: status: { DRDY }
> [80839.972868] ata9: hard resetting link
> [80841.349941] ata9: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> [80841.382029] ata9.00: configured for UDMA/133
> [80841.382046] ata9: EH complete
>
> However, when connected to an SATA3 interface, both e2fsck and fstrim succeeds.
>
> The difference is below.
>
> Over SATA2:
>
> [80591.741191] ata9.00: ATA-9: TS64GSSD370, N0815B, max UDMA/133
> [80591.741199] ata9.00: 125045424 sectors, multi 1: LBA48
>
> Over SATA3:
>
> [83087.473254] ata5.00: ATA-9: TS64GSSD370, N0815B, max UDMA/133
> [83087.473267] ata5.00: 125045424 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
> [83087.473550] ata5.00: configured for UDMA/133
>
> So, the disk doesn't announce NCQ support over SATA2, only over SATA3.
> But e2fsck still wanted to use TRIM by default and the kernel thinks
> it's a good idea to send TRIM over NCQ when NCQ support is missing.

I don't think this is the issue, because if it was trying to use queued 
trim it would be sending SEND FPDMA QUEUED, not the DATA SET MANAGEMENT 
command. What kind of SATA2 interface are you using in this case, exactly?

> I had to use "e2fsck -E nodiscard" to format it in the SATA2 interface.
>
> Is it a kernel bug? Or possibly the disk announces queued TRIM support
> without NCQ and the kernel wants to exploit it?
>
> Please, reply-all, I am not subscribed to this list.
>
> Thanks in advance,
> Zoltán Böszörményi
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


  reply	other threads:[~2015-01-18  6:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 11:31 Queued TRIM without NCQ support Boszormenyi Zoltan
2015-01-18  6:16 ` Robert Hancock [this message]
2015-01-18  8:16   ` Boszormenyi Zoltan
2015-01-18 19:47     ` Robert Hancock
2015-01-18 20:10       ` Boszormenyi Zoltan

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=54BB4FD1.5000506@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=stilden@sicom.com \
    --cc=zboszor@pr.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.