Deterministic TRIM Proposal for ATA8-ACS2 T13/e08137r4

Deterministic TRIM Proposal for ATA8-ACS2

December 17, 2008

Revision 4

Technical Editor:

Curtis E. Stevens

20511 Lake Forest Dr.

Lake Forest, Ca. 92630

949-672-7933

Author: Fred Knight
7301 Kit Creek Rd
PO Box 13917
Research Triangle Park, NC 27709
919-476-5362

Email:


Document Status

Revision History (part of )
Rev / Date / Description
1 / October 18, 2008 / 1) Initial Revision
2 / October 23, 2008 / 1) Incorporate changes from the San Jose meeting.
3 / December 16, 2008 / 1)  Incorporate changes from the Santa Ana meeting.
4 / December 17, 2008 / 1)  Update to apply security requirements to both deterministic and non-deterministic read after trim.

1  Introduction

The e07154r6 proposal added the DATA_SET_MANAGEMENT command and the TRIM function.

That proposal creates non-deterministic read behavior. This is a problem that can lead to host problems the worst being possible data corruption. These issues are documented in:

http://www.t10.org/ftp/t10/document.08/08-347r1.pdf

In efforts to create the T10 SCSI command for this same function, and the translations (via SAT) from SCSI to ATA it became necessary for T13 devices to have a way for deterministic read behavior after TRIM.

2  Scope

This proposal introduces the concept of deterministic behavior of read after TRIM, and creates a mechanism for the host to determine when a device implements deterministic vs. non-deterministic behavior.

3  Overview

This proposal introduces a bit in the IDENTIFY DEVICE data to indicate the read after TRIM behavior type (deterministic vs. non-deterministic).

4  Changes to ACS

Table 29 changes (from e07154r6 5.3 & 5.4):

One reserved bit of the ATA-8 ACS IDENTIFY DEVICE word 119 is used by the device during device enumeration to indicate support. The chosen IDENTIFY DEVICE word would be augmented with the following description:

[TBD1] the DATA SET MANAGEMENT command is supported

Bit [0] when set to one indicates that the device supports the Trim bit of Data Set Management command.

Bit 15:1 = Reserved.

(from e07154r6 section 6):

X.X Data Set Management Ext – xxh, DMA

Editors Note: An additional reserved bit (14) of the ATA-8 ACS IDENTIFY DEVICE word 69 is used by the device during device enumeration to indicate that the DATA SET MANAGEMENT command supports determinate behavior.

If word 169 bit 0 is set to one and word 69 bit 14 is set to zero, the Trim function of the DATA SET MANAGEMENT command (see x.x) supports indeterminate behavior (see x.y). If word 169 bit 0 is set to one and word 69 bit 14 is set to one, the TRIM function of the DATA SET MANAGEMENT command supports determinate behavior (see x.y). If word 169 bit 0 is cleared to zero, then word 69 bit 14 is reserved.

Editors note: DCO – No changes. The deterministic read after TRIM is not changeable. If the device implements the TRIM bit of the Data Set Management command, then the device implements either deterministic read after TRIM or non-deterministic read after trim.

The following changes are made to the Data Set Management Command description (from e07154r6 6.2):

Trim

x.y:

When trim is set to one the data in the logical blocks specified by the DATA SET MANAGEMENT command’s output data then:

a)  If word 69 bit 14 of the IDENTIFY DEVICE data is set to one, then once a trimmed LBA has been read (e.g., a read command), the data in that logical block becomes determinate (i.e., all read commands to a logical block shall return the same data until a subsequent write command to that logical block successfully completes); or

b)  If word 69 bit 14 of the IDENTIFY DEVICE data is cleared to zero, then the data read is indeterminate.

The data read from an LBA that has been trimmed shall not be retrieved from data that was previously received from an application client addressed to any other LBA.

Once a trimmed LBA has been written (e.g., a write command or a SECURITY ERASE UNIT command), the data in that logical block becomes determinate (i.e., the logical block contains the written data).

Trim shall not add or remove LBAs from the NV Cache Pinned Set.

12/17/2008 Page 2