Thread (18 messages) 18 messages, 10 authors, 2014-12-08

Re: [PATCH 1/3] libata: Whitelist SSDs that are known to properly return zeroes after TRIM

From: Christoph Hellwig <hch@infradead.org>
Date: 2014-11-07 08:24:06
Also in: linux-fsdevel, linux-scsi

On Fri, Nov 07, 2014 at 12:08:12AM -0500, Martin K. Petersen wrote:
 		if (ata_id_has_trim(args->id)) {
-			rbuf[14] |= 0x80; /* TPE */
+			rbuf[14] |= 0x80; /* LBPME */
 
-			if (ata_id_has_zero_after_trim(args->id))
-				rbuf[14] |= 0x40; /* TPRZ */
+			if (ata_id_has_zero_after_trim(args->id) &&
+			    dev->horkage & ATA_HORKAGE_ZERO_AFTER_TRIM) {
+				ata_dev_warn(dev, "Enabling discard_zeroes_data\n");
I think this should _info, not _warn.

Otherwise looks good to me,

Reviewed-by: Christoph Hellwig <hch@lst.de>

It would be nice if there was a way to trigger the flag from userspace,
so that we don't need to rebuild the kernel to add a whitelist entry.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help