AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements...

20
T13/f16123 Revision 6 8/14/16 Repurposing Depopulation August 14, 2016 Revision 6 Toshiba Technical Editors: Joe Breher Western Digital [email protected] +1 (478) 227-3437 Jim Hatfield 389 Disc Drive Longmont, CO 80503 720-684-2120 [email protected] Mark Carlson Principal Engineer, Industry Standards Toshiba [email protected] 303-720-6139

Transcript of AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements...

Page 1: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

T13/f16123 Revision 6 8/14/16

Repurposing Depopulation

August 14, 2016

Revision 6

Toshiba

Technical Editors:Joe BreherWestern [email protected]+1 (478) 227-3437

Jim Hatfield389 Disc DriveLongmont, CO [email protected]

Mark CarlsonPrincipal Engineer, Industry [email protected]

Page 2: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 2

Document Status

Revision History

Rev Date Description

0 2016 Apr 19 Initial revision

1 2016 Apr 26 Incorporated comments from plenary meeting of 2016 Apr 19

2 2016 Jul 20 Incorporated comments from net meeting of 2016 Apr 27:Simplified feature set hierarchyEliminated explicit support/enable in deference to command supportNew names for models: Repurposing Depopulation & Data Preserving DepopulationNew command name: REMOVE ELEMENT AND TRUNCATEFound more subelements, removed element type from logAdded model text for notificationStarted interactions with agreed infoEmbryonic test description - mostly agreed concepts in notes, test bit in logChanged from capacity centric to max address centricCollapsed command/subcommand to flat structureMany wording fixes

3 2016 Apr 04 Incorporated comments from net meeting of 2016 Jul 22:Renamed proposal to match feature name of Repurposing Depopulation.Require Sense Data Reporting enabled and sticky.Mandate that block size, offset unchanged by command.Added table to commands allowed under security.Updated note on agreed principles for test.Move statement that multiple successive REMOVE ELEMENT AND TRUNCATE commands are allowed and cumulative from command to model.Set device fault if failed command leaves device in inconsistent state.Many wording fixes.Imported Rebuild Assist material from ACS-4 (4.16(.x) and 9.19(.x)):Changed ‘physical element’ to ‘storage element’.Add RA RD CORR bit to Rebuild Assist log.Extend size of Rebuild Assist log.Host should read DISABLED STORAGE ELEMENTS MASK before writing it.Abort upon attempt to write unsupportable mask bit.

4 2016 Apr 05 Rebaselined change tracking in portions of doc that have entirely new text re: ACS-4

5 2016 Apr 06 Cleaned up vestigial remnants missed in r3 to r4 transition.

6 2016 Aug 12 Comments from webex of 2016 Aug 05:FORMAT CORRUPT instead of Device FaultText mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchyRemove vestigial references to Data Preserving Depopulation feature setIn status change notification subclause, reference Sense Data Reporting feature textReword ‘indeterminate user data’ based on clone from sanitizeInteractions with caches cloned from Sanitize DeviceRemove ABORT bit - instead reference deferred error to unspecified commandDefine variables used in offset calculations for fields in Rebuild Assist logCloned definition of ‘unused’ descriptorsPorted Rebuild Assist bitmask requirement from SATA 3.3 omitted from ACS-4 Wording fixesNew unreviewed material:Added entry for Physical Element Status log in table listing logsAdded command to supported capabilitiesStrawman list of logs invalidated by Depopulation

Page 3: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 3

I – Introduction

A significant performance problem exists in storage systems where data is spread across multiple drives when one of the drives takes an inordinate amount of time to respond compared to the others. The host software may already have sufficient information to respond to the users request due to erasure coding or replication but the request ends up taking as long as the slowest drive. Known as a "long tail" of performance, many use cases will then mark these slow drives as "failed" and remove them from service, requiring replacement.

Repurposing Depopulation is meant to address this use case and allow returning a reduced capacity drive to service with the slow physical elements of the drive removed from the logical address space as a result. With many software defined storage solutions, this reformatted, empty drive can now be rewritten over time with new data. This proposal is not intended to meet the use case of a drive used in a RAID stripe set where rebuilding of the drive could be accelerated by retaining the data on the physical elements that were not depopulated.

Many storage devices are implemented employing multiple subunits, each of which provide some amount of storage resources. The entire capacity of the storage device is the sum of the capacity of each of these subunits (i.e. physical storage elements). Such devices may experience failure of some subset of these physical elements. The failure of some subset of physical elements may not fundamentally preclude operation of the remainder of the device.

This proposal defines application layer constructs for the management of such a device’s ability to operate in a reduced-capacity manner, as an alternative to total device replacement. Among the constructs comprising this management mechanism are:

a) a signal from device to host that a physical element may be degraded;b) a means of the host querying the status of all physical elements within the device; andc) a command by which a host may specify that the device shall ’offline’ a specified physical storage

element.

Upon being directed by the host to ’offline’ a physical element, the device:

1) makes the physical storage element ineligible for storage of user data;2) reduces the reported capacity of the device to reflect the storage within those physical storage elements

still valid; and3) may initialize the device to that capacity.

II – Scope

This proposal is written against ACS-4 revision 12.

III – Change marking conventions

Unless otherwise indicated additions are shown in blue, deletions in red strikethrough, and comments in green.

IV – Changes to ACS-4

Page 4: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 4

3 Definitions, abbreviations, and conventions

Editor’s Note 1: This clause contains items that are new to ACS-4. As such, edit markers denote text changes since rev 3.

3.1 Definitions

3.1.90 depopulateprocess by which a device removes the capability of a storage element to store logical block data

3.1.91 depopulatedproperty associated with a physical element that results in the element being unable to store user data

3.1.92 LBA mapping resourceresource (e.g., a physical block or a data structure associated with tracking resource usage) that enables storage upon media

3.1.93 physical elementsubcomponent of a physical entity that implements an ATA device

3.1.94 storage elementphysical element that provides non-volatile storage for an associated group of logical blocks (see 4.16)

3.1.95 truncate funcitonprocess by which a device reduces its native capacity

Page 5: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 5

4 Feature set definitions

4.1 Overview

4.1.1 Feature set summary

Table 1 lists the feature sets in alphabetical order and shows whether a feature set is mandatory, optional, or prohibited for ATA devices.

Table 1 — Feature set summary

Feature setATA

devices

48-bit Address feature set (see 4.3) O

Accessible Max Address Configuration feature set (see 4.4) O

Advanced Power Management (APM) feature set (see 4.5) O

CompactFlash Association (CFA) feature set (see 4.6) O

Device Statistics Notifications (DSN) feature set (see 4.7) O

Extended Power Conditions (EPC) feature set (see 4.8) O

Free-fall Control feature set (see 4.9) O

General feature set (see 4.2) M

General Purpose Logging (GPL) feature set (see 4.10) M

Long Logical Sector (LLS) feature set (see 4.11) O

Long Physical Sector (LPS) feature set (see 4.12) O

Native Command Queuing (NCQ) feature set (see 4.13) O

Repurposing Depopulation feature set (see 4.99.3) O

PACKET feature set (see ACS-3) P

Power Management feature set (see 4.14) M

Power-Up In Standby (PUIS) feature set (see 4.15) O

Rebuild Assist feature set (see 4.16) O

Sanitize Device feature set (see 4.17) O

SATA Hardware Feature Control feature set (see 4.22) O

Security feature set (see 4.18) O

Self-Monitoring, Analysis, and Reporting Technology (SMART) feature set (see 4.19) O

Sense Data Reporting feature set (see 4.20) O

Software Settings Preservation (SSP) feature set (see 4.21) O

Streaming feature set (see 4.23) O

Trusted Computing feature set (see 4.24) O

Write-Read-Verify feature set (see 4.25) O

Key: M – Mandatory, O – Optional, P – Prohibited

4.16 Rebuild Assist feature set

Editor’s Note 2: The Rebuild Assist feature set 4.16(.x.y.z) is text existing within ACS-4. Change tracking denotes changes required to make this feature and Repurposing Depopulation congruent.

Page 6: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 6

4.16.1 Overview

The Rebuild Assist feature allows a host that is processing a storage array rebuild to determine which logical blocks on the failed device are unreadable without having to read every LBA (i.e., the read command is terminated with an error and failed LBA information is reported in the sense data). This information may be used to reconstruct the failed logical blocks.

Enabling the Rebuild Assist feature set (see 4.16.2):

a) allows the NCQ Command Error log (see 9.14) to indicate the location of multiple failing LBAs on READ FPDMA QUEUED commands (see 7.21) and WRITE FPDMA QUEUED commands (see 7.57);

b) may cause the device to initiate a self test to identify the scope of failures, if any; andc) modifies read command recovery behavior based on the setting of the RARC bit (see 7.21.3.4).

As a result of processing a power on reset, the Rebuild Assist feature set shall be disabled (i.e., the REBUILD ASSIST ENABLED bit shall be cleared to zero (see 9.11.10.3.11). All other resets shall not affect the Rebuild Assist feature set.

If the Rebuild Assist feature set is supported (i.e., the REBUILD ASSIST SUPPORTED bit is set to one (see 9.11.10.2.26)), then the device shall support the NCQ Autosense feature.

Self-test operations (see ACS-3) performed while the Rebuild Assist feature set is enabled may result in detection of failed physicalstorage elements.

A predicted unrecovered error (see 4.16.3.3 and 4.16.3.5) is an unrecovered error that is the result of an attempt to access an LBA associated with a failed physicalstorage element.

An unpredicted unrecovered error (see 4.16.3.2 and 4.16.3.4) is an unrecovered error that is the result of accessing an LBA that is not associated with a failed physicalstorage element.

4.16.2 Enabling the Rebuild Assist feature set

If the host writes to the Rebuild Assist log (see 9.19) and sets the MANAGE REBUILD ASSIST bit to one (see 9.19.2), then:

a) the device may initiate a self test of the physicalstorage elements contained within the device and should disable any physicalstorage elements that are not functioning correctly;

b) the device shall initialize the DISABLED PHYSICALSTORAGE ELEMENTS field (see 9.19.5) based on the results of a self-test;

c) the device shall minimize device-initiated background activities; andd) the device shall enable the Rebuild Assist feature set.

The host may verify that Rebuild Assist feature set is enabled by reading:

a) reading the Rebuild Assist log and verifying that the MANAGE REBUILD ASSIST bit is set to one; orb) reading the Serial ATA page of the IDENTIFY DEVICE Data log (see 9.11.10) and verifying that the

REBUILD ASSIST ENABLED bit is set to one.

4.16.3 Using the Rebuild Assist feature set

4.16.3.1 Overview

If the Rebuild Assist feature set is enabled, the host should send READ FPDMA QUEUED commands (see 7.21) to read the available data from the device. If a READ FPDMA QUEUED command does not detect an unrecovered error, the command should complete without error.

The Rebuild Assist feature set allows reporting of an unrecovered read error or an unrecovered write error that is:

a) a predicted unrecovered error (see 4.16.3.3 and 4.16.3.5); orb) an unpredicted unrecovered error (see 4.16.3.2 and 4.16.3.4).

If a device processes a READ FPDMA QUEUED command with the RARC bit set to one, Rebuild Assist feature set shall not affect processing of that READ FPDMA QUEUED command.

Page 7: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 7

4.16.3.2 Unpredicted unrecovered read error processing

If the device processes a READ FPDMA QUEUED command with the RARC bit cleared to zero (see 7.21.3.4) and detects an unpredicted unrecovered error, then the device:

a) performs limited read recovery that is vendor specific;b) transfers the data for all recovered logical blocks, if any, from the starting LBA of the failed READ

FPDMA QUEUED command up to the unrecovered logical block;c) shall terminate the READ FPDMA QUEUED command with an error, with the following information in the

NCQ Command Error log (see 9.14):A) the sense key shall be set to MEDIUM ERROR (see SPC-4);B) the additional sense code shall be set to UNRECOVERED READ ERROR (see SPC-4); andC) the LBA field shall be set to the LBA of the first unrecovered logical block;and

d) may use this failure in a vendor specific manner to predict other logical blocks that may be unrecovered.

If the host receives sense data with sense key set to MEDIUM ERROR and additional sense code set to UNRECOVERED READ ERROR, then the host should issue the next read command with the starting LBA set to the contents of the FINAL LBA IN ERROR field plus one.

4.16.3.3 Predicted unrecovered read error processing

If the device processes a READ FPDMA QUEUED command with the RARC bit cleared to zero (see 7.21.3.4) and detects a predicted unrecovered error, then the device:

a) performs limited read recovery that is vendor specific;b) transfers the data for all recovered logical blocks, if any, from the starting LBA of the failed READ

FPDMA QUEUED command up to the first unrecovered logical block; andc) shall terminate the READ FPDMA QUEUED command with an error, with the following information in the

NCQ Command Error log (see 9.14):A) the sense key shall be set to ABORTED COMMAND (see SPC-4);B) the additional sense code shall be set to MULTIPLE READ ERRORS (see SPC-4);C) the LBA field shall be set to the LBA of the first unrecovered logical block; andD) the FINAL LBA IN ERROR field shall be set to the LBA of the last predicted unrecovered logical block

in a sequence of contiguous unrecovered logical blocks that starts with the first LBA in error.

If the host receives sense data with sense key set to ABORTED COMMAND and additional sense code set to MULTIPLE READ ERRORS, then the host should issue the next read command with the starting LBA set to the contents of the FINAL LBA IN ERROR field plus one.

4.16.3.4 Unpredicted unrecovered write error processing

If the device encounters an unpredicted unrecovered error on a write command that is not the WRITE FPDMA QUEUED command, then the device shall terminate the command with an error.

If the device encounters an unpredicted unrecovered error on a WRITE FPDMA QUEUED command, the device shall terminate the command with an error, with the following information recorded in the NCQ Command Error log (see 9.14):

a) the sense key shall be set to MEDIUM ERROR (see SPC-4);b) the additional sense code shall be set to WRITE ERROR (see SPC-4); andc) the LBA field shall be set to the LBA of the first unrecovered logical block.

4.16.3.5 Predicted unrecovered write error processing

If the device encounters a predicted unrecovered error on a write command that is not the WRITE FPDMA QUEUED command, then the device shall terminate the command with an error.

If the device encounters a predicted unrecovered error on a WRITE FPDMA QUEUED, the device shall terminate the command with an error, with the following information recorded in the NCQ Command Error log (see 9.14):

a) the sense key shall be set to ABORTED COMMAND (see SPC-4);b) the additional sense code shall be set to MULTIPLE WRITE ERRORS (see SPC-4);

Page 8: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 8

c) the LBA field shall be set to the LBA of the first unrecovered logical block; andd) the FINAL LBA IN ERROR field shall be set to the LBA of the last predicted unrecovered logical block in a

sequence of contiguous unrecovered logical blocks that started with the first LBA in error.

If the host receives sense data with sense key set to ABORTED COMMAND and additional sense code set to MULTIPLE WRITE ERRORS, then the host should issue the next write command with the starting LBA set to the contents of the FINAL LBA IN ERROR field plus one.

4.16.4 Disabling the Rebuild Assist feature set

The Rebuild Assist feature set shall be disabled if:

a) the device processes a power-on reset; orb) the device processes a command that writes to the Rebuild Assist log (see 9.19) with the MANAGE

REBUILD ASSIST bit cleared to zero (see 9.19.2).

4.16.5 Testing the Rebuild Assist feature set

The Rebuild Assist log (see 9.19) provides a method to test the host's rebuild process.

A device is requested to simulate a failing condition by writing to the Rebuild Assist log with the MANAGE REBUILD ASSIST bit set to one (see 9.19.2) and the DISABLED PHYSICALSTORAGE ELEMENTS field with one or more bits set to one (see 9.19.5). The host may write to the Rebuild Assist log more than once to simulate additional failing physicalstorage elements.

Each bit in the DISABLED PHYSICALSTORAGE ELEMENTS field represents a physicalstorage element that is associated with a group of LBAs that are treated as predicted unrecovered read errors and predicted unrecovered write errors. The correlation of bits in the DISABLED PHYSICALSTORAGE ELEMENTS field to LBAs in the device is vendor specific.

To end this test, the host should disable the Rebuild Assist feature set (see 4.16.4).

Editor’s Note 3: intervening existing text elided

4.18.11.2 Security command actions

Table 2 describes the effect of the security state on commands.

Table 2 — Security Command Actions

Command a Locked b Unlocked or Disabled c Frozen d

... ... ... ...

REMOVE ELEMENT AND TRUNCATE Command aborted Executable Executable

... ... ... ...a All commands not listed in this table are not addressed by the Security feature set.b Locked indicates that the device is in the SEC4: Security Enabled/Locked/Not Frozen state (see 4.18.11.8).c Unlocked or disabled indicates that the device is in the SEC1: Security Disabled/Not Locked/Not Frozen

state (see 4.18.11.5) or the SEC5: Security Enabled/Not Locked/Not Frozen state (see 4.18.11.9).d Frozen indicates that the device is in the SEC2: Security Disabled/Not Locked/Frozen state (see 4.18.11.6)

or the SEC6: Security Enabled/Not Locked/Frozen state (see 4.18.11.10).e See ZAC.

Page 9: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 9

4.99 Storage Element Depopulation

Editor’s Note 4: This entire subclause is new, and edit markers denote text changes since rev 3.

4.99.1 Overview

Storage Element Depopulation provides a mechanism for an application client to depopulate a storage element from a device (i.e., make a specified storage element an inaccessible location for user data).

The media in a device may consist of a number of storage elements. Each of these storage elements:

a) is associated with some number of physical sectors; and b) may have a health status independent of the other elements in the device.

The health status of a given element may become degraded. Such degradation may affect the overall performance of the device as seen by the application client.

An application client may specify that a physical storage element be depopulated by means of the Repurposing Depopulation feature set (see 4.99.3) or the Data Preserving Depopulation feature set (see 4.99.x).

A physical storage element that has been depopulated is unable to use LBA mapping resources (e.g., contains no usable physical sectors). The depopulation reduces the usable capacity of the media, by the quantity of valid physical sectors that were associated with the physical storage element before the depopulation.

Devices that support the Repurposing Depopulation feature set or the Data Preserving Depopulation feature set shall support the:

a) support the Physical Element Status log (see 9.19);b) support the General Purpose Logging feature set (see 4.10); andc) support the Sense Data Reporting feature set (see 4.20); and shall:d) enable the Sense Data Reporting feature set during the processing of any reset; ande) process the SET FEATURES Enable/Disable the Sense Data Reporting feature set subcommand as

defined in 7.43.16.

4.99.2 Physical element status change notification

The device may monitor the status of storage elements as a background operation. The device may notify application clients that the status of one or more storage elements is not within expected tolerance (see 9.19). The specific mechanism for detection of this condition is outside the scope of this standard. The device shall report the change in status by making deferred error sense data associated with no specific command available (see 4.20.2), by settingwith the sense key set to RECOVERED ERROR withand the additional sense code set to WARNING - PHYSICAL ELEMENT STATUS CHANGE.

4.99.3 Repurposing Depopulation

A device that supports Repurposing Depopulation shall support the REMOVE ELEMENT AND TRUNCATE command (see 7.99).

This feature set uses the REMOVE ELEMENT AND TRUNCATE command.

A REMOVE ELEMENT AND TRUNCATE command specifies that the device shall truncate (i.e. reduce the capacity of) the media before returning command completion with no error. The capacity to which the media shall be truncated is specified in that command, and shall be no larger than the capacity at the time of command receipt minus the capacity associated with the storage element being depopulated.

After a REMOVE ELEMENT AND TRUNCATE command has been successfully completed, the contents of the user data area are indeterminate. After a logical sector that has been affected by a REMOVE ELEMENT AND TRUNCATE command has been written (e.g., a write command or a SECURITY ERASE UNIT command), the data in that logical sector becomes determinate (i.e., the logical sector contains the stored data). A REMOVE ELEMENT AND TRUNCATE command may result in initialization of all data on the media. A REMOVE ELEMENT AND TRUNCATE command shall not result in a change to the: contents of the

Page 10: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 10

LOGICAL SECTOR SIZE;field (see 9.11.4.4) or the contents of the LOGICAL SECTOR OFFSET field (see 9.11.4.3.5).

A REMOVE ELEMENT AND TRUNCATE command may be issued for each physical storage element that is to be removed from the current operating configuration.The effect of the processing of multiple REMOVE ELEMENT AND TRUNCATE commands shall be cumulative.

4.99.4 Interactions

4.99.4.1 Interactions with resets

The processing of any command in the Repurposing Depopulation or Data Preserving Depopulation feature sets shall not be affected by software reset or hardware reset.

4.99.4.2 Interactions with other commands and logs

Editor’s Note 5: The following list is just a conversation starter, likely requiring extensive revision.

During the successful processing of a REMOVE ELEMENT AND TRUNCATE command, the device may change the following logs:

a) the Summary SMART Error log (see 9.22);b) the Comprehensive SMART Error log (see 9.4);c) the Extended Comprehensive SMART Error log (see 9.7);d) the SMART Self-Test log (see 9.21);e) the Extended SMART Self-Test log (see 9.9);f) the Selective Self-Test log (see 9.20);g) the Pending Defects log (see 9.27);h) the LPS Mis-alignment log (see 9.13)i) the LBA Status (see 9.12);j) the Write Stream Error log (see 9.23); andk) the Read Stream Error log (see 9.15).

4.99.4.3 Interactions with caches

Successful completion of the REMOVE ELEMENT AND TRUNCATE command shall cause previously existing data in caches to be unable to be accessed.

4.99.5 Test considerations

Editor’s Note 6: Meeting notes on the design of the test facility include the following:Test of this function- pseudo? (YES) undo? (NO)Start test mode with bit in corresponding log/ exist via same bit- multiple pseudo failures can be tested by multiple REMOVE ELEMENT AND INITIAILIZE in test mode- what if there is an actual storage element failure?- - don't allow test mode- have method to revert (multiple) pseudo depop - not element at a time - revert drive to fresh status - 'undo test mode and test mode effects'- - may initialize all media

Page 11: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 11

7.99 REMOVE ELEMENT AND TRUNCATE – TBDh, Non-Data

Editor’s Note 7: This entire subclause is new, and edit markers denote text changes since rev 0.

7.99.1 Feature Set

This 48-bit command is for devices the support the Repurposing Depopulation feature set (see 4.99.3).

7.99.2 Description

The REMOVE ELEMENT AND TRUNCATE command requests that the device depopulate a storage element from service and truncate the capacity of the device as described in 4.99. As a result of completing this command, contents of the user data area are indeterminate.

If the Accessible Max Address Configuration feature set (see 4.4) is supported, the successful processing ofa REMOVE ELEMENT AND TRUNCATE command results in the device setting the ACCESSIBLE CAPACITY field (see 9.11.4.2) to the native max address.

7.99.3 Inputs

7.99.3.1 Inputs Overview

See table 3 for the REMOVE ELEMENT AND TRUNCATE command inputs.

Table 3 — REMOVE ELEMENT AND TRUNCATE command inputs

Field Description

FEATURE

15:0 STORAGE ELEMENT field – see 7.99.3.2

COUNT Reserved

LBA 47:0 REQUESTED MAX LBA field – see 7.99.3.3

DEVICE

Bit Description

7 Obsolete

6 N/A

5 Obsolete

4 Transport Dependent – See 6.2.11

3:0 Reserved

COMMAND 7:0 TBD

7.99.3.2 STORAGE ELEMENT field

The STORAGE ELEMENT field specifies the storage element to be depopulated.

7.99.3.3 REQUESTED MAX LBA field

The REQUESTED MAX LBA field specifies:

a) the maximum LBA that is available to be accessible for the physical device (i.e. native max); andb) the accessible max address

upon completion of the command. A value of zero specifies that the device shall choose the resultant capacity of the media. If the device is unable to set the capacity to the specified non-zero value, then the device shall terminate the command with the sense key set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL FIELD IN CDB.

Page 12: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 12

7.99.4 Normal Outputs

See table 296.

7.99.5 Error Outputs

The ABORT bit shall be set to oneThe device shall return command completion with an error if any of the following are true:

a) the PHYSICALSTORAGE ELEMENT field specifies an element not supported by the device; orb) tbd.

If the ABORT bit is set to one, then the command shall not cause any physical elements to be depopulated. See table 309table 311 for the definition of Error Outputs.

If the processing of this command encounters an error that leaves the media in an unrecoverably inconsistent state, the device shall set the DEVICE FAULT bit to oneterminate the command with an error, with the sense key set to MEDIUM ERROR and the additional sense code set to MEDIUM FORMAT CORRUPTED.

Page 13: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 13

9 Log Definitions

9.1 Overview

This Annex provides a description of all logs. All logs are optional unless otherwise specified. These logs are accessible via commands (see 7.22, 7.23, 7.44.2, 7.44.4, 7.58, 7.59). Table 5 is a summary of these logs. The following terms are associated with logs:

a) name: the log name is a term that describes the data in the associated log;b) address: each log name has an associated numeric value that is the log address; andc) log page: each log is composed or one or more log pages and each page has a page number.

The LOG ADDRESS field is used by read log commands and write log commands to access a specific log. Table 4 shows an example layout of logs. Data transfer associated with the SMART READ LOG command and the SMART WRITE LOG command starts from the first log page (i.e., log page number zero). GPL feature set (see 4.10) commands allow the host to specify the starting log page number using the PAGE NUMBER field.

Table 4 — Example Log Structure

Log NameLog

Address Log pages

Log Directory 00h log page 0 (the Log Directory only has one 512-byte log page)

Host Specific (see 9.10)

80h Log page 0 (first 512-byte log page)

Log page 1 (second 512-byte log page)

Log page 15 (last 512-byte log page)

Host Specific 81h Log page 0 (first 512-byte log page)

Log page 1 (second 512-byte log page)

Log page 15 (last 512-byte log page)

Host Specific 9Fh Log page 0 (first 512-byte log page)

Log page 1 (second 512-byte log page)

Log page 15 (last 512-byte log page)

Page 14: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

Table 5 — Log address definition

Log Address Log Name Feature Set Support R/W Access

... ... ... ... ... ...

TBDh Physical Element Status log, see 9.99 Depopulation O R/W GPL b

... ... ... ... ... ...

Key –RO – Log is read only.R/W – Log is read or written.VS – Log is vendor specific; thus read/write

ability is vendor specific.GPL – General Purpose Logging

M – Log support is mandatory.O – Log support is optional.F – Log support is mandatory if feature set

is supported.SL – SMART Logging

a The device shall return command aborted if a GPL feature set (see 4.10) command accesses a log that is marked only with SL.

b The device shall return command aborted if a SMART feature set (see 4.19) command accesses a log that is marked only with GPL.

c Mandatory if the SATA PHY EVENT COUNTERS LOG SUPPORTED bit (see 9.11.10.2.6) is set to one.d Mandatory if the NCQ QUEUE MANAGEMENT COMMAND SUPPORTED bit (see 9.11.10.2.13) is set to one.e Mandatory if the SEND AND RECEIVE QUEUED COMMANDS SUPPORTED bit (see 9.11.10.2.14) is set to one.f Mandatory if the SUCCESSFUL NCQ COMMAND SENSE DATA SUPPORTED bit (see 9.11.5.2.40) is set to one.g Mandatory if the SET SECTOR CONFIGURATON EXT command (see 7.42) is supported.

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 14

Editor’s Note 8: intervening existing text elided

9.11.5 Supported Capabilities (page 03h)

9.11.5.1 Overview

The Supported Capabilities log page (see table 6) provides a mechanism for the device to report support for feature sets, features, commands and other device capabilities.

Table 6 — Supported Capabilities (part 1 of 2)

Offset Type Content

0..7 QWord Supported Capabilities page information header.

Bit Description

63 Shall be set to one.

62:24 Reserved

23:16 Page Number. Shall be set to 03h.

15:0 Revision number. Shall be set to 0001h.

... ... ...

104..111 QWord Zoned Capabilities

Bit Description

63 Contents of the QWord are valid

62:2 Reserved

1:0 ZONED field (see 9.11.5.12.1)

Page 15: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 15

Editor’s Note 9: intervening existing text elided

9.11.5.99.1 REMOVE ELEMENT AND TRUNCATE SUPPORTED bit

A REMOVE ELEMENT AND TRUNCATE SUPPORTED bit set to one indicates that the device supports the REMOVE ELEMENT AND TRUNCATE command (see 7.99). A REMOVE ELEMENT AND TRUNCATE SUPPORTED bit cleared to zero indicates that the device does not support the REMOVE ELEMENT AND TRUNCATE command.

Editor’s Note 10: intervening existing text elided

9.19 Rebuild Assist log (15h)

Editor’s Note 11: The Rebuild Assist log 9.19(.x.y.z) is text existing within ACS-4. Change tracking denotes changes required to make this feature and Repurposing Depopulation congruent.

112..119 QWord Supported ZAC Capabilities

Bit Description

63 Contents of the QWord are valid

62:5 Reserved

4 NON-DATA RESET WRITE POINTERS EXT SUPPORTED bit (see 9.11.5.13.5)

3 NON-DATA FINISH ZONE EXT SUPPORTED bit (see 9.11.5.13.4)

2 NON-DATA CLOSE ZONE EXT SUPPORTED bit (see 9.11.5.13.3)

1 NON-DATA OPEN ZONE EXT SUPPORTED bit (see 9.11.5.13.2)

0 REPORT ZONES EXT SUPPORTED bit (see 9.11.5.13.1)

120..127 QWord Supported Depopulation Capabilities

Bit Description

63 Contents of the QWord are valid

62:1 Reserved

0 REMOVE ELEMENT AND TRUNCATE SUPPORTED bit (see 9.11.5.99.1)

1280..503 Reserved

504..511 QWord Vendor Specific Supported Capabilities (see 9.11.5.14)

Bit Description

63 Contents of the QWord are valid

62:0 Vendor specific

Table 6 — Supported Capabilities (part 2 of 2)

Offset Type Content

Page 16: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 16

9.19.1 Overview

The Rebuild Assist log (see table 7) provides information about the Rebuild Assist feature set (see 4.new). If the REBUILD ASSIST SUPPORTED bit is set to one (see 9.11.10.2.26), the Rebuild Assist log shall be supported.

Table 7 — Rebuild Assist log (log page 00h)

Offset Type Description

0 Byte Flag bits

Bit Description

7:12 Reserved

1 RA RD CORR bit (see 9.19.2)

0 MANAGE REBUILD ASSIST bit (see 9.19.3)

1..6 Reserved

7 Byte PHYSICALSTORAGE ELEMENT LENGTH field (p) (see 9.19.4)

8..7+p Bytes DISABLED PHYSICALSTORAGE ELEMENT MASK field (see 9.19.5)

8+p..7+(2*p) Bytes DISABLED PHYSICALSTORAGE ELEMENTS field (see 9.19.6)

8+(2*p)..(512*k)-1

Reserved

pk

size in bytes of DISABLED STORAGE ELEMENT MASK field or DISABLED STORAGE ELEMENTS fieldcount of pages in Rebuild Assist log

Table 8: Rebuild Assist log (page 0..n)

Offset Type Description

0..511 Byte Rebuild Assist log bytes (0+512*n)...(511+512*n)

n number of last page in Rebuild Assist log

If:

a) the device processes a command to write to the Rebuild Assist log;b) the REBUILD ASSIST SUPPORTED bit is set to one (see 9.11.10.2.26); andc) the MANAGE REBUILD ASSIST bit is cleared to zero (see 9.19.3),

then the device shall:

1) disable the Rebuild Assist feature set as follows:A) clear the rebuild assist enabled bit to zero (see 9.11.10.3.11);B) set the PHYSICALSTORAGE ELEMENT LENGTH field to a non-zero value (see 9.19.4);C) set the DISABLED PHYSICALSTORAGE ELEMENT MASK field to a vendor specific value (see 9.19.5); andD) clear the DISABLED PHYSICALSTORAGE ELEMENTS field to zero (see 9.19.6);

2) ignore all other data written to the Rebuild Assist log by that command; and3) return command completion with no error.

If:

a) the device processes a command to write to the Rebuild Assist log;b) the REBUILD ASSIST SUPPORTED bit is set to one; andc) the MANAGE REBUILD ASSIST bit is set to one,

then:

1) if:A) the device is unable to enable the Rebuild Assist feature set;B) the host sets the PHYSICAL ELEMENT LENGTH field to a value other than the value returned when

reading the Rebuild Assist Log;

Page 17: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 17

C) the host attempts to set any bits to one in the DISABLED PHYSICALSTORAGE ELEMENTS field that are cleared to zero in the DISABLED PHYSICALSTORAGE ELEMENT MASK field; or

D) the host attempts to set all bits to one in the DISABLED PHYSICALSTORAGE ELEMENTS field that are set to one in the DISABLED PHYSICALSTORAGE ELEMENT MASK field (i.e., attempt to disable all physicalstorage elements),

then the device shall return command aborted;2) the device shall enable the Rebuild Assist feature set (see 4.16.2);3) if the device successfully enabled the Rebuild Assist feature set, the device shall logically OR the

DISABLED PHYSICALSTORAGE ELEMENTS field with any prior DISABLED PHYSICALSTORAGE ELEMENTS field that the device was using (e.g., the host is allowed to add bits but not allowed clear bits in the field) and save the new value of the DISABLED PHYSICALSTORAGE ELEMENTS field; and

4) the device shall set the REBUILD ASSIST ENABLED bit to one.

If the device processes a command to read from the Rebuild Assist log and the RA RD CORR bit is set to one, then the device shall set one bit to one in the DISABLED STORAGE ELEMENTS MASK field for each supported storage element.

If the device processes a command to read from the Rebuild Assist log and REBUILD ASSIST SUPPORTED bit is set to one and the REBUILD ASSIST ENABLED bit is:

a) cleared to zero, then the device shall return the current values for all fields; orb) set to one, then the device:

A) shall set the MANAGE REBUILD ASSIST bit to one;B) may set additional bits in the DISABLED PHYSICALSTORAGE ELEMENTS field; andC) shall not clear any bits in the DISABLED PHYSICALSTORAGE ELEMENTS field that were previously set by

the host.

9.19.2 RA RD CORR bit

Table 9 describes the use of the RA RD CORR bit.

Table 9 — RA RD CORR bit

Log operation

RA RD CORR bit Description

read0 Each bit in the DISABLED STORAGE ELEMENTS MASK field may not correspond to a

Physical Element Status descriptor in the Physical Element Status log (see 9.99).

read1 Each bit in the DISABLED STORAGE ELEMENTS MASK field corresponds to a Physical

Element Status descriptor in the Physical Element Status log.

write 0 or 1 ignored by device

9.19.3 MANAGE REBUILD ASSIST ENABLED bit

Table 10 describes the use of the MANAGE REBUILD ASSIST bit.

Table 10 — MANAGE REBUILD ASSIST bit

Log operation

MANAGE REBUILD ASSIST

bit Description

read 0 or 1 copy of the REBUILD ASSIST ENABLED bit (see 9.11.10.3.11)

write 0 host request to disable the Rebuild Assist feature set

write 1 host request to enable the Rebuild Assist feature set a

a If the REBUILD ASSIST SUPPORTED bit is cleared to zero (see 9.11.10.2.26), the Rebuild Assist feature set shall not be enabled.

Page 18: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 18

9.19.4 PHYSICALSTORAGE ELEMENT LENGTH field

The PHYSICALSTORAGE ELEMENT LENGTH field indicates the number of bytes in the DISABLED PHYSICALSTORAGE ELEMENT MASK field and the number of bytes in the DISABLED PHYSICALSTORAGE ELEMENTS field.

During the processing of a write to the Rebuild Assist log, the device shall ignore the PHYSICALSTORAGE ELEMENT LENGTH field.

9.19.5 DISABLED PHYSICALSTORAGE ELEMENT MASK field

The DISABLED PHYSICALSTORAGE ELEMENT MASK field indicates which bits in the DISABLED PHYSICALSTORAGE ELEMENTS field are supported.

During the processing of a write to the Rebuild Assist log, the device shall ignore the DISABLED PHYSICALSTORAGE ELEMENT MASK field.

If the host reads the Rebuild Assist log, and the RA RD CORR bit (see 9.19.2) is set to one, then the count of bits set to one in the DISABLED STORAGE ELEMENTS MASK shall be equal to the number of physical element log parameters returned in the Physical Element status input log (see 9.99).

9.19.6 DISABLED PHYSICALSTORAGE ELEMENTS field

The DISABLED PHYSICALSTORAGE ELEMENTS field specifies if physicalstorage elements shall be disabled.

Each bit that is set to one in the DISABLED PHYSICALSTORAGE ELEMENTS field specifies that LBAs associated with this physicalstorage element shall respond to read commands and write commands as if the associated LBAs have predicted errors (see 4.16.3.3 and 4.16.3.5).

Each bit that is set to zero in the DISABLED PHYSICALSTORAGE ELEMENTS field specifies that LBAs associated with this physicalstorage element shall respond to read commands and write commands as if the associated LBAs do not have predicted errors.

9.99 Physical Element Status log (Log Address tbd)

Editor’s Note 12: This entire subclause is new, and edit markers denote text changes since rev 3.

Editor’s Note 13: A corresponding output page may be used to set pseudo errors for test of depopulation. The test bit is a vestigial part of this, pursuant to review comment.

9.99.1 Overview

The Physical Element Status log provides information about the health of physical elements within the device.

Page 19: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 19

9.99.2 Contents of the Physical Element Status log

Table 11 defines the format of the Pending DefectsPhysical Element Status log for page 0. Table 12 defines the format of all subsequent pages of the log. The size (i.e., number of pages) of the Pending DefectsPhysical Element Status log is indicated in the General Purpose Directory log (see 9.2).

Table 11 — Physical Element Status log (page 0)

Offset Type Description

0..3 DWord NUMBER OF LOG DESCRIPTORS field (see 9.99.3)

4 Byte Flag bits

Bit Description

7:1 Reserved

0 TEST bit (see 9.19.3)

5..7 Bytes Reserved

8..15 Bytes Physical Element Status Log descriptor 0 (see 9.99.4)

16..23 Bytes Physical Element Status Log descriptor 1

… …

504..511 Bytes Physical Element Status Log descriptor 63

Table 12 — Physical Element Status log (page 1..n)

Offset Type Description

0..7 Bytes Physical Element Status Log descriptor 64 + ((log page number–1) 64)

8..15 Bytes Physical Element Status Log descriptor 65 + ((log page number–1) 64)

… …

504..511 Bytes Physical Element Status Log descriptor 127 + ((log page number–1) 64)

The Physical Element Status log shall contain a Physical Element Status descriptor for every physical element within the device (i.e., depopulation does not remove Physical Element Status log descriptors from the Physical Element Status log).

The Physical Element Status descriptors shall be sortedreturned in increasing order of PHYSICAL ELEMENT (see 9.99.4).

If the last Physical Element Status log page contains less than 512 bytes of valid Physical Element Status descriptors (i.e., nonzero value in the NUMBER OF LOGICAL BLOCKS field), then the remaining Physical Element Status descriptors in that Physical Element Status log page shall be padded with zero filled Physical Element Status descriptors

9.99.3 NUMBER OF LOG DESCRIPTORS field

The NUMBER OF LOG DESCRIPTORS field indicates the number of Physical Element Status descriptors in the Physical Element Status log. If the value of the NUMBER OF LOG DESCRIPTORS field is greater than or equal to FFFEh, then:

a) the device shall not add more Physical Element Status descriptors to the log; andb) the NUMBER OF LOG DESCRIPTORS fieldNUMBER OF LOG DESCRIPTORS field shall not be changed.

There shall be no unused Physical Element Status descriptors (see 9.99.4) included in the range specified by the NUMBER OF LOG DESCRIPTORS field.

The number of Physical Element Status descriptors in the Physical Element Status log is vendor specific.

Page 20: AT Attachment 8 - ATA/ATAPI Command Set€¦ · Text mandating Rebuild Assist log elements correspond to Physical Element log pro-moted in subclause hierarchy Remove vestigial references

2016 Aug 12 T13/f16123 Revision 6

Proposal Repurposing Depopulation 20

9.99.4 Physical Element Status descriptor format

Each Physical Element Status descriptor indicates the health status associated with a physical element. Unused Physical Element Status descriptors shall be cleared to zero. Table 13 defines the format of each Physical Element Status descriptor.

Table 13 — Physical Element Status descriptor format

Offset Type Description

0..1 Word PHYSICAL ELEMENT field

2..6 Bytes Reserved

7 Byte PHYSICAL ELEMENT STATUS field

The PHYSICAL ELEMENT field contains the indexidentifier of the physical element associated with this Physical Element Status descriptor. Physical elements shall be identified by an index number ranging from zeroone to one less than the number of physical elements within the device.

The PHYSICAL ELEMENT STATUS field provides an indication of the health of the physical element associated with this Physical Element Status descriptor, as described by table 14.

Table 14 — PHYSICAL ELEMENT HEALTHSTATUS

code description

00h unspecified

01h to 63ha

a. the device may implement a subset of values

within manufacturer’s specification limit

64h at manufacturer’s specification limit

65h to FEh a. outside manufacturer’s specification limit

FFh depopulated or pseudo depopulated

Editor’s Note 14: Need to add IDENTIFY log bits for command support .