linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: Whitelist SSDs that are known to properly return zeroes after TRIM
Date: Wed, 10 Dec 2014 23:34:39 +0300	[thread overview]
Message-ID: <1418243679.8310.13.camel@HansenPartnership.com> (raw)
In-Reply-To: <20141210142927.GA6294@htj.dyndns.org>

On Wed, 2014-12-10 at 09:29 -0500, Tejun Heo wrote:
> Hello,
> 
> On Wed, Dec 10, 2014 at 07:09:38AM +0300, James Bottomley wrote:
> > Conversely, drives that return random junk after a trim cause
> > verification failures, so we just elect not to transmit trim down to
> > them from the RAID layer.
> 
> I see.  Thanks for the explanation.  I suppose the current raid
> implementations' metadata handling on partially built devices isn't
> developed enough to simply mark those trimmed blocks as unsynced?

We do have a log, which could be used for RAID-1 for this purpose, but
it doesn't seem to be much used in practise.  It takes extra space which
most admins don't account for.

For RAID-2+ or erasure codes this won't work because a bad block read
corrupts the stripe: the really subtle failure here is that you trim a
stripe and then partially write it, the RMW you do for parity will be an
incorrect partial syndrome because it's based on junk rather than the
syndrome of the other blocks and the corruption wouldn't be detected
until you get an actual disk failure (meaning everything will look fine
until that crucial day you need your data protection mechanism to work).
We could cope with this with an even more subtle logging mechanism,
where we only trim stripes and then log trimmed stripes and insist on
full instead of partial writes so we get back to a known syndrome, but
that's introducing a lot of subtlety into the logging code ...

James



  reply	other threads:[~2014-12-10 20:34 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04  2:44 [PATCH] libata: Whitelist SSDs that are known to properly return zeroes after TRIM Martin K. Petersen
2014-12-04  3:02 ` Phillip Susi
2014-12-04  3:24   ` Martin K. Petersen
2014-12-04  3:28     ` Phillip Susi
2014-12-04  3:35       ` Martin K. Petersen
2014-12-04  4:40         ` Phillip Susi
2014-12-05  1:53           ` Martin K. Petersen
2014-12-04 21:49         ` One Thousand Gnomes
2014-12-05  2:46           ` Martin K. Petersen
2014-12-04 17:06 ` Tejun Heo
2014-12-05  2:13   ` Martin K. Petersen
2014-12-05 14:51     ` Tejun Heo
2014-12-10  4:09       ` James Bottomley
2014-12-10 14:29         ` Tejun Heo
2014-12-10 20:34           ` James Bottomley [this message]
2014-12-10 21:02           ` Martin K. Petersen
2014-12-12  8:35             ` Ming Lei
2015-01-05 16:28             ` Tejun Heo
2015-01-07  0:05               ` Martin K. Petersen
2015-01-07  2:54                 ` Tejun Heo
2015-01-07  4:15                   ` Dave Chinner
2015-01-07 15:26                     ` Tejun Heo
2015-01-08 14:28                       ` Martin K. Petersen
2015-01-08 15:11                         ` Tejun Heo
2015-01-08 15:34                           ` Martin K. Petersen
2015-01-08 15:36                             ` Tejun Heo
2015-01-08 15:58                         ` Tim Small
2015-01-09 20:52                           ` Martin K. Petersen
2015-01-09 21:39                             ` Tejun Heo
2015-01-08 14:29                       ` Martin K. Petersen
2015-01-08  4:05                     ` Phillip Susi
2015-01-08  4:58                       ` Andreas Dilger
2015-01-08 14:09                         ` Phillip Susi
2015-01-08 22:31                           ` Andreas Dilger
2014-12-10 15:43         ` Tim Small

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=1418243679.8310.13.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).