0% found this document useful (0 votes)
424 views359 pages

SBC 4 R 03

sbc 4 commads

Uploaded by

coolkad81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
424 views359 pages

SBC 4 R 03

sbc 4 commads

Uploaded by

coolkad81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 359

Working Draft

American National
Standard

Project
T10/BSR INCITS 506
Revision 3
27 August 2014

Information technology SCSI Block Commands 4 (SBC-4)

This is an internal working document of T10, a Technical Committee of Accredited Standards Committee
INCITS (International Committee for Information Technology Standards). As such this is not a completed
standard and has not been approved. The contents may be modified by the T10 Technical Committee. The
contents are actively being modified by T10. This document is made available for review and comment only.
Permission is granted to members of INCITS, its technical committees, and their associated task groups to
reproduce this document for the purposes of INCITS standardization activities without further permission,
provided this notice is included. All other rights are reserved. Any duplication of this document for commercial
or for-profit use is strictly prohibited.
T10 Technical Editor:

William Martin
Samsung Semiconductor, Inc
7213 Marblethorpe Drive
Roseville, CA 95747
USA
Telephone: (916) 765-6875
Email:
[email protected]

Reference number
ISO/IEC 14776-324:201x
BSR INCITS 506:201x

T10/BSR INCITS 506 Revision 3

27 August 2014

Points of contact
International Committee for Information Technology Standards (INCITS) T10 Technical Committee
T10 Chair
John B. Lohmeyer
Avago TechnologiesLSI Logic
4420 Arrows West Drive
Colorado Springs, CO 80907-3444
USA

T10 Vice-Chair
William Martin
Samsung Semiconductor, Inc
7213 Marblethorpe Drive
Roseville, CA 95747
USA

Telephone:
Email:

(719) 533-7560
[email protected]

Telephone: (916) 765-6875


Email:
[email protected]

T10 Web Site:

http://www.t10.org

T10 E-mail reflector:


Server: [email protected]
To subscribe send e-mail with subscribe in message body
To unsubscribe send e-mail with unsubscribe in message body
INCITS Secretariat
1101 K Street, NW
Suite 610
Washington, DC 20005
USA
Telephone:
Web site:
Email:

(202) 737-8888
http://www.incits.org
[email protected]

Information Technology Industry Council


Web site:
http://www.itic.org
Document Distribution
INCITS Online Store
managed by Techstreet
1327 Jones Drive
Ann Arbor, MI 48105
USA
Web site:
Telephone:

http://www.techstreet.com/incitsgate.tmpl
(734) 302-7801 or (800) 699-9277

Global Engineering Documents, an IHS Company


15 Inverness Way East
Englewood, CO 80112-5704
USA
Web site:
Telephone:

ii

http://global.ihs.com
(303) 397-7956 or (303) 792-2181 or (800) 854-7179

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

American National Standard


for Information Technology

SCSI Block Commands 4 (SBC-4)

Secretariat

Information Technology Industry Council

Approved mm.dd.yy
American National Standards Institute, Inc.

Abstract
This standard specifies the functional requirements for the SCSI Block Commands - 4 (SBC-4) command set.
SBC-4 permits SCSI block logical units such as rigid disks to attach to computers and provides the definition
for their use.
This standard maintains a high degree of compatibility with the SCSI Block Commands (SBC-3) command
set, INCITS 514-2014, and while providing additional functions, is not intended to require changes to
presently installed devices or existing software.

Working Draft SCSI Block Commands 4 (SBC-4)

iii

T10/BSR INCITS 506 Revision 3

27 August 2014

of an American National Standard requires verification by ANSI that the


American Approval
requirements for due process, consensus, and other criteria for approval have been met by
standards developer. Consensus is established when, in the judgment of the ANSI Board
National the
of Standards Review, substantial agreement has been reached by directly and materially
Standard affected interests. Substantial agreement means much more than a simple majority, but not
necessarily unanimity. Consensus requires that all views and objections be considered, and
that effort be made towards their resolution.

The use of American National Standards is completely voluntary; their existence does not in
any respect preclude anyone, whether he has approved the standards or not, from
manufacturing, marketing, purchasing, or using products, processes, or procedures not
conforming to the standards.
The American National Standards Institute does not develop standards and will in no
circumstances give interpretation on any American National Standard. Moreover, no person
shall have the right or authority to issue an interpretation of an American National Standard
in the name of the American National Standards Institute. Requests for interpretations
should be addressed to the secretariat or sponsor whose name appears on the title page of
this standard.
CAUTION NOTICE: This American National Standard may be revised or withdrawn at any
time. The procedures of the American National Standards Institute require that action be
taken periodically to reaffirm, revise, or withdraw this standard. Purchasers of American
National Standards may receive current information on all standards by calling or writing the
American National Standards Institute.

CAUTION: The developers of this standard have requested that holders of patents that
may be required for the implementation of the standard, disclose such patents to the
publisher. However, neither the developers nor the publisher have undertaken a patent
search in order to identify which, if any, patents may apply to this standard. As of the date
of publication of this standard, following calls for the identification of patents that may be
required for the implementation of the standard, no such claims have been made. No
further patent search is conducted by the developer or the publisher in respect to any
standard it processes. No representation is made or implied that licenses are not
required to avoid infringement in the use of this standard.

Published by

American National Standards Institute


11 W. 42nd Street, New York, New York 10036
Copyright 2014 by Information Technology Industry Council (ITI).
All rights reserved.
No part of this publication may by reproduced in any
form, in an electronic retrieval system or otherwise,
without prior written permission of ITI, 1101 K Street, NW Suite 610,
Washington, DC 20005.
Printed in the United States of America

iv

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Revision History
This revision history is not part of American National Standard INCITS 1799:200x.

R.1 Revision 0 (27 February 2014)


Revision 0 of SBC-4 is substantially equal to revision 36 of SBC-3. The only differences arise from changes
made in SBC-3 discovered during the ISO process and modification of the format of the definitions to use the
new ISO style of Note to Entry for definitions that are longer than a single sentence.

R.2 Revision 1 (14 March 2014)


Incorporated the following proposals:
a)
b)
c)
d)
e)
f)

Fixed LENGTH OF SENSE DATA to LENGTH OF THE SENSE DATA FIELD in 5.22.2;
14-003r1 - Add reporting of unrecoverable errors that aren't reassigned
14-019r2 - Discussion of WCE intent
14-061r0 - 'Not defined' is not defined sufficiently;
14-018r3 - Update Block Device Characteristics VPD page for ZBC; and
13-094r4 - Supported Block lengths and protection types VPD page.

R.3 Revision 2 (20 May 2014)


Incorporated the following proposals:
a)
b)
c)
d)
e)

Corrected editorial errors on incorporation 14-003r1;


14-112r0 - Clarifying token timeout;
14-103r1 - Obsolete EER, DCR bits in Read-Write Recovery mode page;
14-075r1 - Designed Utilization VPD data; and
14-043r4 - Atomic writes and reads.

R.4 Revision 3 (xxx 2014)


Incorporated the following proposals:
a)
b)
c)
d)
e)

Corrected errors on incorporation of 13-094r5;


14-148r3 - Redefinition of Peripheral device type;
14-143r0 - Enhancing SBC-4 to allow ZBC to share its VPD page definitions;
14-163r1 - Make the WRITE SAME no Data-Out Buffer bit broadly useful; and
14-178r1 - Disable PI checking on write if PI is all Fs.

Working Draft SCSI Block Commands 4 (SBC-4)

T10/BSR INCITS 506 Revision 3

27 August 2014

Contents
Page
Points of contact ................................................................................................................................................ii
Abstract ............................................................................................................................................................ iii
Revision History ................................................................................................................................................v
Contents ...........................................................................................................................................................vi
Tables ............................................................................................................................................................. xv
Figures ............................................................................................................................................................ xx
Foreword ........................................................................................................................................................ xxi
Introduction .................................................................................................................................................... xxi
SCSI standards family ................................................................................................................................... xxii
1 Scope ............................................................................................................................................................. 1
2 Normative references..................................................................................................................................... 1
2.1 Normative references overview ................................................................................................................ 1
2.2 Approved references ................................................................................................................................ 1
2.3 References under development ............................................................................................................... 1
3 Definitions, symbols, abbreviations, keywords, and conventions .................................................................. 2
3.1 Definitions, symbols, abbreviations, keywords, and conventions Introduction ......................................... 2
3.2 Definitions................................................................................................................................................. 2
3.3 Symbols.................................................................................................................................................. 11
3.4 Abbreviations.......................................................................................................................................... 11
3.5 Keywords................................................................................................................................................ 12
3.6 Editorial conventions .............................................................................................................................. 13
3.7 Numeric and character conventions ....................................................................................................... 14
3.7.1 Numeric conventions ........................................................................................................................ 14
3.7.2 Units of measure............................................................................................................................... 14
3.8 State machine conventions .................................................................................................................... 15
4 Direct access block device type model ........................................................................................................ 17
4.1 Direct access block device type model introduction ............................................................................... 17
4.2 Direct access block device type model................................................................................................... 18
4.2.1 Direct access block device type model overview.............................................................................. 18
4.2.2 Logical block access command types............................................................................................... 18
4.2.3 Logical block access operation types ............................................................................................... 18
4.3 Media examples ..................................................................................................................................... 18
4.3.1 Media examples overview................................................................................................................. 18
4.3.2 Rotating media.................................................................................................................................. 19
4.3.3 Memory media .................................................................................................................................. 19
4.4 Removable media................................................................................................................................... 19
4.5 Logical blocks ......................................................................................................................................... 20
4.6 Physical blocks ....................................................................................................................................... 21
4.7 Logical block provisioning....................................................................................................................... 25
4.7.1 Logical block provisioning overview.................................................................................................. 25
4.7.2 Fully provisioned logical unit ............................................................................................................. 26
4.7.3 Logical block provisioning management ........................................................................................... 26
4.7.3.1 Logical block provisioning management overview ...................................................................... 26
4.7.3.2 Resource provisioned logical unit................................................................................................ 26
4.7.3.3 Thin provisioned logical unit ........................................................................................................ 27
4.7.3.4 Unmapping LBAs ........................................................................................................................ 27
4.7.3.4.1 Processing unmap requests .................................................................................................. 27
4.7.3.4.2 Unmap operations ................................................................................................................. 27
4.7.3.4.3 WRITE SAME command and unmap operations .................................................................. 28
4.7.3.5 Autonomous LBA transitions ....................................................................................................... 29
vi

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.7.3.6 Thin provisioned logical unit resource exhaustion considerations .............................................. 29


4.7.3.7 Logical block provisioning thresholds.......................................................................................... 29
4.7.3.7.1 Logical block provisioning thresholds overview ..................................................................... 29
4.7.3.7.2 Logical block provisioning armed decreasing thresholds ...................................................... 30
4.7.3.7.3 Logical block provisioning armed increasing thresholds........................................................ 31
4.7.3.7.4 Logical block provisioning threshold notification.................................................................... 32
4.7.4 LBP (logical block provisioning) state machine................................................................................. 32
4.7.4.1 LBP state machine overview ....................................................................................................... 32
4.7.4.2 LBP state machine for thin provisioned logical units supporting anchored LBAs........................ 33
4.7.4.3 LBP state machine for thin provisioned logical units not supporting anchored LBAs.................. 33
4.7.4.4 LBP state machine for resource provisioned logical units........................................................... 34
4.7.4.5 Performing read operations with respect to logical block provisioning ........................................ 34
4.7.4.6 LBP1:Mapped state..................................................................................................................... 36
4.7.4.6.1 LBP1:Mapped state description............................................................................................. 36
4.7.4.6.2 Transition LBP1:Mapped to LBP2:Deallocated ..................................................................... 36
4.7.4.6.3 Transition LBP1:Mapped to LBP3:Anchored ......................................................................... 36
4.7.4.7 LBP2:Deallocated state............................................................................................................... 36
4.7.4.7.1 LBP2:Deallocated state description....................................................................................... 36
4.7.4.7.2 Transition LBP2:Deallocated to LBP1:Mapped ..................................................................... 36
4.7.4.7.3 Transition LBP2:Deallocated to LBP3:Anchored ................................................................... 37
4.7.4.8 LBP3:Anchored state .................................................................................................................. 37
4.7.4.8.1 LBP3:Anchored state description .......................................................................................... 37
4.7.4.8.2 Transition LBP3:Anchored to LBP1:Mapped ......................................................................... 37
4.7.4.8.3 Transition LBP3:Anchored to LBP2:Deallocated ................................................................... 37
4.8 Data de-duplication................................................................................................................................. 37
4.9 Ready state ............................................................................................................................................ 37
4.10 Initialization........................................................................................................................................... 38
4.11 Sanitize operations ............................................................................................................................... 38
4.11.1 Sanitize operations overview .......................................................................................................... 38
4.11.2 Performing a sanitize operation ...................................................................................................... 39
4.11.3 Completing a sanitize operation...................................................................................................... 40
4.12 Write protection .................................................................................................................................... 41
4.13 Medium defects .................................................................................................................................... 41
4.13.1 Medium defects overview ............................................................................................................... 41
4.13.2 Generation of defect lists ................................................................................................................ 44
4.14 Write and unmap failures...................................................................................................................... 45
4.15 Caches ................................................................................................................................................. 45
4.15.1 Caches overview............................................................................................................................. 45
4.15.2 Read caching .................................................................................................................................. 45
4.15.3 Write caching .................................................................................................................................. 45
4.15.4 Command interactions with caches ................................................................................................ 46
4.15.5 Write operation and write medium operation interactions with caches ........................................... 46
4.15.6 Read operation and read medium operation interactions with caches ........................................... 47
4.15.7 Verify medium operation interactions with caches.......................................................................... 47
4.15.8 Unmap operation interactions with caches ..................................................................................... 47
4.15.9 Power loss effects on caches ......................................................................................................... 47
4.16 Implicit head of queue command processing ....................................................................................... 48
4.17 Reservations......................................................................................................................................... 48
4.18 Error reporting ...................................................................................................................................... 50
4.18.1 Error reporting overview.................................................................................................................. 50
4.18.2 Processing pseudo unrecovered errors .......................................................................................... 52
4.18.3 Block commands sense data descriptor ......................................................................................... 53
4.18.4 User data segment referral sense data descriptor.......................................................................... 54
4.18.5 Direct-access block device sense data descriptor .......................................................................... 57
4.19 Model for XOR commands ................................................................................................................... 58
4.19.1 Model for XOR commands overview .............................................................................................. 58
4.19.2 SCSI storage array device supervised XOR operations ................................................................. 59
Working Draft SCSI Block Commands 4 (SBC-4)

vii

T10/BSR INCITS 506 Revision 3

27 August 2014

4.19.2.1 SCSI storage array device supervised XOR operations overview ............................................ 59
4.19.2.2 Update write operation .............................................................................................................. 59
4.19.2.3 Regenerate operation................................................................................................................ 59
4.19.2.4 Rebuild operation ...................................................................................................................... 59
4.19.3 Array subsystem considerations ..................................................................................................... 60
4.19.3.1 Array subsystem considerations overview ................................................................................ 60
4.19.3.2 Access to an inconsistent stripe ................................................................................................ 60
4.20 Rebuild assist mode ............................................................................................................................. 60
4.20.1 Rebuild assist mode overview ........................................................................................................ 60
4.20.2 Enabling rebuild assist mode .......................................................................................................... 60
4.20.3 Using the rebuild assist mode......................................................................................................... 61
4.20.3.1 Using rebuild assist mode overview .......................................................................................... 61
4.20.3.2 Unpredicted unrecovered read error ......................................................................................... 61
4.20.3.3 Predicted unrecovered read error ............................................................................................. 61
4.20.3.4 Unpredicted unrecovered write error......................................................................................... 62
4.20.3.5 Predicted unrecovered write error ............................................................................................. 62
4.20.4 Disabling the rebuild assist mode ................................................................................................... 62
4.20.5 Testing rebuild assist mode ............................................................................................................ 63
4.21 START STOP UNIT and power conditions........................................................................................... 63
4.21.1 START STOP UNIT and power conditions overview...................................................................... 63
4.21.2 Processing of concurrent START STOP UNIT commands............................................................. 63
4.21.3 Managing logical block access commands during a change to the active power condition ........... 63
4.21.4 Stopped power condition ................................................................................................................ 63
4.21.5 START STOP UNIT and power condition state machine ............................................................... 64
4.21.5.1 START STOP UNIT and power condition state machine overview........................................... 64
4.21.5.2 SSU_PC0:Powered_On state ................................................................................................... 67
4.21.5.2.1 SSU_PC0:Powered_On state description ........................................................................... 67
4.21.5.2.2 Transition SSU_PC0:Powered_On to SSU_PC4:Active_Wait ............................................ 67
4.21.5.2.3 Transition SSU_PC0:Powered_On to SSU_PC8:Stopped .................................................. 67
4.21.5.3 SSU_PC1:Active state .............................................................................................................. 67
4.21.5.3.1 SSU_PC1:Active state description ...................................................................................... 67
4.21.5.3.2 Transition SSU_PC1:Active to SSU_PC5:Wait_Idle ........................................................... 67
4.21.5.3.3 Transition SSU_PC1:Active to SSU_PC6:Wait_Standby .................................................... 67
4.21.5.3.4 Transition SSU_PC1:Active to SSU_PC10:Wait_Stopped .................................................. 68
4.21.5.4 SSU_PC2:Idle state .................................................................................................................. 68
4.21.5.4.1 SSU_PC2:Idle state description .......................................................................................... 68
4.21.5.4.2 Transition SSU_PC2:Idle to SSU_PC4:Active_Wait ........................................................... 68
4.21.5.4.3 Transition SSU_PC2:Idle to SSU_PC5:Wait_Idle ............................................................... 68
4.21.5.4.4 Transition SSU_PC2:Idle to SSU_PC6:Wait_Standby ........................................................ 69
4.21.5.4.5 Transition SSU_PC2:Idle to SSU_PC7:Idle_Wait ............................................................... 69
4.21.5.4.6 Transition SSU_PC2:Idle to SSU_PC10:Wait_Stopped ...................................................... 69
4.21.5.5 SSU_PC3:Standby state ........................................................................................................... 69
4.21.5.5.1 SSU_PC3:Standby state description ................................................................................... 69
4.21.5.5.2 Transition SSU_PC3:Standby to SSU_PC4:Active_Wait .................................................... 70
4.21.5.5.3 Transition SSU_PC3:Standby to SSU_PC6:Wait_Standby................................................. 70
4.21.5.5.4 Transition SSU_PC3:Standby to SSU_PC7:Idle_Wait ........................................................ 70
4.21.5.5.5 Transition SSU_PC3:Standby to SSU_PC9:Standby_Wait................................................. 71
4.21.5.5.6 Transition SSU_PC3:Standby to SSU_PC10:Wait_Stopped .............................................. 71
4.21.5.6 SSU_PC4:Active_Wait state ..................................................................................................... 71
4.21.5.6.1 SSU_PC4:Active_Wait state description ............................................................................. 71
4.21.5.6.2 Transition SSU_PC4:Active_Wait to SSU_PC1:Active ....................................................... 72
4.21.5.7 SSU_PC5:Wait_Idle state ......................................................................................................... 72
4.21.5.7.1 SSU_PC5:Wait_Idle state description ................................................................................. 72
4.21.5.7.2 Transition SSU_PC5:Wait_Idle to SSU_PC2:Idle ............................................................... 72
4.21.5.8 SSU_PC6:Wait_Standby state.................................................................................................. 72
4.21.5.8.1 SSU_PC6:Wait_Standby state description.......................................................................... 72
4.21.5.8.2 Transition SSU_PC6:Wait_Standby to SSU_PC3:Standby................................................. 72
viii

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.21.5.9 SSU_PC7:Idle_Wait state ......................................................................................................... 72


4.21.5.9.1 SSU_PC7:Idle_Wait state description ................................................................................. 72
4.21.5.9.2 Transition SSU_PC7:Idle_Wait to SSU_PC2:Idle ............................................................... 73
4.21.5.10 SSU_PC8:Stopped state......................................................................................................... 73
4.21.5.10.1 SSU_PC8:Stopped state description................................................................................. 73
4.21.5.10.2 Transition SSU_PC8:Stopped to SSU_PC4:Active_Wait .................................................. 74
4.21.5.10.3 Transition SSU_PC8:Stopped to SSU_PC7:Idle_Wait ...................................................... 74
4.21.5.10.4 Transition SSU_PC8:Stopped to SSU_PC9:Standby_Wait .............................................. 74
4.21.5.11 SSU_PC9:Standby_Wait state................................................................................................ 74
4.21.5.11.1 SSU_PC9:Standby_Wait state description........................................................................ 74
4.21.5.11.2 Transition SSU_PC9:Standby_Wait to SSU_PC3:Standby............................................... 75
4.21.5.12 SSU_PC10:Wait_Stopped state.............................................................................................. 75
4.21.5.12.1 SSU_PC10:Wait_Stopped state description...................................................................... 75
4.21.5.12.2 Transition SSU_PC10:Wait_Stopped to SSU_PC8:Stopped ............................................ 75
4.22 Protection information model................................................................................................................ 75
4.22.1 Protection information overview...................................................................................................... 75
4.22.2 Protection types .............................................................................................................................. 76
4.22.2.1 Protection types overview ......................................................................................................... 76
4.22.2.2 Type 0 protection....................................................................................................................... 76
4.22.2.3 Type 1 protection....................................................................................................................... 77
4.22.2.4 Type 2 protection....................................................................................................................... 77
4.22.2.5 Type 3 protection....................................................................................................................... 78
4.22.3 Protection information format.......................................................................................................... 78
4.22.4 Logical block guard ......................................................................................................................... 83
4.22.4.1 Logical block guard overview .................................................................................................... 83
4.22.4.2 CRC generation......................................................................................................................... 83
4.22.4.3 CRC checking ........................................................................................................................... 84
4.22.4.4 CRC test cases ......................................................................................................................... 84
4.22.5 Application of protection information............................................................................................... 84
4.22.6 Protection information and commands ........................................................................................... 85
4.23 Grouping function ................................................................................................................................. 85
4.24 Background scan operations ................................................................................................................ 85
4.24.1 Background scan overview ............................................................................................................. 85
4.24.2 Background pre-scan operations .................................................................................................... 86
4.24.2.1 Enabling background pre-scan operations................................................................................ 86
4.24.2.2 Suspending and resuming background pre-scan operations .................................................... 86
4.24.2.3 Halting background pre-scan operations................................................................................... 87
4.24.3 Background medium scan .............................................................................................................. 87
4.24.3.1 Enabling background medium scan operations ........................................................................ 87
4.24.3.2 Suspending and resuming background medium scan operations............................................. 88
4.24.3.3 Halting background medium scan operations ........................................................................... 89
4.24.4 Interpreting the logged background scan results ............................................................................ 89
4.25 Association between commands and CbCS permission bits ............................................................... 90
4.26 Deferred microcode activation.............................................................................................................. 91
4.27 Model for uninterrupted sequences on LBA ranges ............................................................................. 92
4.28 Referrals ............................................................................................................................................... 92
4.28.1 Referrals overview .......................................................................................................................... 92
4.28.2 Discovering referrals ....................................................................................................................... 93
4.28.3 Referrals in sense data ................................................................................................................... 94
4.29 ORWRITE commands .......................................................................................................................... 95
4.29.1 ORWRITE commands overview ..................................................................................................... 95
4.29.2 ORWgeneration code ..................................................................................................................... 95
4.29.2.1 ORWgeneration code overview................................................................................................. 95
4.29.2.2 ORWgeneration code processing ............................................................................................. 96
4.29.3 Change generation and clear operation.......................................................................................... 96
4.29.4 Set operation................................................................................................................................... 97
4.30 Block device ROD token operations..................................................................................................... 98
Working Draft SCSI Block Commands 4 (SBC-4)

ix

T10/BSR INCITS 506 Revision 3

27 August 2014

4.30.1 Block device ROD token operations overview ................................................................................ 98


4.30.2 POPULATE TOKEN command and WRITE USING TOKEN command completion ...................... 99
4.30.3 Block device specific ROD tokens .................................................................................................. 99
4.30.4 Block device zero ROD token ....................................................................................................... 100
4.30.5 ROD token device type specific data ............................................................................................ 100
4.31 Atomic writes ...................................................................................................................................... 101
4.31.1 Atomic writes overview ................................................................................................................. 101
4.31.2 Atomic write operations that do not complete ............................................................................... 101
4.31.3 Performing operations with respect to atomic operations ............................................................. 102
4.31.3.1 Performing operations before and after an atomic write operation ......................................... 102
4.31.3.2 Performing operations during an atomic write operation......................................................... 102
4.31.4 Processing ACA conditions during atomic write commands......................................................... 103
5 Commands for direct access block devices ............................................................................................... 104
5.1 Commands for direct access block devices overview .......................................................................... 104
5.2 COMPARE AND WRITE command ..................................................................................................... 107
5.3 FORMAT UNIT command .................................................................................................................... 109
5.3.1 FORMAT UNIT command overview ............................................................................................... 109
5.3.2 FORMAT UNIT parameter list......................................................................................................... 113
5.3.2.1 FORMAT UNIT parameter list overview .................................................................................... 113
5.3.2.2 Parameter list header ................................................................................................................ 113
5.3.2.3 Initialization pattern descriptor................................................................................................... 118
5.4 GET LBA STATUS command .............................................................................................................. 120
5.4.1 GET LBA STATUS command overview.......................................................................................... 120
5.4.2 GET LBA STATUS parameter data ................................................................................................ 121
5.4.2.1 GET LBA STATUS parameter data overview ........................................................................... 121
5.4.2.2 LBA status descriptor ................................................................................................................ 122
5.4.2.3 LBA status descriptor relationships ........................................................................................... 122
5.5 ORWRITE (16) command .................................................................................................................... 123
5.6 ORWRITE (32) command .................................................................................................................... 129
5.7 POPULATE TOKEN command ............................................................................................................ 131
5.7.1 POPULATE TOKEN command overview ....................................................................................... 131
5.7.2 POPULATE TOKEN parameter list................................................................................................. 132
5.7.3 Block device range descriptor......................................................................................................... 134
5.8 PRE-FETCH (10) command................................................................................................................. 135
5.9 PRE-FETCH (16) command................................................................................................................. 136
5.10 PREVENT ALLOW MEDIUM REMOVAL command .......................................................................... 137
5.11 READ (10) command ......................................................................................................................... 138
5.12 READ (12) command ......................................................................................................................... 142
5.13 READ (16) command ......................................................................................................................... 144
5.14 READ (32) command ......................................................................................................................... 145
5.15 READ CAPACITY (10) command ...................................................................................................... 146
5.15.1 READ CAPACITY (10) overview .................................................................................................. 146
5.15.2 READ CAPACITY (10) parameter data ........................................................................................ 147
5.16 READ CAPACITY (16) command ...................................................................................................... 147
5.16.1 READ CAPACITY (16) command overview.................................................................................. 147
5.16.2 READ CAPACITY (16) parameter data ........................................................................................ 149
5.17 READ DEFECT DATA (10) command ............................................................................................... 150
5.17.1 READ DEFECT DATA (10) command overview........................................................................... 150
5.17.2 READ DEFECT DATA (10) parameter data ................................................................................. 152
5.18 READ DEFECT DATA (12) command ............................................................................................... 152
5.18.1 READ DEFECT DATA (12) command overview........................................................................... 152
5.18.2 READ DEFECT DATA (12) parameter data ................................................................................. 154
5.19 READ LONG (10) command .............................................................................................................. 155
5.20 READ LONG (16) command .............................................................................................................. 157
5.21 REASSIGN BLOCKS command......................................................................................................... 157
5.21.1 REASSIGN BLOCKS command overview.................................................................................... 157
x

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.21.2 REASSIGN BLOCKS parameter list ............................................................................................. 159


5.22 RECEIVE ROD TOKEN INFORMATION ........................................................................................... 161
5.22.1 RECEIVE ROD TOKEN INFORMATION overview ...................................................................... 161
5.22.2 RECEIVE ROD TOKEN INFORMATION parameter data for POPULATE TOKEN command..... 161
5.22.3 RECEIVE ROD TOKEN INFORMATION parameter data for WRITE USING TOKEN command 164
5.23 REPORT REFERRALS command ..................................................................................................... 165
5.23.1 REPORT REFERRALS command overview ................................................................................ 165
5.23.2 REPORT REFERRALS parameter data ....................................................................................... 166
5.24 SANITIZE command........................................................................................................................... 167
5.24.1 SANITIZE command overview...................................................................................................... 167
5.24.2 SANITIZE command service actions ............................................................................................ 168
5.24.2.1 SANITIZE command service actions overview ....................................................................... 168
5.24.2.2 OVERWRITE service action.................................................................................................... 168
5.24.2.3 BLOCK ERASE service action ................................................................................................ 170
5.24.2.4 CRYPTOGRAPHIC ERASE service action ............................................................................. 170
5.24.2.5 EXIT FAILURE MODE service action ..................................................................................... 170
5.25 START STOP UNIT command........................................................................................................... 171
5.26 SYNCHRONIZE CACHE (10) command............................................................................................ 174
5.27 SYNCHRONIZE CACHE (16) command............................................................................................ 175
5.28 UNMAP command.............................................................................................................................. 176
5.28.1 UNMAP command overview ......................................................................................................... 176
5.28.2 UNMAP parameter list .................................................................................................................. 177
5.29 VERIFY (10) command ...................................................................................................................... 178
5.30 VERIFY (12) command ...................................................................................................................... 191
5.31 VERIFY (16) command ...................................................................................................................... 192
5.32 VERIFY (32) command ...................................................................................................................... 193
5.33 WRITE (10) command........................................................................................................................ 194
5.34 WRITE (12) command........................................................................................................................ 198
5.35 WRITE (16) command........................................................................................................................ 199
5.36 WRITE (32) command........................................................................................................................ 200
5.37 WRITE AND VERIFY (10) command ................................................................................................. 201
5.38 WRITE AND VERIFY (12) command ................................................................................................. 202
5.39 WRITE AND VERIFY (16) command ................................................................................................. 203
5.40 WRITE AND VERIFY (32) command ................................................................................................. 204
5.41 WRITE ATOMIC (16) command......................................................................................................... 205
5.42 WRITE ATOMIC (32) command......................................................................................................... 205
5.43 WRITE LONG (10) command............................................................................................................. 206
5.44 WRITE LONG (16) command............................................................................................................. 210
5.45 WRITE SAME (10) command............................................................................................................. 211
5.46 WRITE SAME (16) command............................................................................................................. 214
5.47 WRITE SAME (32) command............................................................................................................. 215
5.48 WRITE USING TOKEN command ..................................................................................................... 216
5.48.1 WRITE USING TOKEN command overview................................................................................. 216
5.48.2 WRITE USING TOKEN parameter list.......................................................................................... 217
5.49 XDWRITEREAD (10) command......................................................................................................... 219
5.50 XDWRITEREAD (32) command......................................................................................................... 221
5.51 XPWRITE (10) command ................................................................................................................... 222
5.52 XPWRITE (32) command ................................................................................................................... 223
6 Parameters for direct access block devices............................................................................................... 225
6.1 Parameters for direct access block devices introduction...................................................................... 225
6.2 Address descriptors.............................................................................................................................. 225
6.2.1 Address descriptor overview........................................................................................................... 225
6.2.2 Short block format address descriptor ............................................................................................ 226
6.2.3 Extended bytes from index address descriptor............................................................................... 226
6.2.4 Extended physical sector format address descriptor ...................................................................... 228
6.2.5 Long block format address descriptor............................................................................................. 229
Working Draft SCSI Block Commands 4 (SBC-4)

xi

T10/BSR INCITS 506 Revision 3

27 August 2014

6.2.6 Bytes from index format address descriptor ................................................................................... 229


6.2.7 Physical sector format address descriptor ...................................................................................... 230
6.3 Diagnostic parameters.......................................................................................................................... 231
6.3.1 Diagnostic parameters overview..................................................................................................... 231
6.3.2 Rebuild Assist Input diagnostic page .............................................................................................. 232
6.3.3 Rebuild Assist Output diagnostic page ........................................................................................... 233
6.3.4 Translate Address Input diagnostic page........................................................................................ 234
6.3.5 Translate Address Output diagnostic page..................................................................................... 236
6.4 Log parameters .................................................................................................................................... 237
6.4.1 Log parameters overview................................................................................................................ 237
6.4.1.1 Summary of log pages .............................................................................................................. 237
6.4.1.2 Setting and resetting log parameters ........................................................................................ 238
6.4.2 Background Scan log page............................................................................................................. 238
6.4.2.1 Background Scan log page overview ........................................................................................ 238
6.4.2.2 Background Scan Status log parameter.................................................................................... 240
6.4.2.3 Background Scan Results log parameter.................................................................................. 242
6.4.3 Format Status log page................................................................................................................... 245
6.4.3.1 Format Status log page overview.............................................................................................. 245
6.4.3.2 Format Data Out log parameter ................................................................................................ 246
6.4.3.3 Grown Defects During Certification log parameter .................................................................... 247
6.4.3.4 Total Blocks Reassigned During Format log parameter............................................................ 248
6.4.3.5 Total New Blocks Reassigned log parameter ........................................................................... 249
6.4.3.6 Power On Minutes Since Format log parameter ....................................................................... 250
6.4.4 Logical Block Provisioning log page ............................................................................................... 251
6.4.4.1 Logical Block Provisioning log page overview........................................................................... 251
6.4.4.2 Available LBA Mapping Resource Count log parameter ........................................................... 253
6.4.4.2.1 Available LBA Mapping Resource Count log parameter overview ...................................... 253
6.4.4.2.2 RESOURCE COUNT field.......................................................................................................... 254
6.4.4.3 Used LBA Mapping Resource Count log parameter ................................................................. 254
6.4.4.4 De-duplicated LBA Resource Count log parameter .................................................................. 255
6.4.4.5 Compressed LBA Resource Count log parameter .................................................................... 256
6.4.4.6 Total Efficiency LBA Resource Count log parameter ................................................................ 257
6.4.5 Non-volatile Cache log page........................................................................................................... 258
6.4.5.1 Non-volatile Cache log page overview ...................................................................................... 258
6.4.5.2 Remaining Nonvolatile Time log parameter .............................................................................. 259
6.4.5.3 Maximum Nonvolatile Time log parameter ................................................................................ 260
6.4.6 Pending Defects log page............................................................................................................... 260
6.4.6.1 Overview ................................................................................................................................... 260
6.4.6.2 Pending Defect Count log parameter ........................................................................................ 262
6.4.6.3 Pending Defect log parameter................................................................................................... 262
6.4.7 The LOGICAL BLOCK ADDRESS field indicates the LBA associated with the unrecovered medium
error.Solid State Media log page ........................................................................................................ 263
6.4.7.1 Solid State Media log page overview ........................................................................................ 263
6.4.7.2 Percentage Used Endurance Indicator log parameter .............................................................. 264
6.5 Mode parameters ................................................................................................................................. 265
6.5.1 Mode parameters overview............................................................................................................. 265
6.5.2 Mode parameter block descriptors.................................................................................................. 267
6.5.2.1 Mode parameter block descriptors overview............................................................................. 267
6.5.2.2 Short LBA mode parameter block descriptor ............................................................................ 267
6.5.2.3 Long LBA mode parameter block descriptor ............................................................................. 269
6.5.3 Application Tag mode page ............................................................................................................ 270
6.5.3.1 Introduction................................................................................................................................ 270
6.5.3.2 Application tag descriptor .......................................................................................................... 272
6.5.4 Background Control mode page ..................................................................................................... 273
6.5.5 Caching mode page........................................................................................................................ 275
6.5.6 Informational Exceptions Control mode page ................................................................................. 279
6.5.7 Logical Block Provisioning mode page ........................................................................................... 284
xii

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.5.7.1 Introduction................................................................................................................................ 284


6.5.7.2 Threshold descriptor format ...................................................................................................... 285
6.5.8 Read-Write Error Recovery mode page.......................................................................................... 286
6.5.9 Verify Error Recovery mode page................................................................................................... 290
6.6 Vital product data (VPD) parameters.................................................................................................... 291
6.6.1 VPD parameters overview .............................................................................................................. 291
6.6.2 Block Device Characteristics VPD page ......................................................................................... 292
6.6.3 Block Device Characteristics Extension VPD page ........................................................................ 295
6.6.4 Block Limits VPD page ................................................................................................................... 297
6.6.5 Logical Block Provisioning VPD page............................................................................................. 303
6.6.6 Referrals VPD page ........................................................................................................................ 305
6.6.7 Third-Party Copy VPD page ........................................................................................................... 306
6.6.7.1 Third-Party Copy VPD page overview....................................................................................... 306
6.6.7.2 Block device third-party copy descriptor type codes ................................................................. 306
6.6.7.3 Block Device ROD Token Limits descriptor .............................................................................. 307
6.6.8 Supported Block Lengths And Protection Types VPD page ........................................................... 308
6.7 Copy manager parameters................................................................................................................... 309
Annex A (informative) Numeric order codes ................................................................................................. 310
A.1 Variable length CDBs........................................................................................................................... 310
A.2 Service action CDBs ............................................................................................................................ 311
Annex B (informative) XOR command examples.......................................................................................... 312
B.1 XOR command examples overview ..................................................................................................... 312
B.2 Update write operation ......................................................................................................................... 312
B.3 Regenerate operation .......................................................................................................................... 313
B.4 Rebuild operation ................................................................................................................................. 314
Annex C (informative) CRC example in C..................................................................................................... 316
Annex D (informative) Sense information for locked or encrypted logical units ............................................ 318
Annex E (informative) Optimizing block access characteristics .................................................................... 319
E.1 Optimizing block access overview ....................................................................................................... 319
E.2 Starting logical block offset .................................................................................................................. 319
E.3 Optimal granularity sizes...................................................................................................................... 319
E.4 Optimizing transfers ............................................................................................................................. 319
E.5 Examples ............................................................................................................................................. 320
Annex F (informative) Logical block provisioning reporting examples .......................................................... 321
F.1 Logical block provisioning reporting examples overview...................................................................... 321
F.2 Interpreting log parameter counts ........................................................................................................ 321
F.3 Dedicated resource, threshold set tracked example ............................................................................ 322
F.3.1 Dedicated resource, threshold set tracked example overview ....................................................... 322
F.3.2 Dedicated resource, threshold set tracked example configuration ................................................. 322
F.3.3 Dedicated resource, threshold set tracked example sequence ...................................................... 323
F.3.4 Dedicated resource, threshold set tracked example initial conditions ............................................ 324
F.3.5 Operations that occur ..................................................................................................................... 324
F.3.6 Dedicated resource, threshold set tracked example final log page values..................................... 325
F.4 Shared resource, logical block tracked example.................................................................................. 325
F.4.1 Shared resource, logical block tracked example overview ............................................................. 325
F.4.2 Shared resource, logical block tracked example configuration....................................................... 326
F.4.3 Shared resource, logical block tracked example time line.............................................................. 326
F.4.4 Shared resource, logical block tracked example initial conditions.................................................. 327
F.4.5 Operations that occur ..................................................................................................................... 327
F.4.6 Shared resource, logical block tracked example final log page values .......................................... 328
F.5 Shared available, dedicated used, logical block tracked example ....................................................... 329
Working Draft SCSI Block Commands 4 (SBC-4)

xiii

T10/BSR INCITS 506 Revision 3

27 August 2014

F.5.1 Shared available, dedicated used, logical block tracked example overview .................................. 329
F.5.2 Shared available, dedicated used, logical block tracked example configuration ............................ 329
F.5.3 Shared available, dedicated used, logical block tracked example time line ................................... 329
F.5.4 Shared available, dedicated used, logical block tracked example initial conditions ....................... 330
F.5.5 Operations that occur ..................................................................................................................... 330
F.5.6 Shared available, dedicated used, example final log page values ................................................. 331
Annex G (informative) Discovering referrals examples................................................................................. 332
G.1 Referrals example with no user data segment multiplier ..................................................................... 332
G.2 Referrals example with non-zero user data segment multiplier........................................................... 334
Annex H (informative) Bibliography............................................................................................................... 336

xiv

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Tables
Page
Table 1 Direct access block device type mode topics and references ........................................................ 2
Table 2 Numbering convention examples ................................................................................................. 14
Table 3 Comparison of decimal prefixes and binary prefixes .................................................................... 15
Table 4 Direct access block device type model topics .............................................................................. 17
Table 5 Logical block provisioning states supported by logical block provisioning type ............................ 25
Table 6 WRITE SAME command and unmap operations ......................................................................... 28
Table 7 Threshold resource value, threshold type value, and threshold arming value for logical block
provisioning thresholds ............................................................................................................................... 30
Table 8 Logical block data returned by a read operation from a mapped LBA ......................................... 35
Table 9 Logical block data returned by a read operation from an unmapped LBA ................................... 35
Table 10 Defect lists (i.e., PLIST and GLIST) ........................................................................................... 42
Table 11 Address descriptor formats ......................................................................................................... 44
Table 12 SBC-3 commands that are allowed in the presence of various reservations ............................. 49
Table 13 Example error conditions ............................................................................................................ 51
Table 14 Sense data field usage for direct access block devices ............................................................. 52
Table 15 Block commands sense data descriptor format .......................................................................... 54
Table 16 User data segment referral sense data descriptor format .......................................................... 55
Table 17 User data segment referral descriptor format ............................................................................. 56
Table 18 Target port group descriptor ....................................................................................................... 57
Table 19 Direct-access block device sense data descriptor format .......................................................... 57
Table 20 Summary of states in the SSU_PC state machine ..................................................................... 64
Table 21 Logical block data format with a single protection information interval ....................................... 79
Table 22 An example of the logical block data for a logical block with more than one protection
information interval ..................................................................................................................................... 80
Table 23 Content of the first LOGICAL BLOCK REFERENCE TAG field for the first logical block in the Data-In
Buffer and/or Data-Out Buffer .................................................................................................................... 81
Table 24 Content of subsequent LOGICAL BLOCK REFERENCE TAG fields for a logical block in the Data-In
Buffer and/or Data-Out Buffer .................................................................................................................... 82
Table 25 CRC polynomials ........................................................................................................................ 83
Table 26 CRC test cases ........................................................................................................................... 84
Table 27 Associations between commands and CbCS permissions ........................................................ 90
Table 28 Commands that require uninterrupted sequences ..................................................................... 92
Table 29 Performing an ORWRITE set operation ..................................................................................... 97
Table 30 ROD token type values ............................................................................................................. 100
Table 31 Block device zero ROD token format ....................................................................................... 100
Table 32 Performing atomic operations with overlapping LBAs during current operations ..................... 102
Table 33 Commands for direct access block devices ............................................................................. 104
Table 34 COMPARE AND WRITE command ......................................................................................... 108
Table 35 FORMAT UNIT command ........................................................................................................ 111
Table 36 FORMAT UNIT command address descriptor support requirements ....................................... 112
Table 37 FORMAT UNIT parameter list .................................................................................................. 113
Table 38 Short parameter list header ...................................................................................................... 113
Table 39 Long parameter list header ....................................................................................................... 114
Table 40 FMTPINFO field and PROTECTION FIELD USAGE field ..................................................................... 115
Table 41 Initialization pattern descriptor .................................................................................................. 118
Table 42 INITIALIZATION PATTERN TYPE field .............................................................................................. 119
Table 43 GET LBA STATUS command .................................................................................................. 120
Table 44 GET LBA STATUS parameter data .......................................................................................... 121
Table 45 LBA status descriptor format .................................................................................................... 122
Table 46 PROVISIONING STATUS field ......................................................................................................... 122
Table 47 ORWRITE (16) command ........................................................................................................ 123
Table 48 ORPROTECT field - checking protection information from the read operations ........................... 124
Table 49 ORPROTECT field - checking protection information from the Data-Out Buffer ........................... 127
Table 50 ORWRITE (32) command ........................................................................................................ 129
Working Draft SCSI Block Commands 4 (SBC-4)

xv

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 51 BMOP field .................................................................................................................................. 130


Table 52 POPULATE TOKEN command ................................................................................................ 131
Table 53 POPULATE TOKEN parameter list .......................................................................................... 132
Table 54 Block device range descriptor .................................................................................................. 134
Table 55 PRE-FETCH (10) command ..................................................................................................... 135
Table 56 PRE-FETCH (16) command ..................................................................................................... 136
Table 57 PREVENT ALLOW MEDIUM REMOVAL command ................................................................ 137
Table 58 PREVENT field ............................................................................................................................ 137
Table 59 READ (10) command ............................................................................................................... 138
Table 60 RDPROTECT field ........................................................................................................................ 139
Table 61 READ (12) command ............................................................................................................... 143
Table 62 READ (16) command ............................................................................................................... 144
Table 63 READ (32) command ............................................................................................................... 145
Table 64 READ CAPACITY (10) command ............................................................................................ 146
Table 65 READ CAPACITY (10) parameter data .................................................................................... 147
Table 66 READ CAPACITY (16) command ............................................................................................ 148
Table 67 READ CAPACITY (16) parameter data .................................................................................... 149
Table 68 P_TYPE field and PROT_EN bit .................................................................................................... 149
Table 69 LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field ............................................................... 150
Table 70 READ DEFECT DATA (10) command ..................................................................................... 151
Table 71 REQ_PLIST bit and REQ_GLIST bit ............................................................................................... 151
Table 72 READ DEFECT DATA (10) parameter data ............................................................................. 152
Table 73 READ DEFECT DATA (12) command ..................................................................................... 153
Table 74 READ DEFECT DATA (12) parameter data ............................................................................. 154
Table 75 READ LONG (10) command .................................................................................................... 155
Table 76 READ LONG (16) command .................................................................................................... 157
Table 77 REASSIGN BLOCKS command ............................................................................................... 158
Table 78 REASSIGN BLOCKS parameter list ......................................................................................... 159
Table 79 REASSIGN BLOCKS short parameter list header ................................................................... 159
Table 80 REASSIGN BLOCKS long parameter list header ..................................................................... 159
Table 81 Reassign LBA if the LONGLBA bit is set to zero ......................................................................... 160
Table 82 Reassign LBA if the LONGLBA bit is set to one .......................................................................... 160
Table 83 RECEIVE ROD TOKEN INFORMATION reference ................................................................. 161
Table 84 RECEIVE ROD TOKEN INFORMATION parameter data for POPULATE TOKEN ................. 162
Table 85 RECEIVE ROD TOKEN INFORMATION parameter data for WRITE USING TOKEN ............ 164
Table 86 REPORT REFERRALS command ........................................................................................... 165
Table 87 REPORT REFERRALS parameter data ................................................................................... 166
Table 88 SANITIZE command ................................................................................................................. 167
Table 89 SANITIZE service action codes ................................................................................................ 168
Table 90 OVERWRITE service action parameter list .............................................................................. 169
Table 91 TEST field ................................................................................................................................... 169
Table 92 START STOP UNIT command ................................................................................................. 171
Table 93 POWER CONDITION and POWER CONDITION MODIFIER field ........................................................... 172
Table 94 SYNCHRONIZE CACHE (10) command .................................................................................. 174
Table 95 SYNCHRONIZE CACHE (16) command .................................................................................. 175
Table 96 UNMAP command .................................................................................................................... 176
Table 97 UNMAP parameter list .............................................................................................................. 177
Table 98 UNMAP block descriptor .......................................................................................................... 178
Table 99 Data-Out Buffer contents for the VERIFY (10) command ........................................................ 179
Table 100 VERIFY (10) command .......................................................................................................... 179
Table 101 VRPROTECT field with the BYTCHK field set to 00b checking protection information from the
verify operations ....................................................................................................................................... 181
Table 102 VRPROTECT field with the BYTCHK field set to 01b or 11b checking protection information
from the verify operations ......................................................................................................................... 184
Table 103 VRPROTECT field with the BYTCHK field set to 01b or 11b checking protection information
from the Data-Out Buffer .......................................................................................................................... 186
Table 104 VRPROTECT field with the BYTCHK field set to 01b or 11b compare operation requirements . 188
xvi

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 105 VERIFY (12) command .......................................................................................................... 191


Table 106 VERIFY (16) command .......................................................................................................... 192
Table 107 VERIFY (32) command .......................................................................................................... 193
Table 108 WRITE (10) command ............................................................................................................ 194
Table 109 WRPROTECT field ..................................................................................................................... 195
Table 110 WRITE (12) command ............................................................................................................ 198
Table 111 WRITE (16) command ............................................................................................................ 199
Table 112 WRITE (32) command ............................................................................................................ 200
Table 113 WRITE AND VERIFY (10) command ..................................................................................... 201
Table 114 WRITE AND VERIFY (12) command ..................................................................................... 202
Table 115 WRITE AND VERIFY (16) command ..................................................................................... 203
Table 116 WRITE AND VERIFY (32) command ..................................................................................... 204
Table 117 WRITE ATOMIC (16) command ............................................................................................. 205
Table 118 WRITE ATOMIC (32) command ............................................................................................. 206
Table 119 WRITE LONG (10) command ................................................................................................. 207
Table 120 COR_DIS bit, WR_UNCOR bit, and PBLOCK bit ............................................................................ 208
Table 121 WRITE LONG (16) command ................................................................................................. 210
Table 122 WRITE SAME (10) command ................................................................................................. 212
Table 123 UNMAP bit, ANCHOR bit, and ANC_SUP bit relationships ............................................................ 213
Table 124 WRITE SAME (16) command ................................................................................................. 214
Table 125 NDOB bit and UNMAP bit interactions ........................................................................................ 214
Table 126 WRITE SAME (32) command ................................................................................................. 215
Table 127 WRITE USING TOKEN command ......................................................................................... 216
Table 128 WRITE USING TOKEN parameter list ................................................................................... 217
Table 129 XDWRITEREAD (10) command ............................................................................................. 220
Table 130 XDWRITEREAD (32) command ............................................................................................. 221
Table 131 XPWRITE (10) command ....................................................................................................... 222
Table 132 XPWRITE (32) command ....................................................................................................... 223
Table 133 Parameters for direct access block devices ........................................................................... 225
Table 134 Address descriptors ................................................................................................................ 226
Table 135 Short block format address descriptor (000b) ........................................................................ 226
Table 136 Extended bytes from index format address descriptor (001b) ................................................ 227
Table 137 Sorting order for extended bytes from index format address descriptors ............................... 227
Table 138 Extended physical sector format address descriptor (010b) .................................................. 228
Table 139 Sorting order for extended physical sector format address descriptors ................................. 229
Table 140 Long block format address descriptor (011b) ......................................................................... 229
Table 141 Bytes from index format address descriptor (100b) ................................................................ 229
Table 142 Sorting order for bytes from index format address descriptors ............................................... 230
Table 143 Physical sector format address descriptor (101b) .................................................................. 230
Table 144 Sorting order for physical sector format address descriptors ................................................. 230
Table 145 Diagnostic page codes for direct access block devices ......................................................... 231
Table 146 Rebuild Assist Input diagnostic page ...................................................................................... 232
Table 147 Rebuild Assist Output diagnostic page ................................................................................... 233
Table 148 Translate Address Input diagnostic page ............................................................................... 234
Table 149 Translate Address Output diagnostic page ............................................................................ 236
Table 150 Log page codes and subpage codes for direct access block devices .................................... 237
Table 151 Keywords for resetting or changing log parameters ............................................................... 238
Table 152 Background Scan log page parameter codes ........................................................................ 239
Table 153 Background Scan log page .................................................................................................... 239
Table 154 Background Scan Status log parameter format ...................................................................... 240
Table 155 BACKGROUND SCAN STATUS field .............................................................................................. 241
Table 156 Background Scan Results log parameter format .................................................................... 242
Table 157 REASSIGN STATUS field ............................................................................................................. 243
Table 158 Format Status log page parameter codes .............................................................................. 245
Table 159 Format Status log page .......................................................................................................... 245
Table 160 Format Data Out log parameter format .................................................................................. 246
Table 161 Grown Defects During Certification log parameter format ...................................................... 247
Working Draft SCSI Block Commands 4 (SBC-4)

xvii

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 162 Total Blocks Reassigned During Format log parameter format .............................................. 248
Table 163 Total New Blocks Reassigned log parameter format ............................................................. 249
Table 164 Power On Minutes Since Format log parameter format ......................................................... 250
Table 165 Logical Block Provisioning log parameters ............................................................................. 251
Table 166 Logical Block Provisioning log page ....................................................................................... 252
Table 167 Available LBA Mapping Resource Count log parameter format ............................................. 253
Table 168 SCOPE field .............................................................................................................................. 253
Table 169 Used LBA Mapping Resource Count log parameter format ................................................... 254
Table 170 De-duplicated LBA Resource Count log parameter format .................................................... 255
Table 171 Compressed LBA Resource Count log parameter format ...................................................... 256
Table 172 Total Efficiency LBA Resource Count log parameter format .................................................. 257
Table 173 Nonvolatile Cache log parameters ......................................................................................... 258
Table 174 Nonvolatile Cache log page .................................................................................................... 258
Table 175 Remaining Nonvolatile Time parameter data ......................................................................... 259
Table 176 REMAINING NONVOLATILE TIME field ........................................................................................... 259
Table 177 Maximum Nonvolatile Time parameter data ........................................................................... 260
Table 178 MAXIMUM NONVOLATILE TIME field ............................................................................................. 260
Table 179 Pending Defects log page parameter codes .......................................................................... 261
Table 180 Pending Defects log page ...................................................................................................... 261
Table 181 Pending Defect Count log parameter format .......................................................................... 262
Table 182 Pending Defect log parameter format ..................................................................................... 263
Table 183 Solid State Media log parameters .......................................................................................... 263
Table 184 Solid State Media log page ..................................................................................................... 264
Table 185 Percentage Used Endurance Indicator log parameter format ................................................ 264
Table 186 Mode page codes and subpage codes for direct access block devices ................................. 265
Table 187 DEVICE-SPECIFIC PARAMETER field for direct access block devices .......................................... 266
Table 188 Short LBA mode parameter block descriptor .......................................................................... 267
Table 189 Long LBA mode parameter block descriptor .......................................................................... 269
Table 190 Application Tag mode page .................................................................................................... 271
Table 191 Application tag descriptor format ............................................................................................ 272
Table 192 Background Control mode page ............................................................................................. 273
Table 193 Caching mode page ............................................................................................................... 275
Table 194 DEMAND READ RETENTION PRIORITY field .................................................................................. 276
Table 195 WRITE RETENTION PRIORITY field .............................................................................................. 277
Table 196 SYNC_PROG field ...................................................................................................................... 278
Table 197 Informational Exceptions Control mode page ......................................................................... 279
Table 198 Definitions for the combinations of values in EWASC, DEXCPT, and TEST .............................. 280
Table 199 Method of reporting informational exceptions (MRIE) field ...................................................... 281
Table 200 Use of the INTERVAL TIMER field and the REPORT COUNT field based on the MRIE field ............ 283
Table 201 Logical Block Provisioning mode page ................................................................................... 284
Table 202 Threshold descriptor format .................................................................................................... 285
Table 203 THRESHOLD TYPE field .............................................................................................................. 285
Table 204 THRESHOLD ARMING field .......................................................................................................... 285
Table 205 Read-Write Error Recovery mode page ................................................................................. 286
Table 206 Error recovery bit combinations .............................................................................................. 288
Table 207 Verify Error Recovery mode page .......................................................................................... 290
Table 208 VPD page codes for direct access block devices ................................................................... 291
Table 209 Block Device Characteristics VPD page ................................................................................. 292
Table 210 MEDIUM ROTATION RATE field .................................................................................................... 292
Table 211 PRODUCT TYPE field ................................................................................................................. 293
Table 212 WABEREQ field ......................................................................................................................... 293
Table 213 WACEREQ field ......................................................................................................................... 294
Table 214 NOMINAL FORM FACTOR field ..................................................................................................... 294
Table 215 Block Device Characteristics Extension VPD page ................................................................ 295
Table 216 UTILIZATION TYPE field .............................................................................................................. 295
Table 217 utilization units field ................................................................................................................ 296
Table 218 utilization interval field ............................................................................................................ 296
xviii

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 219 Block Limits VPD page ........................................................................................................... 299


Table 220 Transfer limits for commands ................................................................................................. 301
Table 221 Logical Block Provisioning VPD page .................................................................................... 303
Table 222 PROVISIONING TYPE field .......................................................................................................... 304
Table 223 Referrals VPD page ................................................................................................................ 305
Table 224 Block device third-party copy descriptor type codes .............................................................. 306
Table 225 Block Device ROD Token Limits descriptor ............................................................................ 307
Table 226 Logical block length and protection types descriptor format ................................................... 308
Table 227 ROD token device type specific data ...................................................................................... 309
Table A.1 Variable length command service action code assignments .................................................. 310
Table A.2 SERVICE ACTION IN (16) service actions ............................................................................. 311
Table A.3 SERVICE ACTION OUT (16) service actions ......................................................................... 311
Table D.1 Sense information for locked or encrypted logical units .......................................................... 318
Table F.1 Dedicated resource, threshold set tracked example capacity information .............................. 322
Table F.2 Dedicated resource, threshold set tracked example capacity information .............................. 323
Table F.3 Dedicated resource, threshold set tracked example initial conditions ..................................... 324
Table F.4 Dedicated resource, threshold set tracked example final log page values ............................. 325
Table F.5 Shared resource, logical block tracked example capacity information .................................... 326
Table F.6 Shared resource, logical block tracked example initial conditions .......................................... 327
Table F.7 Shared resource, logical block tracked example final log page values ................................... 328
Table F.8 Shared available, dedicated used example capacity information ............................................ 329
Table F.9 Shared resource, logical block tracked example initial conditions .......................................... 330
Table F.10 Shared available, dedicated used example final log page values ......................................... 331
Table G.1 Referrals application client information with no user data segment multiplier ........................ 333
Table G.2 User data segment calculations with no user data segment multiplier ................................... 333
Table G.3 Referrals application client information with non-zero user data segment multiplier .............. 335
Table G.4 User data segment calculations with non-zero user data segment multiplier ......................... 335

Working Draft SCSI Block Commands 4 (SBC-4)

xix

T10/BSR INCITS 506 Revision 3

27 August 2014

Figures
Page
Figure 0 SCSI document relationships ..................................................................................................... xxii
Figure 1 Example state machine figure ..................................................................................................... 15
Figure 2 One or more physical blocks per logical block examples ............................................................ 22
Figure 3 One or more logical blocks per physical block examples ............................................................ 23
Figure 4 Two logical blocks per physical block alignment examples ......................................................... 23
Figure 5 Four logical blocks per physical block alignment examples ........................................................ 24
Figure 6 Examples of the relationship between mapped and unmapped LBAs and physical blocks ........ 25
Figure 7 Armed decreasing threshold operation ....................................................................................... 31
Figure 8 Armed increasing threshold operation ......................................................................................... 31
Figure 9 LBP state machine (anchored LBAs supported and deallocated LBAs supported) .................... 33
Figure 10 LBP state machine (anchored LBAs not supported) ................................................................. 34
Figure 11 LBP state machine (deallocated LBAs not supported) .............................................................. 34
Figure 12 SSU_PC state machine ............................................................................................................. 66
Figure 13 Referrals .................................................................................................................................... 93
Figure B.1 Update write operation (SCSI storage array device supervised) ........................................... 313
Figure B.2 Regenerate operation (SCSI storage array device supervised) ............................................ 314
Figure B.3 Rebuild operation (SCSI storage array device supervised) ................................................... 315
Figure G.1 Referrals example with no user data segment multiplier ....................................................... 332
Figure G.2 Referrals example with non-zero user data segment multiplier ............................................. 334

xx

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Foreword
This foreword is not part of American National Standard BSR INCITS 514.
This purpose of this standard is to define the model and command set extensions to be used in conjunction
with the SCSI Primary Command Set standard 4 (SPC-4) to facilitate operation of SCSI direct-access block
devices (e.g., hard disk drives).
Requests for interpretation, suggestions for improvement and addenda, or defect reports are welcome. They
should be sent to the INCITS Secretariat, International Committee for Information Technology Standards,
Information Technology Institute Council, Suite 610 K Street, NW, Washington, DC 20005.
This standard was processed and approved for submittal to ANSI by the International Committee for
Information Technology Standards (INCITS). Committee approval of the standard does not necessarily imply
that all committee members voted for approval. At the time it approved this standard, INCITS had the following
members:
Karen Higginbottom, Chair
David Michael, Vice-Chair

INCITS Technical Committee T10 on SCSI Storage Interfaces, which developed and reviewed this standard,
had the following members:
John B. Lohmeyer, Chair
William Martin, Vice-Chair
Ralph O. Weber, Secretary

Organization Represented
Name of Representative
.............................................................................................

Introduction
The standard is organized as follows:
Clause 1 (Scope) describes the relationship of this standard to the SCSI family of standards.
Clause 2 (Normative references) provides references to other standards and documents.
Clause 3 (Definitions, symbols, abbreviations, keywords, and conventions) defines terms and
conventions used throughout this standard.
Clause 4 (Direct access block device type model) provides an overview of the direct-access block
device type.
Clause 5 (Commands for direct access block devices) defines commands specific to direct-access block
devices.
Clause 6 (Parameters for direct access block devices) defines address descriptors, diagnostic pages,
mode parameters and pages, log pages, VPD pages, and copy manager parameters specific
to direct-access block devices.
Informative Annex A (Numeric order codes) summarizes service action assignments for variable-length
commands and commands using the SERVICE ACTION IN operation code and SERVICE
ACTION OUT operation code.
Working Draft SCSI Block Commands 4 (SBC-4)

xxi

T10/BSR INCITS 506 Revision 3

27 August 2014

Informative Annex B (XOR command examples) provides examples of XOR command usage.
Informative Annex C (CRC example in C) provides example C code for generating the CRC contained in
the protection information LOGICAL BLOCK GUARD field.
Informative Annex D (Sense information for locked or encrypted logical units) describes the conditions
relative to the sense key and the additional sense code returned by the device server with the
CHECK CONDITION status for a SCSI target device that is locked or encrypted.
Informative Annex E (Optimizing block access characteristics) describes an example method that
application clients may use to achieve optimal performance for logical block access.
Informative Annex F (Logical block provisioning reporting examples) provides examples of
implementations for different methods of reporting logical block provisioning.
Informative Annex G (Discovering referrals examples) provides examples for referrals with no user data
segment multiple and referrals with a non-zero user data segment multiplier.
Informative Annex H (Bibliography) provides a list of informative references for this standard.

SCSI standards family

SCSI Architecture Model


(SAM-5)

Figure 0 shows the relationship of this standard to the other standards and related projects in the SCSI family
of standards as of the publication of this standard.

Device-type specific command sets


(e.g., MMC-6, this standard)

Primary command set


(shared for all device types)
(SPC-4)

SCSI transport protocols


(e.g., SPL-2, FCP-4)

Interconnects
(e.g., SAS-3, Fibre Channel)
Figure 0 SCSI document relationships

Figure 0 is intended to show the general relationship of the documents to one another and is not intended to
imply a relationship such as a hierarchy, protocol stack, or system architecture.
The set of SCSI standards specifies the interfaces, functions, and operations necessary to ensure
interoperability between conforming SCSI implementations. This standard is a functional description.
Conforming implementations may employ any design technique that does not violate interoperability. See
SAM-5 for more information about the relationships between the SCSI standards.
This standard makes obsolete the following concepts from SBC-3:
a) The eer and dcr bit in the Read-Write Error recover mode page.

xxii

Working Draft SCSI Block Commands 4 (SBC-4)

AMERICAN NATIONAL STANDARD

BSR INCITS 506:201x

American National Standard


for Information Technology -

SCSI Block Commands 4 (SBC-4)


1 Scope
This standard defines the command set extensions to facilitate operation of SCSI direct access block devices.
The clauses in this standard, implemented in conjunction with the applicable clauses of SPC-5, specify the
standard command set for SCSI direct access block devices.
The objectives of this standard are to:
a) permit an application client to communicate over a SCSI service delivery subsystem (see SAM-5) with
a logical unit that declares itself to be a direct access block device in the PERIPHERAL DEVICE TYPE field
of the standard INQUIRY data (see SPC-5); and
b) define commands and parameters unique to the direct access block device type.

2 Normative references
2.1 Normative references overview
The following standards contain provisions that, by reference in the text, constitute provisions of this standard.
At the time of publication, the editions indicated were valid. All standards are subject to revision, and parties to
agreements based on this standard are encouraged to investigate the possibility of applying the most recent
editions of the standards listed below.
Copies of the following documents may be obtained from ANSI:
a) approved ANSI standards;
b) approved and draft international and regional standards (e.g., ISO, IEC); and
c) approved and draft foreign standards (e.g., JIS and DIN).
For further information, contact ANSI Customer Service Department at (212) 642-4980 (phone),
(212) 302-1286 (fax) or via the World Wide Web at http://www.ansi.org.
Additional availability contact information is provided below as needed.

2.2 Approved references


At the time of publication, the following referenced standards were approved.
ISO/IEC 14776-342, SCSI-3 Controller Commands - 2 (SCC-2) (ANSI INCITS 318-1998)
ISO/IEC 14776-262, SAS Protocol Layer-2 (SPL-2) (ANSI INCITS 505-2013)
INCITS 468-2010, Multi-Media Commands - 6 (MMC-6)
INCITS 468-2010/AM 1 MultiMedia Command Set - 6 - Amendment 1 (MMC-6/AM 1)

2.3 References under development


At the time of publication, the following referenced standards were still under development. For information on
the current status of the documents, or regarding availability, contact the relevant standards body as indicated.
ISO/IEC 14776-415, SCSI Architecture Model - 5 (SAM-5) (T10/2104-D)
ISO/IEC 14776-454, SCSI Primary Commands - 4 (SPC-4) (T10/1731-D)
ISO/IEC 14776-373, SCSI Enclosure Services - 3 (SES-3) (T10/2149-D)
ISO/IEC 14776-923, SCSI / ATA Translation - 3 (SAT-3) (T10/2126-D)
ISO/IEC 14776-345, Zoned Block Commands (ZBC) (T10/BSR INCITS 536)

Working Draft SCSI Block Commands 4 (SBC-4)

T10/BSR INCITS 506 Revision 3

27 August 2014

3 Definitions, symbols, abbreviations, keywords, and conventions


3.1 Definitions, symbols, abbreviations, keywords, and conventions Introduction
Table 1 shows the topics in clause 3 and a reference to the subclause where each topic is described.

Table 1 Direct access block device type mode topics and references
Topic

Reference

Definitions

3.2

Symbols

3.3

Abbreviations

3.4

Keywords

3.5

Editorial conventions

3.6

Numeric conventions

3.7

State machine conventions

3.8

3.2 Definitions
3.2.1 additional sense code
combination of the ADDITIONAL SENSE CODE field and the ADDITIONAL SENSE CODE QUALIFIER field in sense data

Note 1 to entry: See SPC-4.


3.2.2 AND
Boolean arithmetic function (see 3.2.14) on two binary input values that results in an output value of one if
both of the input values are one or zero if either of the input values is zero
3.2.3 AND operation
performance of an AND (see 3.2.2) bitwise on two multiple-bit input values both having the same number of
bits (e.g., on the current content of a logical block and the content contained in the Data-Out Buffer having the
same number of bytes)
3.2.4 anchored
logical block provisioning state of an LBA (see 4.7.1) in which physical capacity has been reserved for the
referenced logical block (see 4.7.4.8)
3.2.5 application client
object that is the source of SCSI commands

Note 1 to entry: See SAM-5.


3.2.6 atomic command
atomic write command

Note 1 to entry: See 4.31.


3.2.7 atomic operation
atomic write operation

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

3.2.8 automatic read reassignment


sequence after the device server detects a recovered read error during which the device server, without
intervention from an application client, performs a reassign operation on the LBA for which the error was
detected
3.2.9 atomic write command
command that performs an atomic write operation

Note 1 to entry: See 4.31.


3.2.10 atomic write operation
process by which a device server performs a write operation that is either completed in its entirety or has no
effects on stored logical block data as described in 4.30
3.2.11 automatic write reassignment
sequence after the device server detects a recovered error or an unrecovered error during which the device
server, without intervention from an application client, performs a reassign operation on the LBA for which the
error was detected
3.2.12 background function
either a background scan operation (see 4.24) or a device specific background function (see 3.2.27)
3.2.13 bitmap buffer
temporary buffer within a device server (e.g., for one or more bytes of the result of an AND operation
(see 3.2.3) or an OR operation (see 3.2.58))
3.2.14 Boolean arithmetic function
function that produces an output from one or more inputs according to the rules of AND (see 3.2.2), XOR
(see 3.2.31), and OR (see 3.2.57)
3.2.15 byte
sequence of eight contiguous bits considered as a unit
3.2.16 cache
temporary data storage area that is capable of containing a subset of the logical block data stored by the
logical unit and is either volatile or non-volatile
3.2.17 check data
information contained within a redundancy group (see 3.2.80) that may allow lost or destroyed XOR-protected
data (see 3.2.112) to be recreated
3.2.18 command
request describing a unit of work to be performed by a device server

Note 1 to entry: See SAM-5.


3.2.19 command descriptor block (CDB)
structure used to communicate commands from an application client to a device server

Note 1 to entry: See SPC-4.


3.2.20 compare operation
process by which a device server compares two sets of data for equality
3.2.21 cyclic redundancy check (CRC)
error checking mechanism that checks data integrity by computing a polynomial algorithm based checksum
(see 4.22.4)

Working Draft SCSI Block Commands 4 (SBC-4)

T10/BSR INCITS 506 Revision 3

27 August 2014

3.2.22 Data-In Buffer


buffer specified by the application client to receive data from the device server during the processing of a
command

Note 1 to entry: See SAM-5 and SPC-4.


3.2.23 Data-Out Buffer
buffer specified by the application client to supply data that is sent from the application client to the device
server during the processing of a command

Note 1 to entry: See SAM-5 and SPC-4.


3.2.24 deallocated
logical block provisioning state of an LBA (see 4.7.1) in which physical capacity has not been reserved for the
referenced logical block (see 4.7.4.7)
3.2.25 defect list
GLIST (see 4.13) or PLIST (see 4.13)
3.2.26 device server
object within a logical unit (see 3.2.47) that processes SCSI commands according to the rules of command
management

Note 1 to entry: See SAM-5.


3.2.27 device specific background functions
SCSI target device specific functions that a SCSI target device may perform that have no specific association
with application client-initiated operations

Note 1 to entry: See SPC-4.


3.2.28 device type
type of peripheral device (i.e., device model) implemented by the device server device model
implemented by the logical unit and indicated to the application client by the PERIPHERAL DEVICE TYPE field of
the standard INQUIRY data (see SPC-4)
3.2.29 direct access block device
device that is capable of containing data stored in logical blocks that each have a unique LBA (see 4.2)
3.2.30 error correcting code (ECC)
error checking mechanism that checks data integrity and enables some errors in the logical block data to be
corrected
3.2.31 exclusive-or (XOR)
boolean arithmetic function on two binary input values that results in an output value of one if one and only
one of the input values is one, or zero if both of the input values are either zero or one
3.2.32 extent
set of logical blocks occupying contiguous LBAs on a logical unit
3.2.33 field
group of one or more contiguous bits, a part of a larger structure (e.g., a CDB (see 3.2.19) or sense data (see
SPC-4))
3.2.34 format corrupt
vendor specific condition in which the device server may not be able to perform logical block access
commands (see 4.10)

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

3.2.35 format operation


process by which a device server initializes the medium in a logical unit

Note 1 to entry: See 4.10.


3.2.36 fully provisioned logical unit
logical unit that stores logical block data for every LBA and has assigned physical capacity for every LBA

Note 1 to entry: See 4.7.2.


3.2.37 grown defect list (GLIST)
list of physical blocks that the device server has detected as containing medium defects or that the application
client has specified as containing medium defects

Note 1 to entry: See 4.13.


3.2.38 hard reset
condition resulting from the events defined by SAM-5 during which the SCSI device performs the hard reset
operations described in SAM-5, this standard, and other applicable command standards (see table 33)
3.2.39 I_T nexus
relationship between a SCSI initiator port and a SCSI target port

Note 1 to entry: See SAM-5.


3.2.40 I_T nexus loss
condition resulting from the events defined by SAM-5 during which the SCSI device performs the I_T nexus
loss operations described in SAM-5, this standard, and other applicable command standards (see table 33)
3.2.41 LBA mapping resource
resource (e.g., a physical block or a data structure associated with tracking resource usage) used by a logical
unit that supports logical block provisioning management
3.2.42 logical block
set of data bytes accessed and referenced as a unit (see 4.5)
3.2.43 logical block access command
command that requests access to one or more logical blocks that may require access to the medium

Note 1 to entry: See 4.2.2.


3.2.44 logical block address (LBA)
value used to reference a logical block (see 4.5)
3.2.45 logical block data
user data and protection information, if any
3.2.46 logical block length
number of bytes of user data in a logical block (see 4.5)
3.2.47 logical unit
externally addressable entity within a SCSI target device (see 3.2.83) that implements a SCSI device model

Note 1 to entry: See SAM-5.


3.2.48 logical unit reset
condition resulting from the events defined by SAM-5 in which the logical unit performs the logical unit reset
operations described in SAM-5, this standard, and other applicable command standards (see table 33)

Working Draft SCSI Block Commands 4 (SBC-4)

T10/BSR INCITS 506 Revision 3

27 August 2014

3.2.49 mapped
logical block provisioning state of an LBA (see 4.7.1) in which physical capacity has been assigned to the
referenced logical block (see 4.7.4.6)
3.2.50 media
plural of medium
3.2.51 medium
material that is not cache on which data is stored (e.g., a magnetic disk)
3.2.52 medium defect
area of the medium that results in a recovered error or an unrecovered error when a read medium operation or
a write medium operation is performed

Note 1 to entry: See 4.13.


3.2.53 non-atomic command
command that is not an atomic command
3.2.54 non-atomic operation
operation that is not an atomic operation
3.2.55 non-volatile cache
cache that retains logical block data through any power cycle
3.2.56 non-volatile medium
medium that retains logical block data through any power cycle
3.2.57 OR
Boolean arithmetic function (see 3.2.14) on two binary input values that results in an output value of one if
either of the input values are one or zero if both of the input values are zero
3.2.58 OR operation
performance of an OR (see 3.2.57) bitwise on two multiple-bit input values both having the same number of
bits (e.g., on the current content of a logical block and the content contained in the Data-Out Buffer having the
same number of bytes)
3.2.59 point in time ROD token
ROD token with a ROD type that is a point in time copy ROD

Note 1 to entry: See SPC-4.


3.2.60 physical block
set of data bytes accessed as a unit by the device server (see 4.6)
3.2.61 physical block length
number of bytes of logical block data in a physical block (see 4.6)
3.2.62 physical element
component that provides non-volatile storage for an associated group of logical blocks (see 4.20)
3.2.63 power cycle
sequence of power being removed followed by power being applied to a SCSI device
3.2.64 power on
condition resulting from the events defined by SAM-5 during which a SCSI device performs the power on
operations described in SAM-5, this standard, and other applicable command standards (see table 33)

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

3.2.65 primary defect list (PLIST)


list of physical blocks containing medium defects that are considered permanent

Note 1 to entry: See 4.13.


3.2.66 protection information
group of fields at the end of each logical block or at specified intervals within each logical block that contain a
logical block guard, an application tag, and a reference tag

Note 1 to entry: See 4.22.


3.2.67 protection information interval
length of user data that occurs within a logical block before each protection information
3.2.68 pseudo read data
indeterminate logical block data
3.2.69 pseudo unrecovered error
simulated error (e.g., created by a WRITE LONG command (see 5.43 and 5.44)) for which a device server
reports that it is unable to read or write a logical block, regardless of whether the data on the medium is valid,
recoverable, or unrecoverable
3.2.70 pseudo unrecovered error with correction enabled
pseudo unrecovered error (see 3.2.69) for which a device server performs the maximum error recovery as
specified in the Read-Write Error Recovery mode page (see 6.5.8)

Note 1 to entry: See 4.18.2.


3.2.71 pseudo unrecovered error with correction disabled
pseudo unrecovered error (see 3.2.69) for which a device server performs no error recovery

Note 1 to entry: See 4.18.2.


3.2.72 read cache operation
process by which a device server reads logical blocks for one or more LBAs from cache as described in 4.15
3.2.73 read command
command that requests read operations

Note 1 to entry: See 4.2.2.


3.2.74 read medium operation
process by which a device server reads logical blocks for one or more LBAs from the medium using the
parameters specified in the Read-Write Error Recovery mode page (see 6.5.8)
3.2.75 read operation
process by which a device server performs operations (e.g., read cache operations and read medium
operations) as described in this standard

Note 1 to entry: See 4.2.3.


3.2.76 reassign
perform a reassign operation
3.2.77 reassign operation
operation during which the device server changes the assignment of an LBA from a specified physical block
to another physical block and adds the specified physical block to the GLIST

Working Draft SCSI Block Commands 4 (SBC-4)

T10/BSR INCITS 506 Revision 3

27 August 2014

3.2.78 recovered error


error for which a device server is able to read or write a logical block within the recovery limits specified in the
Read-Write Error Recovery mode page (see 6.5.8) or the Verify Error Recovery mode page (see 6.5.9)
3.2.79 recovered read error
recovered error that occurs during a read medium operation
3.2.80 redundancy group
grouping of XOR-protected data (see 3.2.112) and associated check data (see 3.2.17) into a single type of
data redundancy (see SCC-2)
3.2.81 resource provisioned logical unit
logical unit that may or may not store logical block data for every LBA and that provides enough LBA mapping
resources (see 3.2.41) to map every LBA

Note 1 to entry: See 4.7.3.2.


3.2.82 sanitize operation
process by which a device server alters information on a logical unit such that recovery of previous logical
block data from the cache and the medium is not possible

Note 1 to entry: See 4.11.


3.2.83 SCSI target device
SCSI device containing logical units and SCSI target ports that receives device service requests and task
management requests for processing and sends device service responses and task management responses
to SCSI initiator devices

Note 1 to entry: See SAM-5


3.2.84 sense data (see SPC-4)
data describing command completed information that a device server delivers to an application client in the
same I_T_L_Q nexus transaction as the status or as parameter data in response to a REQUEST SENSE
command
3.2.85 sense key
contents of the SENSE KEY field in the sense data

Note 1 to entry: See SAM-5


3.2.86 status
one byte of response information that contains a coded value defined in SAM-5, transferred from a device
server to an application client upon completion of each command

Note 1 to entry: See SAM-5


3.2.87 stopped power condition
power condition in which a device server terminates TEST UNIT READY commands and logical block access
commands

Note 1 to entry: See 4.21.4.


3.2.88 synchronize cache operation
process by which a device server synchronizes logical blocks within the volatile cache with the non-volatile
cache or the medium

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

3.2.89 thin provisioned logical unit


logical unit that may or may not store logical block data for every LBA and that may or may not provide enough
LBA mapping resources (see 3.2.41) to map every LBA

Note 1 to entry: See 4.7.3.3.


3.2.90 threshold set
set of two or more logical blocks used for tracking logical block provisioning thresholds

Note 1 to entry: See 4.7.3.7.


3.2.91 threshold set size
number of LBAs in a threshold set

Note 1 to entry: See 4.7.3.7.


3.2.92 token
representation of a collection of data

Note 1 to entry: See SPC-4.


3.2.93 unit attention condition
state that a logical unit (see 3.2.47) maintains while the logical unit has asynchronous status information to
report to the SCSI initiator ports associated with one or more I_T nexuses (see 3.2.39)

Note 1 to entry: See SAM-5.


3.2.94 unmap command
command that requests an unmap operation

Note 1 to entry: See 4.2.2.


3.2.95 unmap operation
process by which a device server either deallocates or anchors a single LBA

Note 1 to entry: See 4.2.3 and 4.7.3.4.


3.2.96 unmapped
logical block provisioning state of an LBA (see 4.7.1) in which the LBA is either anchored or deallocated
3.2.97 unrecovered error
error for which a device server is unable to read a logical block or write a logical block within the recovery
limits specified in the Read-Write Error Recovery mode page (see 6.5.8) and/or the Verify Error Recovery
mode page (see 6.5.9)
3.2.98 unrecovered read error
unrecovered error that occurs during a read medium operation
3.2.99 unrecovered write error
unrecovered error that occurs during a write medium operation
3.2.100 user data
data contained in logical blocks that is accessible by an application client and is neither protection information
nor other information that may not be accessible to the application client
3.2.101 user data segment
contiguous sequence of logical blocks

Note 1 to entry: See 4.28.

Working Draft SCSI Block Commands 4 (SBC-4)

T10/BSR INCITS 506 Revision 3

27 August 2014

3.2.102 verify command


command that requests verify operations

Note 1 to entry: See 4.2.2.


3.2.103 verify medium operation
process by which a device server reads logical blocks for one or more LBAs from the medium using the
parameters specified in the Verify Error Recovery mode page (see 6.5.9)
3.2.104 verify operation
process by which the device server performs operations (e.g., verify medium operations) as described in this
standard

Note 1 to entry: See 4.2.3.


3.2.105 volatile cache
cache that does not retain logical block data between power cycles
3.2.106 volatile medium
medium that does not retain logical block data between power cycles (e.g., a silicon memory device that loses
data written to it if device power is lost)
3.2.107 write cache operation
process by which a device server writes logical blocks for one or more LBAs to the cache (see 4.7.1)
3.2.108 write command
command that requests write operations

Note 1 to entry: See 4.2.2.


3.2.109 write medium operation
process by which a device server writes logical blocks for one or more LBAs to the medium using the
parameters specified in the Read-Write Error Recovery mode page (see 6.5.8)
3.2.110 write operation
process by which a device server performs operations (e.g., write cache operations and write medium
operations) as described in this standard

Note 1 to entry: See 4.2.3.


3.2.111 XOR operation
processing of an XOR bitwise on two identical-sized multiple-bit input values (e.g., the current value of a
logical block and the new value for that logical block)
3.2.112 XOR-protected data
logical blocks (i.e., including logical block data) that are part of a redundancy group

10

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

3.3 Symbols
Symbols used in this standard include:
Symbol

<
>

Meaning

plus
minus
multiplied by
divided by
equals
not equal
less than
greater than

3.4 Abbreviations
Abbreviations used in this standard include:
Abbreviation

Meaning

CbCS
CDB
CRC
ECC
GLIST
LBA
LBP
LSB
LUN
M
MMC-6
MSB
O
PLIST
n/a
ROD
SAM-5
SCSI
SCC-2
SES-3
SPC-4
SPL-2
VPD
XOR
ZBC

Capability based Command Security


command descriptor block (see 3.2.19)
cyclic redundancy check (see 3.2.21)
error correcting code (see 3.2.30)
grown defect list (see 3.2.37)
logical block address (see 3.2.44)
logical block provisioning (see 4.7.4)
least significant bit
logical unit number
implementation is mandatory
SCSI Multimedia Commands - 6 (see 2.2)
most significant bit
implementation is optional
primary defect list (see 3.2.65)
not applicable
representation of data (see SPC-4)
SCSI Architecture Model - 5 (see 2.3)
Small Computer System Interface family of standards
SCSI-3 Controller Commands - 2 (see 2.2)
SCSI Enclosure Services - 3 (see 2.3)
SCSI Primary Commands - 4 (see 2.3)
SAS Protocol Layer-2 (see 2.2)
Vital product data (see 6.6)
exclusive-or (see 3.2.31)
Zoned Block Commands

Working Draft SCSI Block Commands 4 (SBC-4)

11

T10/BSR INCITS 506 Revision 3

27 August 2014

3.5 Keywords
3.5.1 ignored
keyword used to describe an unused bit, byte, word, field or code value

Note 1 to entry: The contents or value of an ignored bit, byte, word, field or code value shall not be examined
by the receiving SCSI device and may be set to any value by the transmitting SCSI device.
3.5.2 invalid
keyword used to describe an illegal or unsupported bit, byte, word, field or code value

Note 1 to entry: Receipt of an invalid bit, byte, word, field or code value shall be reported as an error.
3.5.3 mandatory
keyword indicating an item that is required to be implemented as defined in this standard
3.5.4 may
keyword that indicates flexibility of choice with no implied preference

Note 1 to entry: May is equivalent to may or may not.


3.5.5 may not
keywords that indicate flexibility of choice with no implied preference

Note 1 to entry: May not is equivalent to may or may not.


3.5.6 obsolete
keyword indicating that an item was defined in prior SCSI standards but has been removed from this standard
3.5.7 optional
keyword that describes features that are not required to be implemented by this standard; however, if any
optional feature defined in this standard is implemented, then it shall be implemented as defined in this
standard
3.5.8 prohibited
keyword used to describe a feature, function, or coded value that is defined in a non-SCSI standard (i.e., a
standard that is not a member of the SCSI family of standards) to which this standard makes a normative
reference where the use of said feature, function, or coded value is not allowed for implementations of this
standard
3.5.9 reserved
keyword referring to bits, bytes, words, fields and code values that are set aside for future standardization

Note 1 to entry: A reserved bit, byte, word or field shall be set to zero, or in accordance with a future
extension to this standard.
Note 2 to entry: Recipients are not required to check reserved bits, bytes, words or fields for zero values.
Receipt of reserved code values in defined fields shall be reported as an error.
3.5.10 restricted
keyword referring to bits, bytes, words, and fields that are set aside for other identified standardization
purposes

Note 1 to entry: A restricted bit, byte, word, or field shall be treated as a reserved bit, byte, word or field in the
context where the restricted designation appears.
3.5.11 shall
keyword indicating a mandatory requirement

Note 1 to entry: Designers are required to implement all such mandatory requirements to ensure
interoperability with other products that conform to this standard.
12

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

3.5.12 should
keyword indicating flexibility of choice with a strongly preferred alternative

Note 1 to entry: Should is equivalent to the phrase it is strongly recommended.


3.5.13 vendor specific
something (e.g., a bit, field, code value) that is not defined by this standard

Note 1 to entry: Specification of the referenced item is determined by the SCSI device vendor and may be
used differently in various implementations.

3.6 Editorial conventions


Certain words and terms used in this standard have a specific meaning beyond the normal English meaning.
These words and terms are defined either in this clause or in the text where they first appear.
Normal case is used for words having the normal English meaning.
Upper case is used when referring to names of commands, status codes, sense keys, and additional sense
codes (e.g., REQUEST SENSE command).
If there is more than one CDB length for a particular command (e.g., ORWRITE (16) and ORWRITE (32)), and
the name of the command is used in a sentence without any CDB length descriptor (e.g., ORWRITE), then the
condition described in the sentence applies to all CDB lengths for that command.
Names of fields and state variables are in small uppercase (e.g. NAME). When a field or state variable name
contains acronyms, uppercase letters may also be used for readability (e.g., the LOGERR bit). Normal case is
used when the contents of a field or state variable are being discussed. Fields or state variables containing
only one bit are usually referred to as the NAME bit instead of the NAME field.
Lists sequenced by lowercase or uppercase letters show no ordering relationship between the listed items.
EXAMPLE 1 - The following list shows no relationship between the listed items:
a)

b)
c)

red (i.e., one of the following colors):


A) crimson: or
B) amber;
blue; or
green.

Lists sequenced by numbers show an ordering relationship between the listed items.
EXAMPLE 2 -The following list shows an ordered relationship between the named items:
1)
2)
3)

top;
middle; and
bottom.

Lists are associated with an introductory paragraph or phrase, and are numbered relative to that paragraph or
phrase (i.e., all lists begin with an a) or 1) entry).
In the event of conflicting information the precedence for requirements defined in this standard is:
1) text;
2) tables; then
3) figures.
Tables show data format and values. Not all tables or figures are fully described in the text.
Notes and examples do not constitute any requirements for implementers, and notes are numbered
consecutively throughout this standard.

Working Draft SCSI Block Commands 4 (SBC-4)

13

T10/BSR INCITS 506 Revision 3

27 August 2014

3.7 Numeric and character conventions


3.7.1 Numeric conventions

A binary number is represented in this standard by any sequence of digits comprised of only the
Western-Arabic numerals 0 and 1 immediately followed by a lower-case b (e.g., 0101b). Underscores are
included between characters in binary number representations to increase readability or delineate field
boundaries (e.g., 0_0101_1010b).
A hexadecimal number is represented in this standard by any sequence of digits comprised of only the
Western-Arabic numerals 0 to 9 and/or the upper-case English letters A to F immediately followed by a
lower-case h (e.g., FA23h). Underscores are included in hexadecimal number representations to increase
readability or delineate field boundaries (e.g., B_FD8C_FA23h).
A decimal number is represented in this standard by any sequence of digits comprised of only the
Western-Arabic numerals 0 to 9 not immediately followed by a lower-case b or lower-case h (e.g., 25).
A range of numeric values is represented in this standard in the form a to z, where a is the first value
included in the range, all values between a and z are included in the range, and z is the last value included in
the range (e.g., the representation 0h to 3h includes the values 0h, 1h, 2h, and 3h).
This standard uses the following conventions for representing decimal numbers:
a) the decimal separator (i.e., separating the integer and fractional portions of the number) is a period;
b) the thousands separator (i.e., separating groups of three digits in a portion of the number) is a space;
and
c) the thousands separator is used in both the integer portion and the fraction portion of a number.
Table 2 shows some examples of decimal numbers represented using various conventions.

Table 2 Numbering convention examples


French

English

This standard

0,6

0.6

0.6

3,141 592 65

3.14159265

3.141 592 65

1 000

1,000

1 000

1 323 462,95

1,323,462.95

1 323 462.95

A decimal number represented in this standard with an overline over one or more digits following the decimal
point is a number where the overlined digits are infinitely repeating (e.g., 666.6 means 666.666 666... or
666 2/3, and 12.142 857 means 12.142 857 142 857... or 12 1/7).

3.7.2 Units of measure

This standard represents values using both decimal units of measure and binary units of measure. Values are
represented by the following formats:
a) for values based on decimal units of measure:
1) numerical value (e.g., 100);
2) space;
3) prefix symbol and unit:
1) decimal prefix symbol (e.g., M) (see table 3); and
2) unit abbreviation (e.g., B);
and
b) for values based on binary units of measure:
14

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

1) numerical value (e.g., 1 024);


2) space;
3) prefix symbol and unit:
1) binary prefix symbol (e.g., Gi) (see table 3); and
2) unit abbreviation (e.g., b).
Table 3 compares the prefix, symbols, and power of the binary and decimal units.

Table 3 Comparison of decimal prefixes and binary prefixes


Decimal

Binary

Prefix name

Prefix symbol

Power
(base-10)

Prefix name

Prefix symbol

Power
(base-2)

kilo

103

kibi

Ki

210

mega

106

mebi

Mi

220

giga

109

gibi

Gi

230

tera

1012

tebi

Ti

240

peta

1015

pebi

Pi

250

exa

1018

exbi

Ei

260

zetta

1021

zebi

Zi

270

yotta

1024

yobi

Yi

280

3.8 State machine conventions


Figure 1 shows how state machines are described in this standard.

S0: State 0

S1: State 1

State1

State 0

State 0

Transition destination labels


Figure 1 Example state machine figure

The state machine figure is followed by subclauses describing the states and state transitions.
Each state and state transition is described in the list with particular attention to the conditions that cause the
transition to occur and special conditions related to the transition.
Working Draft SCSI Block Commands 4 (SBC-4)

15

T10/BSR INCITS 506 Revision 3

27 August 2014

A system specified in this manner has the following properties:


a) time elapses only within discrete states; and
b) state transitions are logically instantaneous.

16

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4 Direct access block device type model


4.1 Direct access block device type model introduction
Table 4 shows the topics in clause 4 and a reference to the subclause where each topic is described.

Table 4 Direct access block device type model topics


Topic

Reference

Direct access block device type model overview

4.2

Media examples

4.3

Removable media

4.4

Logical blocks

4.5

Physical blocks

4.6

Logical block provisioning

4.7

Data de-duplication

4.8

Ready state

4.9

Initialization

4.10

Sanitize operations

4.11

Write protection

4.12

Medium defects

4.13

Write and unmap failures

4.14

Caches

4.15

Implicit HEAD OF QUEUE command processing

4.16

Reservations

4.17

Error reporting

4.18

Model for XOR commands

4.19

Rebuild assist mode

4.20

START STOP UNIT and power conditions

4.21

Protection information model

4.22

Grouping function

4.23

Background scan operations

4.24

Association between commands and CbCS permission bits

4.25

Deferred microcode activation

4.26

Model for uninterrupted sequences on LBA ranges

4.27

Referrals

4.28

ORWRITE commands

4.29

Block device ROD token operations

4.30

Working Draft SCSI Block Commands 4 (SBC-4)

17

T10/BSR INCITS 506 Revision 3

27 August 2014

4.2 Direct access block device type model


4.2.1 Direct access block device type model overview

SCSI devices that conform to this standard are referred to as direct access block devices (e.g., hard disk
drives, removable rigid disks, and solid state drives).
This standard is intended to be used in conjunction with SAM-5, SPC-4, SCC-2, and SES-3.
Direct access block devices store data in logical blocks for later retrieval.
Logical blocks are stored by a process that causes localized changes or transitions within a medium. The
changes made to the medium to store the logical blocks may be volatile (i.e., not retained through power
cycles) or non-volatile (i.e., retained through power cycles).
4.2.2 Logical block access command types

The following are logical block access command types:


a)
b)
c)
d)
e)

read commands;
unmap commands;
verify commands;
write commands; and
other commands (e.g., a FORMAT UNIT command or a SANITIZE command).

See table 33 for a list of commands for direct access block devices, including the logical block access
command type. Some commands may be more than one type of logical block access command (e.g., a
COMPARE AND WRITE command is both a read command and a write command).
4.2.3 Logical block access operation types

Each named command type (see 4.2.2) is processed by performing one or more of the following:
a)
b)
c)
d)

read operations;
unmap operations;
verify operations; and
write operations.

A device server that supports optional features (e.g., caches (see 4.15)) may be required to support additional
requirements (e.g., cache coherency, LBA mapping resource allocations) that are related to those features for
specific operations (e.g., read operations, write operations).
In a device server that does not support any optional features:
a) any read operation causes only read medium operations to be performed;
b) any verify operation causes only verify medium operations to be performed; and
c) any write operation causes only write medium operations to be performed.
The requirements for any optional feature (e.g., caches) may include additional requirements for the
operations described in this subclause.
If an optional feature (e.g., caches) defines requirements for read operations, then the device server shall
support those requirements for both verify operations and read operations.

4.3 Media examples


4.3.1 Media examples overview

Examples of types of media used by the direct access block device are:
a) a rotating medium (see 4.3.2); and
18

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

b) a memory medium (see 4.3.3).


Other types of media are possible.
4.3.2 Rotating media

A rotating medium is one or more spinning disks, each coated with a magnetic material that allows flux
changes to be induced and recorded. An actuator positions a read-write head radially across the spinning
disk, allowing the device to randomly read or write the information at any radial position. Data is stored by
using the write portion of the head to record flux changes and the recorded data is read by using the read
portion of the head.
The circular path followed by the read-write head at a particular radius is called a track. A track is divided into
sectors each containing blocks of stored data. If there is more than one disk spinning on a single axis and the
actuator has a read-write head to access each of the disk surfaces, then the collection of tracks at a particular
radius is called a cylinder.
A logical block is stored in one or more sectors, or a sector may store more than one logical block. Sectors
may also contain information for accessing, synchronizing, and protecting the integrity of the logical blocks.
A rotating medium direct access block device is ready if:
a) the disks are rotating at the correct speed; and
b) the read-write circuitry is powered and ready to access the data.
A START STOP UNIT command (see 5.25) may be required to bring the logical unit to the ready state.
The rotating medium in a direct access block device is non-volatile.

4.3.3 Memory media

A memory medium is solid state, random access memory (RAM) (e.g., static RAM (SRAM), dynamic RAM
(DRAM), magnetoresistive RAM (MRAM), ferroelectric RAM (FeRAM), or flash memory).
A memory medium direct access block device may be ready after power on and may not require a START
STOP UNIT command (see 5.25) to bring the logical unit to a ready state.
These logical units may be nonmechanical, and logical blocks may be accessed with similar access times
regardless of their location on the medium. Memory medium direct access block devices may store less data
than disks or tapes and may be volatile.
A memory medium may be volatile (e.g., SRAM or DRAM) or non-volatile (e.g., SRAM or DRAM with battery
backup, MRAM, FeRAM, or flash memory).

4.4 Removable media


The medium may be removable or non-removable. A removable medium may be contained within a cartridge
or jacket to prevent damage to the recording surfaces.
A removable medium has an attribute of being mounted or demounted on a suitable transport mechanism in a
direct access block device. A removable medium is mounted when the direct access block device is capable
of accessing its medium (e.g., performing read medium operations and write medium operations). A
removable medium is demounted at any other time (e.g., during loading, unloading, or storage).
An application client may check whether a removable medium is mounted by sending a TEST UNIT READY
command (see SPC-4). A direct access block device containing a removable medium may not be accessible
for read operations, unmap operations, and write operations until it receives a START STOP UNIT command
with the START bit set to one (see 5.25).

Working Draft SCSI Block Commands 4 (SBC-4)

19

T10/BSR INCITS 506 Revision 3

27 August 2014

If a direct access block device implements cache, either volatile or non-volatile, then the device server
ensures that all logical blocks on the medium contain the most recent logical block data prior to permitting
demounting of the removable medium.
If the medium in a direct access block device is removable, and the medium is removed, then the device
server shall establish a unit attention condition with the additional sense code set to the appropriate value
(e.g., MEDIUM NOT PRESENT). The PREVENT ALLOW MEDIUM REMOVAL command (see 5.10) allows
an application client to restrict the demounting of the removable medium.
If an application client sends a START STOP UNIT command to request that the removable medium to be
ejected and the direct access block device is prevented from demounting the medium by a previous
PREVENT ALLOW MEDIUM REMOVAL command, then the START STOP UNIT command is terminated by
the device server.

4.5 Logical blocks


Logical blocks are stored on the medium. Logical blocks:
a) contain logical block data that contains:
A) user data; and
B) protection information, if any;
and
b) may contain additional information (e.g., an ECC which may be used for medium defect management
(see 4.13)), which may not be accessible to the application client.
The number of bytes of user data contained in each logical block is the logical block length. The logical block
length is greater than or equal to one byte and should be an even number of bytes (e.g., 512 bytes, 520 bytes,
4 096 bytes, or 4 104 bytes). The logical block length does not include the length of protection information, if
any, and additional information, if any, that are contained in the logical block. The logical block length is the
same for all logical blocks in the logical unit. The LOGICAL BLOCK LENGTH field in the READ CAPACITY (10)
parameter data (see 5.15.2) and the READ CAPACITY (16) parameter data (see 5.16.2) indicates the logical
block length. The FORMAT UNIT command (see 5.3) and the mode parameter block descriptor (see 6.5.2)
are used together by an application client to change the logical block length in direct access block devices that
support changeable logical block lengths.
Each logical block is referenced by a unique LBA, which is represented as either four bytes in length or eight
bytes in length. The LBAs on a logical unit shall begin with zero and shall be contiguous up to the last LBA on
the logical unit. The last LBA is [n-1], where [n] is the number of logical blocks accessible by the application
client. The RETURNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (10) parameter data (see 5.15.2)
and the READ CAPACITY (16) parameter data (see 5.16.2) indicates the value of [n-1]. Each LBA has a
logical block provisioning state (see 4.7) of mapped, deallocated, or anchored.
Some commands support only four-byte LOGICAL BLOCK ADDRESS fields (e.g., READ (10), and WRITE (10)).
If the capacity of the logical unit exceeds that accessible with four-byte LBAs, then the device server returns
the RETURNED LOGICAL BLOCK ADDRESS field set to FFFF_FFFFh in the READ CAPACITY (10) parameter data,
indicating that an application client should:
a) enable descriptor format sense data (see SPC-4) in the Control mode page (see SPC-4) and in any
REQUEST SENSE commands (see SPC-4) it sends; and
b) use commands with eight-byte LOGICAL BLOCK ADDRESS fields (e.g., READ (16), and WRITE (16)).
NOTE 1 - If a command requests access to an LBA greater than FFFF_FFFFh, fixed format sense data is
used, and an error occurs for that LBA, then there is no field in the sense data large enough to report that LBA
as having an error (see 4.18).

If a command is received that references or attempts to access a logical block that exceeds the capacity of the
medium, then the device server shall terminate the command (e.g., with CHECK CONDITION status with the

20

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

sense key set to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS
OUT OF RANGE). The device server:
a) should terminate the command before processing; and
b) may terminate the command after the device server has transferred some, all, or none of the data.
The location of a logical block on the medium is not required to have a relationship to the location of any other
logical block. However, in a direct access block device with rotating media (see 4.3.2), the time to access a
logical block at LBA [x+1] after accessing LBA [x] is often less than the time to access some other logical
block.

4.6 Physical blocks


A physical block is a set of data bytes on the medium accessed by the device server as a unit. A physical
block may contain:
a) a portion of a logical block (i.e., there are multiple physical blocks in the logical block)(e.g., a physical
block length of 512 bytes with a logical block length of 2 048 bytes);
b) a single complete logical block; or
c) more than one logical block (i.e., there are multiple logical blocks in the physical block)(e.g., a
physical block length of 4 096 bytes with a logical block length of 512 bytes).
Each physical block may include additional information (e.g., an ECC which may be used for medium defect
management (see 4.13)), which may not be accessible to the application client.
If the device server supports the COR_DIS bit and/or the WR_UNCOR bit in a WRITE LONG command (see 5.43
and 5.44), then the device server shall have the capability of marking individual logical blocks as containing
pseudo unrecovered errors with correction enabled or with correction disabled.
Logical blocks may or may not be aligned to physical block boundaries. A mechanism for establishing the
alignment is not defined by this standard.

Working Draft SCSI Block Commands 4 (SBC-4)

21

T10/BSR INCITS 506 Revision 3

27 August 2014

Figure 2 shows examples of where there are one or more physical blocks per logical block, and LBA 0 is
aligned to a physical block boundary. The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field and the
LOWEST ALIGNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (16) parameter data (see 5.16.2)
indicate the alignment.

The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is set to 0h (i.e., indicating one or more
physical blocks per logical block).
The LOWEST ALIGNED LOGICAL BLOCK ADDRESS field is set to 0000h (i.e., indicating that LBA 0 is
located at the beginning of a physical block).
4 physical blocks per logical block:
LBA 0
PB

PB

LBA 1

PB

PB

PB

PB

...

PB

PB

...

3 physical blocks per logical block:


LBA 0
PB

PB

LBA 1
PB

PB

PB

LBA 2
PB

PB

PB

...
PB

...

2 physical blocks per logical block:


LBA 0
PB

PB

LBA 1
PB

PB

LBA 2
PB

PB

LBA 3
PB

PB

LBA 4
PB

PB

...
...

1 physical block per logical block:


LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 LBA 9 LBA 10 ...
PB

PB

PB

PB

PB

PB

PB

PB

PB

PB

PB

...

Key:
LBA n = logical block with LBA n
PB = physical block

Figure 2 One or more physical blocks per logical block examples

22

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Figure 3 shows examples of where there are one or more logical blocks per physical block, and LBA 0 is
aligned to a physical block boundary. The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field and the
LOWEST ALIGNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (16) parameter data (see 5.16.2)
indicate the alignment.

The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is set to a non-zero value (i.e., indicating more
than one logical block per physical block).
The LOWEST ALIGNED LOGICAL BLOCK ADDRESS field is set to 0000h (i.e., indicating that LBA 0 is located
at the beginning of a physical block).
LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT

field set to 1h (i.e., 21 logical blocks per physical block):

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 LBA 9 LBA 10 LBA 11 ...
PB

PB

PB

PB

LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT

PB

PB

...

field set to 2h (i.e., 22 logical blocks per physical block):

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 LBA 9 LBA 10 LBA 11 ...
PB

PB

LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT

PB

...

field set to 3h (i.e., 23 logical blocks per physical block):

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7

...

PB

...

Key:
LBA n = logical block with LBA n
PB = physical block

Figure 3 One or more logical blocks per physical block examples

Figure 4 shows examples of where there are two logical blocks per physical block, and different LBAs are
aligned to physical block boundaries. The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field and the
LOWEST ALIGNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (16) parameter data (see 5.16.2)
indicate the alignment.

LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT


LOWEST ALIGNED LOGICAL BLOCK ADDRESS

field set to 1h (i.e., 21 logical blocks per physical block):

field set to 0000h:

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 LBA 9 ...
PB

PB

LOWEST ALIGNED LOGICAL BLOCK ADDRESS

PB

PB

PB

...

field set to 0001h:

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 LBA 9 LBA 10 ...
PB

PB

PB

PB

PB

PB

...

Key:
LBA n = logical block with LBA n
PB = physical block
Figure 4 Two logical blocks per physical block alignment examples
Working Draft SCSI Block Commands 4 (SBC-4)

23

T10/BSR INCITS 506 Revision 3

27 August 2014

Figure 5 shows examples of where there are four logical blocks per physical block, and different LBAs are
aligned to physical block boundaries. The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field and the
LOWEST ALIGNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (16) parameter data (see 5.16.2)
indicate the alignment.

LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT


LOWEST ALIGNED LOGICAL BLOCK ADDRESS

field set to 2h (i.e., 22 logical blocks per physical block):

field set to 0000h:

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 ...


PB
LOWEST ALIGNED LOGICAL BLOCK ADDRESS

PB

...

field set to 0001h:

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 ...
PB
LOWEST ALIGNED LOGICAL BLOCK ADDRESS

PB

PB

...

field set to 0002h:

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 LBA 9 ...
PB
LOWEST ALIGNED LOGICAL BLOCK ADDRESS

PB

PB

...

field set to 0003h:

LBA 0 LBA 1 LBA 2 LBA 3 LBA 4 LBA 5 LBA 6 LBA 7 LBA 8 LBA 9 LBA 10 ...
PB

PB

PB

...

Key:
LBA n = logical block with LBA n
PB = physical block
Figure 5 Four logical blocks per physical block alignment examples
If there is more than one logical block per physical block, then not all of the logical blocks are aligned to the
physical block boundaries. When using logical block access commands (see 4.2.2), application clients should:
a) specify an LBA that is aligned to a physical block boundary; and
b) access an integral number of physical blocks, provided that the access does not go beyond the last
LBA on the medium.
See annex E for an example method in which application clients may use alignment information to determine
optimal performance for logical block access.

24

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.7 Logical block provisioning


4.7.1 Logical block provisioning overview
Each LBA in a logical unit is either mapped or unmapped. For LBAs that are mapped, there is a known
relationship between the LBA and one or more physical blocks that contain logical block data. For LBAs that
are unmapped, the relationship between the LBA and a physical block is not defined. Figure 6 shows two
examples of the relationship between mapped and unmapped LBAs and physical blocks in a logical unit. One
example shows one LBA per physical block and one example shows two LBAs per physical block. The
LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is defined in the READ CAPACITY (16) parameter data
(see 5.16.2).

LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT

LBA 0

LBA 1

LBA 2

LBA 3

PB

PB

Unmapped

PB

LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT

LBA 0

LBA 1
PB

LBA 2

LBA 3

field set to 0h (i.e., 20 logical blocks per physical block):


LBA 4

LBA 5

LBA 6

LBA 7

PB

PB

Unmapped Unmapped

field set to 1h (i.e., 21 logical blocks per physical block):


LBA 4

Unmapped

LBA 5

LBA 6

PB

LBA 7

Unmapped

Key:
LBA n = logical block with LBA n
PB = physical block
Unmapped = the relationship between the LBA(s) and a physical block is not defined

Figure 6 Examples of the relationship between mapped and unmapped LBAs and physical blocks
Each unmapped LBA is either anchored or deallocated. Anchored and deallocated are states in the LBP state
machine (see 4.7.4) that have the following properties:
a) a write command that specifies an anchored LBA does not require allocation of additional LBA
mapping resources for that LBA; and
b) a write command that specifies a deallocated LBA may require allocation of LBA mapping resources.
Depending on the logical block provisioning types (see table 5), the quantity of LBA mapping resources
available to a logical unit may be greater than, equal to, or less than the quantity required to store logical block
data for every LBA.
Table 5 list the logical block provisioning states supported by each type of logical block provisioning.

Table 5 Logical block provisioning states supported by logical block provisioning type
Logical block provisioning states
Type

Mapped

Unmapped
Anchored

Deallocated

Reference

Fully provisioned

Mandatory

Prohibited

Prohibited

4.7.2

Resource provisioned

Mandatory

Mandatory

Prohibited

4.7.3.2

Thin provisioned

Mandatory

Optional

Mandatory

4.7.3.3

Working Draft SCSI Block Commands 4 (SBC-4)

25

T10/BSR INCITS 506 Revision 3

27 August 2014

4.7.2 Fully provisioned logical unit


The device server shall map every LBA in a fully provisioned logical unit. A fully provisioned logical unit shall
provide enough LBA mapping resources to contain all logical blocks for the logical units capacity as reported
in the READ CAPACITY (10) parameter data (see 5.15.2) and the READ CAPACITY (16) parameter data
(see 5.16.2). The device server shall not cause any LBA on a fully provisioned logical unit to become
unmapped (i.e., anchored or deallocated).
A fully provisioned logical unit does not support logical block provisioning management (see 4.7.3). A fully
provisioned logical unit may support the GET LBA STATUS command (see 5.4).
The device server in a fully provisioned logical unit shall set the LBPME bit to zero in the READ CAPACITY (16)
parameter data (see 5.16.2).
4.7.3 Logical block provisioning management
4.7.3.1 Logical block provisioning management overview
A logical unit that supports logical block provisioning management (i.e., implements unmapped LBAs, unmap
operations, and related actions) shall be either:
a) resource provisioned (see 4.7.3.2); or
b) thin provisioned (see 4.7.3.3).
A logical unit that supports logical block provisioning management shall implement the LBP state machine
(see 4.7.4) for each LBA.
The device server in a logical unit that supports logical block provisioning management:
a) shall support the Logical Block Provisioning VPD page (see 6.6.5);
b) may supply a provisioning group designation descriptor as defined in the Logical Block Provisioning
VPD page;
c) may support logical block provisioning thresholds (see 4.7.3.7.1);
d) may support the GET LBA STATUS command (see 5.4);
e) should support the Block Limits VPD page (see 6.6.4); and
f) shall support at least one of the following unmap mechanisms:
A) the UNMAP command (see 5.28);
B) the UNMAP bit in the WRITE SAME (10) command (see 5.45);
C) the UNMAP bit in the WRITE SAME (16) command (see 5.46); or
D) the UNMAP bit in the WRITE SAME (32) command (see 5.47).
If the device server supports:
a) the UNMAP bit in the WRITE SAME (10) command or in the WRITE SAME (16) command; and
b) the WRITE SAME (32) command (see 5.47),
then the device server shall support the UNMAP bit in the WRITE SAME (32) command.
If a device server supports the UNMAP command and the Block Limits VPD page, then the device server
shall:
a) set the MAXIMUM UNMAP LBA COUNT field in the Block Limits VPD page to a value greater than or equal
to one; and
b) set the MAXIMUM UNMAP DESCRIPTOR COUNT field in the Block Limits VPD page to a value greater than
or equal to one.
4.7.3.2 Resource provisioned logical unit
A resource provisioned logical unit shall support logical block provisioning management (see 4.7.3.1).
The device server in a resource provisioned logical unit assigns mapping resources to every LBA for the
capacity indicated by the RETURNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (10) parameter
data (see 5.15.2) and the READ CAPACITY (16) parameter data (see 5.16.2).
26

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server shall map or anchor (i.e., not deallocate) each LBA in a resource provisioned logical unit. A
resource provisioned logical unit shall provide LBA mapping resources sufficient to map all LBAs for the
logical units capacity as indicated in the RETURNED LOGICAL BLOCK ADDRESS field of the READ CAPACITY (10)
parameter data (see 5.15.2) and the READ CAPACITY (16) parameter data (see 5.16.2). A resource
provisioned logical unit may provide resources in excess of this requirement. The device server shall not
cause any LBA on a resource provisioned logical unit to become deallocated.
The device server in a resource provisioned logical unit shall set:
a) the LBPME bit to one in the READ CAPACITY (16) parameter data (see 5.16.2);
b) the PROVISIONING TYPE field to 001b (i.e., resource provisioned) in the Logical Block Provisioning VPD
page (see 6.6.5); and
c) the ANC_SUP bit to one in the Logical Block Provisioning VPD page.
The initial condition of every LBA in a resource provisioned logical unit is anchored (see 4.7.4.1).
4.7.3.3 Thin provisioned logical unit
A thin provisioned logical unit shall support logical block provisioning management (see 4.7.3.1).
The device server in a thin provisioned logical unit may indicate a larger capacity in the RETURNED LOGICAL
BLOCK ADDRESS field in the READ CAPACITY (10) parameter data (see 5.15.2) and the READ CAPACITY (16)
parameter data (see 5.16.2) than the number of LBA mapping resources available for mapping LBAs in the
logical unit.
The device server shall map, anchor, or deallocate each LBA in a thin provisioned logical unit (see table 5). A
thin provisioned logical unit is not required to provide LBA mapping resources sufficient to map all LBAs for
the logical units capacity as indicated in the RETURNED LOGICAL BLOCK ADDRESS field of the READ
CAPACITY (10) parameter data (see 5.15.2) and the READ CAPACITY (16) parameter data (see 5.16.2).
If the logical unit does not support anchored LBAs (i.e, the ANC_SUP bit is set to zero in the Logical Block
Provisioning VPD page (see 6.6.5)), then:
a) every unmapped LBA in the logical unit shall be deallocated; and
b) the device server shall terminate every command that specifies anchoring an LBA(e.g., a WRITE
SAME command with the ANCHOR bit set to one (see 5.45)).
The device server in a thin provisioned logical unit shall set:
a) the LBPME bit to one in the READ CAPACITY (16) parameter data (see 5.16.2); and
b) the PROVISIONING TYPE field to 010b (i.e., thin provisioned) in the Logical Block Provisioning VPD page
(see 6.6.5).
The initial condition of every LBA in a thin provisioned logical unit is deallocated (see 4.7.4.1).
4.7.3.4 Unmapping LBAs
4.7.3.4.1 Processing unmap requests
Application clients use unmap commands (see table 33) to request that LBAs be unmapped. For each LBA
that is requested to be unmapped, the device server shall:
a) perform an unmap operation (see 4.7.3.4.2) on the LBA; or
b) make no change to the logical block provisioning state of the LBA.
The application client determines the logical block provisioning state of LBAs using the GET LBA STATUS
command (see 5.4).
Application clients should not rely on an UNMAP command (see 5.28) to cause specific data (e.g., zeros) to
be returned by subsequent read operations on the specified LBAs. To produce consistent results for
subsequent read operations, a write command (e.g., the WRITE SAME command) should be used to write
user data.

Working Draft SCSI Block Commands 4 (SBC-4)

27

T10/BSR INCITS 506 Revision 3

27 August 2014

EXAMPLE - To ensure that subsequent read operations return all zeros in a logical block, use the WRITE SAME (16)
command with the NDOB bit set to one. If the UNMAP bit is set to one, then the device server may unmap the logical blocks
specified by the WRITE SAME (16) command as described in 4.7.3.4.3.

4.7.3.4.2 Unmap operations


An unmap operation:
a) results in a single LBA becoming either deallocated or anchored;
b) may change the relationship between one LBA and one or more physical blocks; and
c) may change the logical block data that is returned in response to a subsequent read command
specifying that LBA.
The data in all other mapped LBAs on the medium shall be preserved. Performing an unmap operation on an
unmapped LBA shall not be considered an error.
An unmap operation may or may not release LBA mapping resources.
An application client may use an unmap command (see 4.2.2) to request that the device server perform one
or more unmap operations. A single unmap command may result in zero or more unmap operations.
4.7.3.4.3 WRITE SAME command and unmap operations
A WRITE SAME command (see 5.45, 5.46, and 5.47) may be used to request unmap operations that
deallocate or anchor the specified LBAs. If unmap operations are requested in a WRITE SAME command,
then for each specified LBA:
a) if the Data-Out Buffer of the WRITE SAME command is the same as the logical block data returned by
a read operation from that LBA while in the unmapped state (see 4.7.4.5), then:
1) the device server performs the actions described in table 6; and
2) if an unmap operation is not performed in step 1), then the device server shall perform the
specified write operation to that LBA;
or
b) if the Data-Out Buffer of the WRITE SAME command is not the same as the logical block data
returned by a read operation from that LBA while in the unmapped state (see 4.7.4.5), then the device
server shall perform the specified write operation to that LBA.

Table 6 WRITE SAME command and unmap operations


Logical block
provisioning
management type

Unmap operations that request to


deallocate the specified LBA

Unmap operations that request to


anchor the specified LBA

Thin provisioned
logical unit

a) should perform an unmap operation to


deallocate the LBA (see 4.7.4.7.1); or
b) may perform an unmap operation to
anchor the LBA (see 4.7.4.8.1)

should perform an unmap operation


to anchor the LBA

should perform an unmap operation to


anchor the LBA

should perform an unmap operation


to anchor the LBA

Resource provisioned
logical unit

A WRITE SAME command shall not cause an LBA to become unmapped if unmapping that LBA creates a
case in which a subsequent read of that unmapped LBA is able to return logical block data that differs from the
Data-Out Buffer for that WRITE SAME command (see 4.7.4.5).
If the device server does not support allowing a WRITE SAME command to request unmap operations, then
the device server shall:
a) perform the write operations specified by the WRITE SAME command; and
28

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

b) not perform any unmap operations.


The device server shall perform the write operations specified by a WRITE SAME command and shall not
perform any unmap operations if the device server sets the LBPRZ bit to one in the READ CAPACITY (16)
parameter data (see 5.16.2), and:
a) any bit in the user data transferred from the Data-Out Buffer is not zero; or
b) the protection information, if any, transferred from the Data-Out Buffer is not set to
FFFF_FFFF_FFFF_FFFFh.
4.7.3.5 Autonomous LBA transitions
A device server may perform the following actions at any time:
a) transition any deallocated LBA to mapped;
b) transition any anchored LBA to mapped; or
c) transition any deallocated LBA to anchored.
If the LBPRZ bit in the READ CAPACITY (16) parameter data (see 5.16.2) is set to one, and a mapped LBA
references a logical block that contains:
a) user data with all bits set to zero; and
b) protection information, if any, set to FFFF_FFFF_FFFF_FFFFh,
then the device server may transition that mapped LBA to anchored or deallocated at any time.
The logical block provisioning state machine (see 4.7.4) specifies additional requirements for the transitions
specified in this subclause.
4.7.3.6 Thin provisioned logical unit resource exhaustion considerations
If:
a) a write operation is requested by an application client, and a temporary lack of LBA mapping
resources prevents the logical unit from performing the write operation; or
b) an unmap operation that transitions an LBA to the anchored state is requested by an application client
and a temporary lack of LBA mapping resources prevents the logical unit from anchoring the LBA,
then the device server shall terminate the command requesting the operation with CHECK CONDITION
status with the sense key set to NOT READY and the additional sense code set to LOGICAL UNIT NOT
READY, SPACE ALLOCATION IN PROGRESS. In this case, the application client should resend the
command.
If:
a) a write operation is requested by an application client, and a persistent lack of LBA mapping
resources prevents the logical unit from performing the write operation; or
b) an unmap operation that transitions an LBA to the anchored state is requested by an application client
and a persistent lack of LBA mapping resources prevents the logical unit from anchoring the LBA,
then the device server shall terminate the command requesting the unmap operation with CHECK
CONDITION status with the sense key set to DATA PROTECT and the additional sense code set to SPACE
ALLOCATION FAILED WRITE PROTECT. This condition shall not cause the device server to set the WP bit in
the DEVICE-SPECIFIC PARAMETER field of the mode page header to one (see 6.5.1). In this case, recovery
actions by the application client are outside the scope of this standard.
A logical block provisioning threshold may be available to monitor the availability of LBA mapping resources
(see 4.7.3.7). A logical block provisioning log parameter that reports available LBA mapping resources may
be available in the Logical Block Provisioning log page (see 6.4.4).

Working Draft SCSI Block Commands 4 (SBC-4)

29

T10/BSR INCITS 506 Revision 3

27 August 2014

4.7.3.7 Logical block provisioning thresholds


4.7.3.7.1 Logical block provisioning thresholds overview
Logical block provisioning thresholds provide a mechanism for the device server to establish a unit attention
condition to notify application clients when thresholds related to logical block provisioning are crossed. Logical
block provisioning thresholds may operate on an armed increasing basis or an armed decreasing basis.
If a device server supports logical block provisioning thresholds, then the device server:
a) shall support the Logical Block Provisioning mode page (see 6.5.7); and
b) may support the Logical Block Provisioning log page (see 6.4.4).
The end points of the range over which a logical block provisioning threshold operates are defined as follows:
threshold minimum = ((threshold count threshold set size) (threshold set size 0.5))
threshold maximum = ((threshold count threshold set size) + (threshold set size 0.5))
where:
threshold minimum

is the lowest number of LBAs in the range for this threshold;

threshold maximum

is the highest number of LBAs in the range for this threshold;

threshold count

threshold set size

is the center of the threshold range for this threshold (i.e., the threshold count
value as specified in the threshold descriptor in the Logical Block
Provisioning mode page); and
is the number of LBAs in each threshold set (i.e., 2(threshold exponent) LBAs
where the threshold exponent is indicated in the Logical Block Provisioning
VPD page (see 6.6.5)).

Table 7 defines the meaning of the combinations of values for the THRESHOLD RESOURCE field, the THRESHOLD
TYPE field, and the THRESHOLD ARMING field that are used for logical block provisioning thresholds. See the
Logical Block Provisioning mode page (see 6.5.7) for the definition of these fields.

Table 7 Threshold resource value, threshold type value, and threshold arming value for logical
block provisioning thresholds
Threshold
resource
value

Threshold
type value

Threshold
arming
value

01h

000b

000b

The device server applies the threshold to the availability of


LBA mapping resources and performs notifications as the
availability of those resources decreases. a

02h

000b

001b

The device server applies the threshold to the usage of LBA


mapping resources and performs notifications as the usage of
those resources increases.

All other combinations


a

Description

Reserved

The point when availability of LBA mapping resources reaches zero corresponds to the persistent lack
of LBA mapping resources described in 4.7.3.6.

4.7.3.7.2 Logical block provisioning armed decreasing thresholds


Figure 7 shows the operation of a logical block provisioning armed decreasing threshold. Figure 7 represents
the entire range of possible values over which the threshold is being applied (e.g., for an available resource,

30

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

the lowest value represents zero available resources and the highest value represents the maximum possible
number of available resources).
If enabled, reporting of armed decreasing threshold events (i.e., the THRESHOLD ARMING field is set to 000b in
the threshold descriptor in the Logical Block Provisioning mode page (see 6.5.7)) operates as shown in
figure 7.

a
c

Lowest value
Threshold minimum

Threshold range

Highest value
Threshold maximum

Notes:
a) if the value to which the threshold is being applied drops below the threshold maximum for the
threshold range, then the notification trigger shall be enabled;
b) if the value to which the threshold is being applied increases above the threshold maximum for
the threshold range, then the notification trigger shall be disabled;
c) if the notification trigger is enabled, then the device server may disable the notification trigger
and perform logical block provisioning threshold notification (see 4.7.3.7.4); and
d) if the notification trigger is enabled and the value to which the threshold is being applied drops
below the threshold minimum for the threshold range, then the device server shall disable the
notification trigger and perform logical block provisioning threshold notification as defined in
4.7.3.7.4.
Figure 7 Armed decreasing threshold operation
4.7.3.7.3 Logical block provisioning armed increasing thresholds
Figure 8 shows the operation of a logical block provisioning armed increasing threshold. Figure 8 represents
the entire range of possible values over which the threshold is being applied (e.g., for tracking usage of a
resource, the lowest value represents zero resources being used and the highest value represents the
maximum possible number of resources being used).
If enabled, reporting of armed increasing threshold events (i.e., the THRESHOLD ARMING field is set to 001b in
the threshold descriptor in the Logical Block Provisioning mode page (see 6.5.7)) operates as shown in
figure 8.

Working Draft SCSI Block Commands 4 (SBC-4)

31

T10/BSR INCITS 506 Revision 3

27 August 2014

d
b

Lowest value
Threshold minimum

Highest value
Threshold range

Threshold maximum

Notes:
a) if the value to which the threshold is being applied increases above the threshold minimum for
the threshold range, then the notification trigger shall be enabled;
b) if the value to which the threshold is being applied decreases below the threshold minimum for
the threshold range, then the notification trigger shall be disabled;
c) if the notification trigger is enabled, then the device server may disable the notification trigger
and perform logical block provisioning threshold notification (see 4.7.3.7.4); and
d) if the notification trigger is enabled and the value to which the threshold is being applied
increases above the threshold maximum for the threshold range, then the device server shall
disable the notification trigger and perform logical block provisioning threshold notification as
defined in 4.7.3.7.4.
Figure 8 Armed increasing threshold operation
4.7.3.7.4 Logical block provisioning threshold notification
If the LBPERE bit is set to one in the Read-Write Error Recovery mode page (see 6.5.8), then logical block
provisioning threshold notification is enabled and the device server shall perform notification for thresholds
with the THRESHOLD TYPE field set to 000b in the threshold descriptor in the Logical Block Provisioning mode
page (see 6.5.7) as follows:
a) if the SITUA bit is set to one in the Logical Block Provisioning mode page, then:
A) if the device server has not established a unit attention condition as a result of this threshold
being crossed since the last logical unit reset (see SAM-5) and a command through which the
device server is able to report a unit attention condition arrives on any I_T nexus, then the device
server shall establish a unit attention condition with the additional sense code set to THIN PROVISIONING SOFT THRESHOLD REACHED for only the SCSI initiator port associated with the I_T
nexus on which that command was received before processing that command; or
B) if the device server has established a unit attention condition as a result of this threshold being
crossed since the last logical unit reset and a command through which the device server is able to
report a unit attention condition arrives on any I_T nexus, then the device server should establish
a unit attention condition with the additional sense code set to THIN PROVISIONING SOFT
THRESHOLD REACHED for only the SCSI initiator port associated with the I_T nexus on which
that command was received before processing that command unless establishment of the unit
attention condition causes a vendor specific frequency of unit attention conditions for this
threshold to be exceeded;
or
b) if the SITUA bit is set to zero, then:
A) if the device server has not established a unit attention condition for the SCSI initiator port
associated with all I_T nexuses as a result of this threshold being crossed since the last logical
unit reset (see SAM-5), then the device server shall establish a unit attention condition with the
additional sense code set to THIN PROVISIONING SOFT THRESHOLD REACHED for the SCSI
initiator port associated with every I_T nexus; or
B) if the device server has established a unit attention condition for the SCSI initiator ports
associated with all I_T nexuses as a result of this threshold being crossed since the last logical
unit reset, then the device server should establish a unit attention condition with the additional
sense code set to THIN PROVISIONING SOFT THRESHOLD REACHED for the SCSI initiator
port associated with every I_T nexus, unless establishment of the unit attention condition causes
a vendor specific frequency of unit attention conditions for this threshold to be exceeded.

32

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If a unit attention condition is established as described in this subclause, then the device server shall report
the following value in the INFORMATION field in the sense data (see SPC-4):
a) the byte offset in the Logical Block Provisioning mode page of the first byte of the threshold descriptor
to which this threshold notification applies.
If a unit attention condition with the additional sense code set to THIN PROVISIONING SOFT THRESHOLD
REACHED is received by the application client, then the application client should reissue the command and
take further recovery actions (e.g., administrator notification or other administrator actions). These recovery
actions are outside the scope of this standard.
If the LBPERE bit is set to zero, then logical block provisioning threshold notification is disabled and the device
server shall not establish any unit attention condition with the additional sense code set to THIN
PROVISIONING SOFT THRESHOLD REACHED.
An additional sense code set to THIN PROVISIONING SOFT THRESHOLD REACHED is applicable to both
thin provisioned logical units (see 4.7.3.3) and resource provisioned logical units (see 4.7.3.2).
4.7.4 LBP (logical block provisioning) state machine
4.7.4.1 LBP state machine overview
The LBP (logical block provisioning) state machine describes the mapping and unmapping of a single LBA by
the device server for a thin provisioned logical unit (see 4.7.3.3) or a resource provisioned logical unit
(see 4.7.3.2). This state machine does not apply to fully provisioned logical units (see 4.7.2).
There is one instance of this state machine for each LBA. If a command requests mapping or unmapping of
more than one LBA, then there may be an independent transition in each instance of the state machine (e.g.,
each LBA may individually transition from mapped to deallocated or from anchored to deallocated).
4.7.4.2 LBP state machine for thin provisioned logical units supporting anchored LBAs
If the logical unit supports anchored LBAs (i.e., the ANC_SUP bit is set to one) and deallocated LBAs (i.e., is a
thin provisioned logical unit), then this state machine consists of the following states:
a) LBP1:Mapped state (see 4.7.4.6);
b) LBP2:Deallocated state (see 4.7.4.7) (initial state); and
c) LBP3:Anchored state (see 4.7.4.8).
The initial state of the state machine associated with each LBA is the LBP2:Deallocated state.
Figure 9 describes the LBP state machine for a logical unit that supports anchored LBAs and deallocated
LBAs.

LBP2:Deallocated
LBP1:Mapped

LBP3:Anchored

Figure 9 LBP state machine (anchored LBAs supported and deallocated LBAs supported)

Working Draft SCSI Block Commands 4 (SBC-4)

33

T10/BSR INCITS 506 Revision 3

27 August 2014

4.7.4.3 LBP state machine for thin provisioned logical units not supporting anchored LBAs

If the logical unit does not support anchored LBAs (i.e., is a thin provisioned logical unit and the ANC_SUP bit is
set to zero), then this state machine consists of the following states:
a) LBP1:Mapped state(see 4.7.4.6); and
b) LBP2:Deallocated state (see 4.7.4.7) (initial state).
The initial state of the state machine associated with each LBA is the LBP2:Deallocated state.
Figure 10 describes the LBP state machine for a logical unit that does not support anchored LBAs.

LBP2:Deallocated
LBP1:Mapped

Figure 10 LBP state machine (anchored LBAs not supported)


4.7.4.4 LBP state machine for resource provisioned logical units

If the logical unit does not support deallocated LBAs (i.e., is a resource provisioned logical unit and the
ANC_SUP bit is set to one), then this state machine consists of the following states:
a) LBP1:Mapped state (see 4.7.4.6)); and
b) LBP3:Anchored state (see 4.7.4.8) (initial state).
The initial state of the state machine associated with each LBA is the LBP3:Anchored state for a resource
provisioned logical unit (see 4.7.3.2).
Figure 11 describes the LBP state machine for a logical unit that does not support deallocated LBAs.

LBP1:Mapped

LBP3:Anchored

Figure 11 LBP state machine (deallocated LBAs not supported)

34

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.7.4.5 Performing read operations with respect to logical block provisioning

Table 8 defines the logical block data that a read operation shall return for a mapped LBA.

Table 8 Logical block data returned by a read operation from a mapped LBA
Condition

Logical block data returned

The LBA became mapped as the result of a format


operation or sanitize operation and no write command
has specified that LBA since the LBA became
mapped.

The logical block data that was written to that


LBA by the format operation or the sanitize
operation.

The LBA became mapped as the result of a write


command and no additional write command has
specified that LBA since the LBA was mapped.

The logical block data that was written to that


LBA by that write command.

The LBA became mapped as the result of an


autonomous transition, and no write command has
specified that LBA since the LBA was mapped.

The logical block data that would be returned if


that autonomous transition had not occurred and
the LBA had remained unmapped (see table 9).

A write command has specified that LBA since that


LBA was mapped.

The logical block data that was most recently


written to that LBA.

Table 9 defines the logical block data that a read operation shall return for an unmapped LBA.

Table 9 Logical block data returned by a read operation from an unmapped LBA
LBPRZ
a

bit

Method used to
unmap the LBA

Logical block data returned

see b

The value specified to be written if the write operation had been performed.

see c

Logical block data containing:


a) user data set to a vendor-specific value that is not obtained from any
other LBA; and
b) protection information, if any, set to FFFF_FFFF_FFFF_FFFFh.

Any

Logical block data containing:


a) user data set to zero; and
b) protection information, if any, set to FFFF_FFFF_FFFF_FFFFh.

a
b

The LBPRZ bit is in the READ CAPACITY (16) parameter data (see 5.16.2).
A command for which the device server is allowed to perform either:
a) a write with specified logical block data; or
b) an unmap operation if the logical block data returned by read operations from unmapped LBAs
matches the logical block data specified for the command that resulted in the unmap operation.
These commands are:
a) a FORMAT UNIT command specifying an initialization pattern;
b) a SANITIZE command specifying a sanitize overwrite operation; and
c) a WRITE SAME command with the UNMAP bit set to one.
c
These methods include but are not limited to:
a) a FORMAT UNIT command not specifying an initialization pattern;
b) a REASSIGN BLOCKS command;
c) a SANITIZE command specifying a sanitize block erase operation or a sanitize cryptographic erase
operation; and
d) an UNMAP command.

Working Draft SCSI Block Commands 4 (SBC-4)

35

T10/BSR INCITS 506 Revision 3

27 August 2014

After a read operation returns a value for an LBA, subsequent read operations form that LBA shall return the
same value until a subsequent command alters the logical block data in that LBA (e.g., a write command or an
unmap command (see table 33)).
4.7.4.6 LBP1:Mapped state
4.7.4.6.1 LBP1:Mapped state description

Upon entry into this state, the relationship between the LBA and the physical block(s) that contains the logical
block for that LBA shall be established.
If this state was entered from the LBP2:Deallocated state (see 4.7.4.7), then the device server shall allocate
LBA mapping resources, if any, required to map the LBA.
If this state was entered from the LBP3:Anchored state (see 4.7.4.8), then:
a) the device server shall not allocate LBA mapping resources; and
b) the resource exhaustion conditions described in 4.7.3.6 shall not occur.
4.7.4.6.2 Transition LBP1:Mapped to LBP2:Deallocated

This transition shall occur after:


a) an unmap operation that results in the deallocation of the LBA that was mapped.
This transition may occur at any time if the LBPRZ bit is set to one in the READ CAPACITY (16) parameter data
(see 5.16.2), and the mapped LBA references a logical block that contains:
a) user data with all bits set to zero; and
b) protection information, if any, set to FFFF_FFFF_FFFF_FFFFh.
4.7.4.6.3 Transition LBP1:Mapped to LBP3:Anchored

This transition shall occur after:


a) an unmap operation that results in the anchoring of the LBA that was mapped.
This transition may occur at any time if the LBPRZ bit is set to one in the READ CAPACITY (16) parameter data
(see 5.16.2), and the mapped LBA references a logical block that contains:
a) user data with all bits set to zero; and
b) protection information, if any, set to FFFF_FFFF_FFFF_FFFFh.
4.7.4.7 LBP2:Deallocated state
4.7.4.7.1 LBP2:Deallocated state description

While in this state:


a) there shall be no relationship between the LBA and any physical block(s); and
b) the device server should deallocate LBA mapping resources after they are no longer in use.
For an LBA in this state, an unmap operation that specifies deallocation of the LBA shall not cause a transition
from this state.
The device server shall process a read command specifying an LBA in this state (i.e., a deallocated LBA) as
described in table 9.
4.7.4.7.2 Transition LBP2:Deallocated to LBP1:Mapped

This transition:
a) shall occur after a write operation to the LBA that was deallocated; or

36

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

b) may occur at any time for reasons outside the scope of this standard.
4.7.4.7.3 Transition LBP2:Deallocated to LBP3:Anchored

This transition:
a) shall occur after an unmap operation that results in anchoring of the LBA that was deallocated; or
b) may occur at any time for reasons outside the scope of this standard.
4.7.4.8 LBP3:Anchored state
4.7.4.8.1 LBP3:Anchored state description

Upon entry into this state:


a) LBA mapping resources shall be associated with the LBA; and
b) there may or may not be a relationship between the LBA and physical block(s).
If this state was entered from the LBP2:Deallocated state, then the device server shall allocate LBA mapping
resources, if any, required to anchor the LBA.
If this state was entered from the LBP1:Mapped state, then:
a) the device server shall not allocate LBA mapping resources;
b) the device server relies on LBA mapping resources already allocated to the LBA; and
c) the resource exhaustion conditions described in 4.7.3.6 shall not occur.
For an LBA in this state, an unmap operation that specifies anchoring of the LBA shall not cause a transition
from of this state.
The device server shall process a read command specifying an LBA in this state (i.e., an anchored LBA) as
described in table 9.
4.7.4.8.2 Transition LBP3:Anchored to LBP1:Mapped

This transition:
a) shall occur after a write operation to the LBA that was anchored; or
b) may occur at any time for reasons outside the scope of this standard.
4.7.4.8.3 Transition LBP3:Anchored to LBP2:Deallocated

This transition shall occur after:


a) an unmap operation that results in the deallocation of the LBA that was anchored.

4.8 Data de-duplication


Data de-duplication is the ability of a device server to recognize redundant or duplicate data and reduce the
number of duplicate or redundant copies of the data while maintaining the application client supplied LBAs of
the duplicate or redundant copies of the data. De-duplication shall not affect protection information, if any.
Logical units that support data de-duplication may report a count of LBA resources that have been made
available as a result of being de-duplicated (see 6.4.4.4).

4.9 Ready state


A direct access block device is ready when the device server is capable of processing logical block access
commands that require access to the medium (see 4.2.2).
Working Draft SCSI Block Commands 4 (SBC-4)

37

T10/BSR INCITS 506 Revision 3

27 August 2014

A direct access block device using a removable medium (see 4.4) is not ready until a volume is mounted and
other conditions are met (see 4.3). While a direct access block device is not ready the device server shall
terminate logical block access commands with CHECK CONDITION status with the sense key set to NOT
READY and the appropriate additional sense code for the condition.
Some direct access block devices may be switched from being ready to being not ready by using the START
STOP UNIT command (see 5.25).
To make a direct access block device ready, an application client may be required to issue a START STOP
UNIT command:
a) with a START bit set to one and the POWER CONDITION field set to 0h (i.e., START_VALID); or
b) with the POWER CONDITION field set to 1h (i.e., ACTIVE).

4.10 Initialization
A direct access block device may require initialization of its medium prior to processing logical block access
commands. This initialization is requested by an application client using a FORMAT UNIT command (see 5.3).
Parameters related to the format (e.g., logical block length) may be set with a MODE SELECT command (see
SPC-4 and 6.5.2) prior to the format operation. Some direct access block devices are initialized by means
outside the scope of this standard. The time when the initialization occurs is vendor specific.
Direct access block devices using a non-volatile medium may save the parameters related to the format and
only require initialization once. However, some mode parameters may require initialization after each logical
unit reset. A catastrophic failure of the direct access block device may require that an application client send a
FORMAT UNIT command to recover from the failure.
Direct access block devices that use a volatile medium may require initialization after each logical unit reset
prior to the processing of logical block access commands (see 4.2.2). Mode parameters may also require
initialization after logical unit resets.
NOTE 2 - It is possible that mode parameter block descriptors read with a MODE SENSE command before a
FORMAT UNIT completes contain information not reflecting the true state of the medium.

A direct access block device may become format corrupt after processing a MODE SELECT command that
changes parameters (e.g., the logical block length) related to the medium format. During this time, the device
server may terminate logical block access commands with CHECK CONDITION status with the sense key set
to NOT READY and the appropriate additional sense code for the condition.
Any time the READ CAPACITY (10) parameter data (see 5.15.2) or the READ CAPACITY (16) parameter
data (see 5.16.2) changes (e.g., when a FORMAT UNIT command or a MODE SELECT command causes a
change to the logical block length or protection information, or when a vendor specific mechanism causes a
change), then the device server shall establish a unit attention condition for the SCSI initiator port (see
SAM-5) associated with each I_T nexus, except the I_T nexus on which the command causing the change
was received with the additional sense code set to CAPACITY DATA HAS CHANGED.
NOTE 3 - Logical units compliant with SBC were not required to establish a unit attention condition with the
additional sense code set to CAPACITY DATA HAS CHANGED.

4.11 Sanitize operations


4.11.1 Sanitize operations overview

A sanitize operation causes the device server to:


a) affect the information on the logical units medium such that recovery of logical block data from the
medium is not possible;

38

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

b) affect the information in the cache by a method that is outside the scope of this standard such that
previously existing data in cache is unable to be accessed; and
c) prevent future access by an application client to cache or medium where the device server is unable
to alter the information.
One of the following sanitize operations may be requested on the logical units medium:
a) a sanitize overwrite operation that causes the device server to alter information by writing a data
pattern to the medium one or more times;
b) a sanitize block erase operation that causes the device server to alter information by setting the
physical blocks to a vendor specific value; or
c) a sanitize cryptographic erase operation that causes the device server to change encryption keys to
prevent correct decryption of previously stored information, which may cause protection information, if
any, to be indeterminate.
An application client may request that a sanitize operation be performed in the restricted completion mode or
the unrestricted completion mode (see 4.11.3) using the AUSE bit in the SANITIZE command (see 5.24).
In the unrestricted completion mode, a SANITIZE command with the EXIT FAILURE MODE service action
exits a failed sanitize operation.
In the restricted completion mode, the only method to exit a failed sanitize operation is for a SANITIZE
command to request another sanitize operation and for that operation to complete without error. If a sanitize
operation in the restricted completion mode completes with an error, and a subsequent SANITIZE command
requests the unrestricted completion mode (i.e., the AUSE bit set to one), then the device server shall
terminate that SANITIZE command as described in 5.24.1.
All sanitize operations shall be performed on:
a) the medium that is being used to store logical block data;
b) the medium that is not being used to store logical block data (e.g., areas previously used to store
logical block data, areas available for allocation, and physical blocks that have become inaccessible);
and
c) all cache.
An application client requests that the device server perform a sanitize operation using the SANITIZE
command (see 5.24). While the medium is write protected (see 4.12) the device server shall terminate a
SANITIZE command with CHECK CONDITION status with the sense key set to DATA PROTECT and the
appropriate additional sense code for the condition.
4.11.2 Performing a sanitize operation

Before performing a sanitize operation, the device server shall:


a) terminate all commands in all task sets except INQUIRY commands, REPORT LUNS commands,
LOG SENSE commands that specify the Temperature log page (see SPC-4), and REQUEST SENSE
commands with CHECK CONDITION status with the sense key set to NOT READY, the additional
sense code set to LOGICAL UNIT NOT READY, SANITIZE IN PROGRESS, and the PROGRESS
INDICATION field in the sense data set to indicate that the sanitize operation is beginning;
b) stop all enabled power condition timers (see SPC-4);
c) stop all timers for enabled background scan operations (see 4.24);
d) stop all timers or counters enabled for device specific background functions (see SPC-4); and
e) discard partially downloaded microcode, if any.
While performing a sanitize operation, the device server shall:
a) process INQUIRY commands, REPORT LUNS commands, LOG SENSE commands that specify the
Temperature log page (see SPC-4), and REQUEST SENSE commands and terminate all other
commands with CHECK CONDITION status with the sense key set to NOT READY, the additional
sense code set to LOGICAL UNIT NOT READY, SANITIZE IN PROGRESS, and the PROGRESS
INDICATION field in the sense data set to indicate the progress of the sanitize operation;

Working Draft SCSI Block Commands 4 (SBC-4)

39

T10/BSR INCITS 506 Revision 3

27 August 2014

b) provide pollable sense data (see SPC-4) with the sense key set to NOT READY, the additional sense
code set to LOGICAL UNIT NOT READY, SANITIZE IN PROGRESS, and the PROGRESS INDICATION
field set to indicate the progress of the sanitize operation;
c) suspend the sanitize operation while processing the following conditions (see SAM-5):
A) a power on;
B) a hard reset;
C) a logical unit reset; or
D) a power loss expected;
d) not suspend the sanitize operation while processing an I_T nexus loss;
e) resume performing the sanitize operation after processing:
A) a logical unit reset; or
B) a power loss expected condition in which no power loss occurs within constraints defined by the
applicable SCSI transport protocol standard (e.g., power loss timeout in SPL-3);
f) process task management functions without affecting the processing of the sanitize operation (e.g.,
an ABORT TASK task management function aborts the SANITIZE command and has no effect on
performing the sanitize operation);
g) not alter mode data, INQUIRY data, or READ CAPACITY (16) parameter data (e.g., the number of
logical blocks, logical block length, or protection information settings for the logical unit); and
h) identify inaccessible physical blocks and in a vendor specific manner prevent future access to these
blocks following a successful sanitize operation.
4.11.3 Completing a sanitize operation

If a sanitize operation completes without error, and logical block provisioning management (see 4.7.3) is
supported, then:
a) the initial condition for every LBA should be anchored (see 4.7.3.2) or deallocated (see 4.7.3.3); and
b) read operations and write operations should complete without error.
If a sanitize operation completes without error and logical block provisioning management is not supported,
then:
a) read commands are processed as described in 5.24.2.2, 5.24.2.3, 5.24.2.4, and 5.24.2.5; and
b) write operations should complete without error.
If the sanitize operation completes with an error in restricted completion mode, then the device server shall:
a) terminate the SANITIZE command being performed, if any (e.g., the IMMED bit was set to zero in the
CDB, and the failure occurs before status is returned for the command), with CHECK CONDITION
status with the sense key set to MEDIUM ERROR and the additional sense code set to SANITIZE
COMMAND FAILED; and
b) until completion of a successful sanitize operation has occurred, terminate all commands, except
SANITIZE commands allowed in the restricted completion mode, INQUIRY commands, REPORT
LUNS commands, LOG SENSE commands specifying the Temperature log page (see SPC-4), and
REQUEST SENSE commands, with CHECK CONDITION status with the sense key set to MEDIUM
ERROR and the additional sense code set to SANITIZE COMMAND FAILED.
If a sanitize operation completes with an error in unrestricted completion mode, then the device server shall:
a) terminate the SANITIZE command being performed, if any (e.g., the IMMED bit was set to zero in the
CDB, and the failure occurs before status is returned for the command), with CHECK CONDITION
status with the sense key set to MEDIUM ERROR and the additional sense code set to SANITIZE
COMMAND FAILED; and
b) until completion of a successful sanitize operation has occurred, terminate all commands, except
SANITIZE commands, INQUIRY commands, REPORT LUNS commands, LOG SENSE commands
specifying the Temperature log page (see SPC-4), and REQUEST SENSE commands, with CHECK
CONDITION status with the sense key set to MEDIUM ERROR and the additional sense code set to
SANITIZE COMMAND FAILED.
A sanitize operation that completed with error and was cleared with a SANITIZE command with the service
action of EXIT FAILURE MODE may have not performed a complete sanitize operation (e.g., this action may
40

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

enable the recovery of logical block data from the cache and medium for those logical blocks that were not
sanitized).
After the sanitize operation completes the device server shall:
1) initialize all enabled timers and counters; and
2) start all enabled timers and counters for power conditions and background functions.

4.12 Write protection


Write protection prevents the alteration of the medium by logical block access commands issued to the device
server. Write protection is controlled by:
a) the user of the medium through manual intervention (e.g., a mechanical lock on the SCSI target
device);
b) hardware controls (e.g., tabs on the mediums housing); or
c) software write protection.
All sources of write protection are independent. If present, any write protection shall cause otherwise valid
logical block access commands that request alteration of the medium to be terminated by the device server
with CHECK CONDITION status with the sense key set to DATA PROTECT and the appropriate additional
sense code for the condition. Only when all write protections are disabled shall the device server process
logical block access commands that request alteration of the medium.
Hardware write protection results when a physical attribute of the SCSI target device or its medium is changed
to specify that writing shall be prohibited. Changing the state of the hardware write protection requires
physical intervention, either with the SCSI target device or its medium. If allowed by the SCSI target device,
then changing the hardware write protection while the medium is mounted results in vendor specific behavior
that may include the writing of previously buffered data (e.g., data in cache).
Software write protection results when the device server is marked as write protected by the application client
using the SWP bit in the Control mode page (see SPC-4). Changing the state of software write protection shall
not prevent previously accepted logical block data (e.g., logical block data in cache) from being written to the
medium.
The device server reports the status of write protection in the device server and on the medium with the
field in the mode parameter header (see 6.5.1).

DEVICE-SPECIFIC PARAMETER

4.13 Medium defects


4.13.1 Medium defects overview

Any medium has the potential for medium defects that cause data to be lost. Therefore, physical blocks and/or
logical blocks may contain additional information that allows the detection of changes to the logical block data
caused by medium defect or other phenomena. The additional information may also allow the logical block
data to be reconstructed following the detection of such a change (e.g., ECC bytes).
A medium defect causes:
a) a recovered error if the device server is able to read or write a logical block within the logical units
recovery limits; or
b) an unrecovered error if the device server is unable to read or write a logical block within the logical
units recovery limits,
where the logical units recovery limits are:
a) specified in the Read-Write Error Recovery mode page (see 6.5.8);
b) specified in the Verify Error Recovery mode page (see 6.5.9); or

Working Draft SCSI Block Commands 4 (SBC-4)

41

T10/BSR INCITS 506 Revision 3

27 August 2014

c) vendor specific, if the device server does not implement the Read-Write Error Recovery mode page or
the Verify Error Recovery mode page.
Direct access block devices may allow an application client to examine and modify the additional information
by using the READ LONG commands (see 5.19 and 5.20) and the WRITE LONG commands (see 5.43 and
5.44). An application client may use the WRITE LONG commands to alter the additional information to test the
defect detection logic of the direct access block device or to emulate a logical block with an unrecovered read
error when generating a mirror copy. This may induce a recovered error or an unrecovered error.
Direct access block devices may allow an application client to use the features of the WRITE LONG
commands (see 5.43 and 5.44) to:
a) disable error correction on specific logical blocks or physical blocks;
b) disable automatic reassignment on specific logical blocks or physical blocks; and
c) mark specific logical blocks or physical blocks as containing pseudo unrecovered errors with
correction enabled or pseudo unrecovered errors with correction disabled.
These features provide methods for an application client to prevent recovered errors and unrecovered errors
from being reported as informational exception conditions and prevent unnecessary reassign operations.
During a self-test operation (see SPC-4) or a background scan operation (see 4.24.1), the device server shall:
a) ignore pseudo unrecovered errors with correction disabled; and
b) process pseudo unrecovered errors with correction enabled.
The device server maintains the defect lists defined in table 10.

Table 10 Defect lists (i.e., PLIST and GLIST)


Defect list

PLIST
(i.e., primary
defect list)

Source

Content

Manufacturer

Address descriptors (see 6.2) for physical blocks that


contain permanent medium defects and never contain
logical block data

FORMAT UNIT
commands (see 5.3)
GLIST
(i.e., grown
defect list)

Address descriptors for physical blocks detected by the


device server to have medium defects during an optional
certification process performed during a format operation
Address descriptors for physical blocks specified in the
FORMAT UNIT parameter list (see 5.3.2)

REASSIGN BLOCKS
commands (see 5.21)

Address descriptors for physical blocks referenced by the


LBAs specified in the reassign LBA list (see 5.21.2)

Read medium
operations

Address descriptors for physical blocks that have been


reassigned as the result of automatic read reassignment

Write medium
operations

Address descriptors for physical blocks that have been


reassigned as the result of automatic write reassignment

The READ DEFECT DATA commands (see 5.17 and 5.18) allow an application client to request that the
device server return the PLIST and/or the GLIST.
The FORMAT UNIT command allows an application client to request that the device server clear the GLIST.
During a format operation, the device server shall not assign LBAs to any physical block in:
a) the PLIST, if the PLIST is specified to be used; or
b) the GLIST, if the GLIST is specified to be used.
A device server performs automatic reassignment of defects as specified by the settings in the Read-Write
Error Recovery mode page (see 6.5.8).

42

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server does not perform automatic read reassignment for an LBA referencing a logical block on
which an unrecovered error has occurred. If the application client is notified by the device server that an
unrecovered error occurred (e.g., as indicated by a read command being terminated with CHECK
CONDITION status with the sense key set to MEDIUM ERROR and the additional sense code set to
UNRECOVERED READ ERROR) and:
a) the application client is able to regenerate the logical block data for the LBA (e.g., in a redundancy
group (see 4.19.1), the application client regenerates logical block data from the logical block data on
the other logical units in the redundancy group) and the AWRE bit is set to one in the Read-Write Error
Recovery mode page, then the application client may send a write command with that regenerated
logical block data to trigger automatic write reassignment;
b) the application client is able to regenerate the logical block data for the LBA and the AWRE bit is set to
zero in the Read-Write Error Recovery mode page, then the application client may:
1) send a REASSIGN BLOCKS command to perform a reassign operation on the LBA; and
2) send a write command with that regenerated logical block data;
or
c) the application client is unable to regenerate the logical block data for the LBA, then the application
client may send a REASSIGN BLOCKS command to request that the device server perform a
reassign operation on the LBA.

Working Draft SCSI Block Commands 4 (SBC-4)

43

T10/BSR INCITS 506 Revision 3

27 August 2014

4.13.2 Generation of defect lists

This standard defines address descriptor formats for describing defects (see 6.2). Table 11 lists the defects
that each address descriptor format is capable of describing.

Table 11 Address descriptor formats

Format

Short block format


Extended bytes from index format
Extended physical sector format
Long block format

Multiple sequential
physical blocks

Single
physical
block

Entire track

Range

yes

no

no

yes a

yes e

yes i

6.2.3

6.2.4

yes

yes
c

Bytes from index format

yes

Physical sector format

yes d

yes
no

yes

Reference

6.2.2

no

6.2.5

no

6.2.6

yes h

no

6.2.7

yes

Describes a single physical block with the MADS bit set to zero and the BYTES FROM INDEX field set to a
value other than FFF_FFFFh.
b
Describes a single physical block with the MADS bit set to zero and the SECTOR NUMBER field set to a
value other than FFF_FFFFh.
c
Describes a single physical block with the BYTES FROM INDEX field set to a value other than
FFFF_FFFFh.
d
Describes a single physical block with the SECTOR NUMBER field set to a value other than FFFF_FFFFh.
e
Describes an entire track with the BYTES FROM INDEX field set to FFF_FFFFh.
f
Describes an entire track with the SECTOR NUMBER field set to FFF_FFFFh.
g
Describes an entire track with the BYTES FROM INDEX field set to FFFF_FFFFh.
h
Describes an entire track with the SECTOR NUMBER field set to FFFF_FFFFh.
i
Describes a range with a pair of address descriptors using the same address descriptor format in which:
a) the first address descriptor describes the starting location and has the MADS bit set to one;
b) the second address descriptor describes the ending location and has the MADS bit set to zero; and
c) the ending location is after the starting location.
For a direct access block device using rotating media (see 4.3.2), to represent two or more sequential
physical blocks on the same track using a pair of address descriptors:
a) the MADS bit shall be set to one in the first address descriptor;
b) the MADS bit shall be set to zero in the second address descriptor;
c) the CYLINDER NUMBER field in the first address descriptor shall be equal to the CYLINDER NUMBER field
in the second address descriptor;
d) the HEAD NUMBER field in the first address descriptor shall be equal to the HEAD NUMBER field in the
second address descriptor;
e) for a pair of extended bytes from index format address descriptors, the BYTES FROM INDEX field in the
first address descriptor shall be less than the BYTES FROM INDEX field in the second address
descriptor; and
f) for a pair of extended physical sector format address descriptors, the SECTOR NUMBER field in the first
address descriptor shall be less than the SECTOR NUMBER field in the second address descriptor.
For a direct access block device using rotating media, to represent two or more sequential tracks on the same
head using a pair of address descriptors:
a) the MADS bit shall be set to one in the first address descriptor;
b) the MADS bit shall be set to zero in the second address descriptor;
44

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

c) the CYLINDER NUMBER field in the first address descriptor shall be less than the CYLINDER NUMBER field
in the second address descriptor;
d) the HEAD NUMBER field in the first address descriptor shall be equal to the HEAD NUMBER field in the
second address descriptor;
e) for a pair of extended bytes from index format address descriptors, the BYTES FROM INDEX field in the
first address descriptor and the second address descriptor shall be equal to FFF_FFFFh; and
f) for a pair of extended physical sector format address descriptors, the SECTOR NUMBER field in the first
address descriptor and the second address descriptor shall be equal to FFF_FFFFh.

4.14 Write and unmap failures


If one or more write commands have not completed when a power loss, a medium error, or hardware error
occurs (e.g., a removable medium was incorrectly demounted), then any data in the logical blocks referenced
by the LBAs specified by any of those commands is indeterminate. Before sending a read command or verify
command specifying any LBAs that were specified by one of the write commands that did not complete, the
application client should resend that write command. If an application client sends a read command or verify
command specifying any LBAs that were specified by one of the write commands that did not complete before
resending that write command, then the device server may return old data, new data, vendor-specific data, or
any combination thereof for the logical blocks referenced by the specified LBAs.
If logical block provisioning (see 4.7) is supported and one or more unmap commands have not completed
when a power loss, medium error, or hardware error occurs, then the logical block provisioning state of the
LBAs requested to be unmapped by any of those commands may or may not have changed. Before sending
a read command or verify command specifying any LBAs that were specified by one of the unmap commands
that did not complete, the application client should resend that unmap command.

4.15 Caches
4.15.1 Caches overview

Direct access block devices may implement caches. A cache is an area of temporary storage in the direct
access block device (e.g., to enhance performance) separate from the medium that is not directly accessible
by the application client.
A cache stores logical block data.
A cache may be volatile or non-volatile. A volatile cache does not retain data through power cycles. A
non-volatile cache retains data through power cycles. There may be a limit on the amount of time a
non-volatile cache is able to retain data without power (see 4.15.9).

4.15.2 Read caching

While processing read commands and verify commands, the device server may use the cache to store logical
blocks that the application client may request at some future time. The algorithm used to manage the cache is
not part of this standard. However, parameters are provided (see 6.5.5) to advise the device server about
future requests, or to restrict the use of cache for a particular request.
4.15.3 Write caching

While processing write commands, the device server may perform a write cache operation to store logical
block data that is to be written to the medium at a later time with a write medium operation. This is called

Working Draft SCSI Block Commands 4 (SBC-4)

45

T10/BSR INCITS 506 Revision 3

27 August 2014

write-back caching. A write command may complete prior to logical blocks being written to the medium. As a
result of using write-back caching there is a period of time during which the logical block data may be lost if:
a) power to the SCSI target device is lost and a volatile cache is being used; or
b) a hardware failure occurs.
There is also the possibility of an error occurring during the subsequent write medium operation. If an error
occurs during the write medium operation, then the error may be reported as a deferred error on a later
command. The application client may request that write-back caching be disabled with the Caching mode
page (see 6.5.5) to prevent detected write errors from being reported as deferred errors. Even with write-back
caching disabled, undetected write errors may occur. Verify commands (e.g., VERIFY and WRITE AND
VERIFY) may be used to detect those errors.
If processing a write command results in logical block data in cache that is different from the logical block data
on the medium, then the device server shall retain that logical block data in cache until a write medium
operation is performed using that logical block data. After the write medium operation is complete, the device
server may retain that logical block data in cache.
4.15.4 Command interactions with caches

The application client may affect behavior of the cache with:


a) the PRE-FETCH commands (see 5.8 and 5.9);
b) the SYNCHRONIZE CACHE commands (see 5.26 and 5.27); and
c) the Caching mode page (see 6.5.5).
When the cache becomes full of logical block data, the device server may replace the logical block data in the
cache with new logical block data. The disable page out (DPO) bit in the CDBs of read commands, verify
commands, and write commands allows the application client to influence the replacement of logical block
data in the cache. A read command, verify command, or a write command with a DPO bit set to one is a hint to
the device server that the logical blocks specified by that command are not likely to be accessed in the near
future and should not be put in the cache or retained by the cache.
Application clients may use the force unit access (FUA) bit in the CDBs of read commands (e.g., see 5.11) or
write commands (e.g., see 5.33) to specify that the device server shall access the medium or non-volatile
cache.
Setting the DPO bit to one (e.g., see 5.11) and the FUA bit to one in all read commands and all write commands
has the same effect as bypassing the volatile cache.
4.15.5 Write operation and write medium operation interactions with caches

For each LBA accessed by a write operation:


1) if a cache contains more recent logical block data for that LBA than the medium, then the device
server shall:
A) perform a write cache operation to that LBA to update the logical block data in the cache;
B) invalidate that LBA in the cache and perform a write medium operation to that LBA; or
C) perform a write cache operation to that LBA to update the logical block data in the cache and
perform a write medium operation to that LBA.
For each LBA accessed by a write medium operation that is not part of a write operation:
1) if a cache contains more recent logical block data for that LBA than the medium, then the device
server shall:
A) perform a write cache operation to that LBA to update the logical block data in the cache; or
B) invalidate that LBA in the cache, before the device server performs the write medium operation to
that LBA.

46

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.15.6 Read operation and read medium operation interactions with caches

For each LBA accessed by a read operation:


1) if a cache contains more recent logical block data for that LBA than the medium, then the device
server shall perform a read cache operation from that LBA; or
2) the device server shall perform a read medium operation from that LBA.
For each LBA accessed by a read medium operation that is not part of a read operation:
1) if a cache contains more recent logical block data for the LBA than the medium, then the device
server shall perform a write medium operation to that LBA; and
2) the device server may invalidate that LBA in the cache, before the device server performs the read
medium operation from that LBA.
4.15.7 Verify medium operation interactions with caches

For each LBA accessed by a verify medium operation:


1) if a cache contains more recent logical block data for the LBA than the medium, then the device
server shall perform a write medium operation to that LBA;
2) the device server may invalidate that LBA in the cache; and
3) before the device server performs the verify medium operation from that LBA.
4.15.8 Unmap operation interactions with caches

During an unmap operation, the device server changes any logical block data in the cache for the LBA
unmapped by the operation so that any logical block data transferred by the device server to the Data-In
Buffer while processing a subsequent read command reflects the results of the unmap operation (see
4.7.4.7.1 and 4.7.4.8.1).
4.15.9 Power loss effects on caches

The power, if any, needed to maintain a non-volatile cache may decrease to the point that the device server is
unable to ensure the non-volatility of the cache for a vendor specific interval of time (e.g., the battery voltage
becomes too low too sustain cache contents beyond a vendor specific time). If this occurs and the Extended
INQUIRY Data VPD page (see SPC-4) indicates that the device server contains non-volatile cache (i.e.,
NV_SUP bit set to one), then:
a) if the reporting of informational exceptions control warnings is enabled (i.e., the EWASC bit is set to
one in the Information Exceptions Control mode page (see 6.5.6)), then the device server shall report
the degraded non-volatile cache as specified in the Information Exceptions Control mode page with
an additional sense code set to WARNING - DEGRADED POWER TO NON-VOLATILE CACHE; or
b) if the reporting of informational exceptions control warnings is disabled (i.e., the EWASC bit is set to
zero in the Information Exceptions Control mode page), then the device server shall establish a unit
attention condition (see SAM-5) for the SCSI initiator port associated with every I_T nexus with the
additional sense code set to WARNING - DEGRADED POWER TO NON-VOLATILE CACHE.
Non-volatile caches may become volatile (e.g., battery voltage becomes too low to sustain cache contents
when power is lost). If non-volatile caches become volatile, then logical block data transferred for read
commands or write commands in which the force unit access (FUA) bit in the CDB is set to one may bypass
the cache.
If a non-volatile cache becomes volatile, then the device server shall set the REMAINING NON-VOLATILE TIME
field to zero in the Non-volatile Cache log page (see 6.4.5).
If non-volatile cache becomes volatile and the Extended INQUIRY Data VPD page (see SPC-4) indicates that
the device server contains non-volatile cache (i.e., the NV_SUP bit is set to one), then:
a) if the reporting of informational exceptions control warnings is enabled (i.e., the EWASC bit is set to
one in the Information Exceptions Control mode page (see 6.5.6)), then the device server shall report

Working Draft SCSI Block Commands 4 (SBC-4)

47

T10/BSR INCITS 506 Revision 3

27 August 2014

the change in the cache as specified in the Information Exceptions Control mode page with the
additional sense code set to WARNING - NON-VOLATILE CACHE NOW VOLATILE; or
b) if the reporting of informational exceptions control warnings is disabled (i.e., the EWASC bit is set to
zero in the Information Exceptions Control mode page), then the device server shall establish a unit
attention condition (see SAM-5) for the SCSI initiator port associated with every I_T nexus with the
additional sense code set to WARNING - NON-VOLATILE CACHE NOW VOLATILE.
If:
a) a power on or hard reset occurs;
b) the Extended INQUIRY Data VPD page indicates that the device server contains a non-volatile cache
(i.e., the NV_SUP bit is set to one); and
c) the non-volatile cache is currently volatile,
then the device server shall establish a unit attention condition for the SCSI initiator port associated with every
I_T nexus with the additional sense code set to WARNING - NON-VOLATILE CACHE NOW VOLATILE.

4.16 Implicit head of queue command processing


Each of the following commands defined by this standard may be processed by the task manager as if it has a
HEAD OF QUEUE task attribute (see SAM-5), even if the command is received with a SIMPLE task attribute or an
ORDERED task attribute:
a) the READ CAPACITY (10) command (see 5.15); and
b) the READ CAPACITY (16) command (see 5.16).
The following command defined by this standard shall be processed by the task manager as if it has a HEAD
OF QUEUE task attribute, even if the command is received with a SIMPLE task attribute or an ORDERED task
attribute:
a) the SANITIZE command (see 5.24).
See SPC-4 for additional commands subject to implicit HEAD OF QUEUE command processing. See SAM-5 for
additional rules on implicit head of queue processing.

4.17 Reservations
Reservation restrictions are placed on commands as a result of access qualifiers associated with the type of
reservation. See SPC-4 for a description of reservations. The details of commands that are allowed under
what types of reservations are described in table 12.
Commands from I_T nexuses holding a reservation should complete normally. Table 12 specifies the behavior
of commands from registered I_T nexuses when a registrants only or all registrants type persistent reservation
is present.
For each command, this standard or SPC-4 defines the conditions that result in the device server completing
the command with RESERVATION CONFLICT status.

48

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 12 SBC-3 commands that are allowed in the presence of various reservations (part 1 of 2)
Addressed logical unit has this type of persistent
reservation held by another I_T nexus
Command

From any I_T nexus


Exclusive
Write
Exclusive
Access

From I_T nexus not


From
registered
registered
I_T nexus
Exclusive
Write
(RR all
Exclusive Access
types)
- RR
- RR

COMPARE AND WRITE

Conflict

Conflict

Allowed

Conflict

Conflict

FORMAT UNIT

Conflict

Conflict

Allowed

Conflict

Conflict

GET LBA STATUS

Allowed

Conflict

Allowed

Allowed

Conflict

ORWRITE (16) / (32)

Conflict

Conflict

Allowed

Conflict

Conflict

POPULATE TOKEN

Allowed

Conflict

Allowed

Allowed

Conflict

PRE-FETCH (10) / (16)

Allowed

Conflict

Allowed

Allowed

Conflict

PREVENT ALLOW MEDIUM REMOVAL


(Prevent=0)

Allowed

Allowed

Allowed

Allowed

Allowed

PREVENT ALLOW MEDIUM REMOVAL


(Prevent 0)

Conflict

Conflict

Allowed

Conflict

Conflict

READ (10) / (12) / (16) / (32)

Allowed

Conflict

Allowed

Allowed

Conflict

READ CAPACITY (10) / (16)

Allowed

Allowed

Allowed

Allowed

Allowed

Conflict

Allowed

Allowed a

Conflict

READ DEFECT DATA (10) / (12)

Allowed

READ LONG (10) / (16)

Conflict

Conflict

Allowed

Conflict

Conflict

REASSIGN BLOCKS

Conflict

Conflict

Allowed

Conflict

Conflict

REPORT REFERRALS

Allowed

Allowed

Allowed

Allowed

Allowed

SANITIZE

Conflict

Conflict

Allowed

Conflict

Conflict

START STOP UNIT with START bit set to


one and POWER CONDITION field set to 0h

Allowed

Allowed

Allowed

Allowed

Allowed

START STOP UNIT with START bit set to


zero or POWER CONDITION field set to a
value other than 0h

Conflict

Conflict

Allowed

Conflict

Conflict

Key:
RR = Registrants Only or All Registrants
Allowed = Commands received from I_T nexuses not holding the reservation or from I_T nexuses not
registered when a registrants only or all registrants type persistent reservation is present should complete
normally.
Conflict = Commands received from I_T nexuses not holding the reservation or from I_T nexuses not
registered when a registrants only or all registrants type persistent reservation is present shall not be
performed, and the device server shall complete the command with RESERVATION CONFLICT status.
a

The device server in logical units claiming compliance with SBC-2 may complete the command with
RESERVATION CONFLICT status. Device servers may report whether certain commands are allowed
in the PERSISTENT RESERVE IN command REPORT CAPABILITIES service action parameter data
ALLOW COMMANDS field (see SPC-4).

Working Draft SCSI Block Commands 4 (SBC-4)

49

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 12 SBC-3 commands that are allowed in the presence of various reservations (part 2 of 2)
Addressed logical unit has this type of persistent
reservation held by another I_T nexus
Command

From any I_T nexus


Write
Exclusive
Exclusive
Access

From I_T nexus not


From
registered
registered
I_T nexus
Write
Exclusive
(RR all
Exclusive Access
types)
- RR
- RR

SYNCHRONIZE CACHE (10) / (16)

Conflict

Conflict

Allowed

Conflict

Conflict

UNMAP

Conflict

Conflict

Allowed

Conflict

Conflict

VERIFY (10) / (12) / (16) / (32)

Allowed

Conflict

Allowed

Allowed

Conflict

WRITE (10) / (12) / (16) / (32)

Conflict

Conflict

Allowed

Conflict

Conflict

WRITE AND VERIFY (10) / (12) / (16) /


(32)

Conflict

Conflict

Allowed

Conflict

Conflict

WRITE ATOMIC (16) / (32)

Conflict

Conflict

Allowed

Conflict

Conflict

WRITE LONG (10) / (16)

Conflict

Conflict

Allowed

Conflict

Conflict

WRITE SAME (10) / (16) / (32)

Conflict

Conflict

Allowed

Conflict

Conflict

WRITE USING TOKEN

Conflict

Conflict

Allowed

Conflict

Conflict

XDWRITEREAD (10) / (32)

Conflict

Conflict

Allowed

Conflict

Conflict

XPWRITE (10) / (32)

Conflict

Conflict

Allowed

Conflict

Conflict

Key:
RR = Registrants Only or All Registrants
Allowed = Commands received from I_T nexuses not holding the reservation or from I_T nexuses not
registered when a registrants only or all registrants type persistent reservation is present should complete
normally.
Conflict = Commands received from I_T nexuses not holding the reservation or from I_T nexuses not
registered when a registrants only or all registrants type persistent reservation is present shall not be
performed, and the device server shall complete the command with RESERVATION CONFLICT status.
a

The device server in logical units claiming compliance with SBC-2 may complete the command with
RESERVATION CONFLICT status. Device servers may report whether certain commands are allowed
in the PERSISTENT RESERVE IN command REPORT CAPABILITIES service action parameter data
ALLOW COMMANDS field (see SPC-4).

4.18 Error reporting


4.18.1 Error reporting overview

If any of the conditions listed in table 13 occur during the processing of a command, then the device server
shall terminate the command with CHECK CONDITION status with the sense key set to the specified value
and the additional sense code set to the appropriate value for the condition. Some errors may occur after the
completion status has already been reported. For such errors, SPC-4 defines a deferred error reporting
mechanism. Table 13 lists some error conditions and the applicable sense keys. The list does not provide a
complete list of all conditions that may cause CHECK CONDITION status.

50

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 13 Example error conditions


Condition

Sense key

Invalid LBA

ILLEGAL REQUEST

Unsupported option requested

ILLEGAL REQUEST

Logical unit reset, I_T nexus loss, or medium change


since last command from this application client

UNIT ATTENTION

Logical block provisioning threshold notification

UNIT ATTENTION

Self diagnostic failed

HARDWARE ERROR

Unrecovered error

MEDIUM ERROR or HARDWARE ERROR

Recovered read error

RECOVERED ERROR

Pseudo unrecovered error

MEDIUM ERROR

Over-run or other error that may be resolved by repeating


the command

ABORTED COMMAND

Attempt to write on write-protected medium

DATA PROTECT

Direct access block devices compliant with this standard shall support both the fixed and descriptor formats of
sense data (see SPC-4).

Working Draft SCSI Block Commands 4 (SBC-4)

51

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 14 summarizes use of the sense data fields.

Table 14 Sense data field usage for direct access block devices
Field

Usage

Reference

READ LONG commands

5.19 and 5.20

REASSIGN BLOCKS command


WRITE LONG commands

INFORMATION

field a

5.43 and 5.44

Any command that accesses the medium, based on the


Read-Write Error Recovery mode page

4.20.3 and 6.5.8

Any command that accesses the medium, based on the


Verify Error Recovery mode page

6.5.9

Any command that is terminated with a logical block


provisioning threshold notification
COMPARE AND WRITE command
EXTENDED COPY command
COMMAND-SPECIFIC
INFORMATION field

ILI
a
b

bit

5.21

4.7.3.7.4
5.2
SPC-4

REASSIGN BLOCKS command


If rebuild assist mode is enabled (see 4.20), then any
command that accesses the medium, based on the
Read-Write Error Recovery mode page b

5.21
4.20.3

READ LONG commands

5.19 and 5.20

WRITE LONG commands

5.43 and 5.44

See SPC-4 for a description of how the VALID bit interacts with the INFORMATION field.
If fixed format sense data is used but the value to be placed in the COMMAND-SPECIFIC INFORMATION
field is greater than FFFF_FFFFh (e.g., an 8-byte LBA), then the device server shall report no value in
the INFORMATION field (see SPC-4) and shall report no value in the COMMAND-SPECIFIC INFORMATION
field (see SPC-4).

If a command attempts to access or reference an invalid LBA, then the device server shall report the first
invalid LBA (e.g., lowest numbered LBA) in the INFORMATION field of the sense data (see SPC-4).
If a recovered read error is reported, then device server shall report the last LBA (e.g., highest numbered LBA)
on which a recovered read error occurred for the command in the INFORMATION field of the sense data (see
SPC-4).
If an unrecovered error is reported, then the device server shall report the LBA of the logical block on which an
unrecovered error occurred in the INFORMATION field of the sense data (see SPC-4).
4.18.2 Processing pseudo unrecovered errors

If a pseudo unrecovered error with correction disabled is encountered on a logical block (e.g., by a command,
a background scan, or a background self-test), then the device server shall:
a) perform no error recovery on the affected logical blocks, including any read error recovery enabled by
the Read-Write Error Recovery mode page (see 6.5.8) or the Verify Error Recovery mode page
(see 6.5.9);
b) perform no automatic read reassignment or automatic write reassignment for the affected logical
blocks, regardless of the settings of the AWRE bit and the ARRE bit in the Read-Write Error Recovery
mode page;

52

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

c) not consider errors on the affected logical blocks to be informational exception conditions as defined
in the Information Exceptions Control mode page (see 6.5.6);
d) not log errors on the affected logical blocks in any log page that contain error counters (see SPC-4);
and
e) in any information returned for the error (e.g., in sense data or in the Background Scan Results log
page (see 6.4.2)), set the sense key to MEDIUM ERROR and either:
A) should set the additional sense code to READ ERROR LBA MARKED BAD BY APPLICATION
CLIENT; or
B) may set the additional sense code to UNRECOVERABLE READ ERROR.
The logical unit shall clear a pseudo unrecovered error if it processes or performs one of the following for that
LBA:
a)
b)
c)
d)
e)

a format operation;
a reassign operation;
a sanitize overwrite operation;
a sanitize block erase operation; or
a write command that is not a WRITE LONG command specifying a pseudo unrecovered error.

The logical unit may clear a pseudo unrecovered error if it processes or performs one of the following for that
LBA:
a) a sanitize cryptographic erase operation;
b) an unmap operation; or
c) a MODE SELECT command that uses the mode parameter block descriptor (see 6.5.2) to change the
capacity to be lower than that LBA.
The logical unit shall not clear a pseudo unrecovered error if it processes one of the following for that LBA:
a) a read command.
If a pseudo unrecovered error with correction enabled is encountered on a logical block (e.g., by a command,
a background scan, or a background self-test), then the device server shall:
a) if enabled by the Read-Write Error Recovery mode page (see 6.5.8) or the Verify Error Recovery
mode page (see 6.5.9), perform error recovery on the affected logical blocks;
b) perform no automatic read reassignment or automatic write reassignment for the affected logical
blocks, regardless of the settings of the AWRE bit and the ARRE bit in the Read-Write Error Recovery
mode page;
c) consider errors on the affected logical blocks to be informational exception conditions as defined in
the Information Exceptions Control mode page (see 6.5.6);
d) log errors on the affected logical blocks in any log page that contain error counters (see SPC-4); and
e) in any information returned for the error (e.g., in sense data or in the Background Scan Results log
page (see 6.4.2)), set the sense key to MEDIUM ERROR and either:
A) should set the additional sense code to READ ERROR LBA MARKED BAD BY APPLICATION
CLIENT; or
B) may set the additional sense code to UNRECOVERABLE READ ERROR.
4.18.3 Block commands sense data descriptor

Table 15 defines the block commands sense data descriptor used in descriptor format sense data (see
SPC-4) for direct access block devices.

Working Draft SCSI Block Commands 4 (SBC-4)

53

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 15 Block commands sense data descriptor format


Bit
Byte

(05h)

DESCRIPTOR TYPE

ADDITIONAL LENGTH

(02h)

Reserved

2
3

Reserved

Reserved

ILI

The DESCRIPTOR TYPE field and the ADDITIONAL LENGTH field are defined in SPC-4 and shall be set to the
values shown in table 15 for the block commands sense data descriptor.
The incorrect length indication (ILI) bit set to one indicates that:
a) the command was a READ LONG command or WRITE LONG command with a requested data
length; and
b) the requested data length in the READ LONG command or WRITE LONG command did not match
the length of the logical block.
An ILI bit set to zero indicates that either:
a) the command was not a READ LONG command or WRITE LONG command with a requested data
length; or
b) the requested data length in the READ LONG command or WRITE LONG command matched the
length of the logical block.
4.18.4 User data segment referral sense data descriptor

Table 16 defines the user data segment referral sense data descriptor used in descriptor format sense data for
direct access block devices. The user data segment referral sense data descriptor contains descriptors
indicating the user data segment(s) on the logical unit and the SCSI target port groups through which those
user data segments may be accessed (see 4.28).

54

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 16 User data segment referral sense data descriptor format


Bit
Byte

(0Bh)

DESCRIPTOR TYPE

ADDITIONAL LENGTH

(y -1)

Reserved

NOT_ALL_R

Reserved

User data segment referral descriptor list


4

4+n

User data segment referral descriptor [first]

y-m

User data segment referral descriptor [last]

The DESCRIPTOR TYPE field is defined in SPC-4 and shall be set to the value shown in table 16 for the user
data segment referral sense data descriptor.
The ADDITIONAL LENGTH field indicates the number of bytes that follow in the logical block referrals sense data
descriptor.
A not all referrals (NOT_ALL_R) bit set to zero indicates that the list of user data segment referral descriptors is
a complete list of user data segments. A NOT_ALL_R bit set to one indicates that there are more user data
segments than are able to be indicated by the user data segment referral sense data.
Each user data segment referral descriptor (see table 17) indicates information identifying:
a) a user data segment that is accessible through the SCSI target port groups indicated by this
descriptor; and
b) one or more SCSI target port groups through which the user data segment indicated by this descriptor
is able to be accessed.
User data segment referral descriptors shall be listed in ascending LBA order. If a user data segment referral
descriptor describes the last user data segment (i.e., points to the largest LBA) and the preceding user data
segment descriptors do not represent the complete list of user data segments, then the next user data
segment referral descriptor, if any, shall describe the first user data segment (i.e., the user data segments may
wrap).

Working Draft SCSI Block Commands 4 (SBC-4)

55

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 17 defines the user data segment referral descriptor.

Table 17 User data segment referral descriptor format


Bit
Byte

Reserved

2
3
4

NUMBER OF TARGET PORT GROUP DESCRIPTORS

(MSB)

FIRST USER DATA SEGMENT LBA

(LSB)

11
12

(MSB)
LAST USER DATA SEGMENT LBA

(LSB)

19

Target port group descriptor list


20

23

Target port group descriptor [first]

m-3

Target port group descriptor [last]

The NUMBER OF TARGET PORT GROUP DESCRIPTORS field indicates the number of target port group descriptors
that follow.
The FIRST USER DATA SEGMENT LBA field indicates the first LBA of the first user data segment (see 4.28)
indicated by this descriptor.
The LAST USER DATA SEGMENT LBA field indicates the last LBA of the last user data segment (see 4.28)
indicated by this descriptor.
The target port group descriptor (see table 18) specifies the target port group and the asymmetric access
state of the target port group (see SPC-4). The device server shall return one target port group descriptor for
each target port group in a target port asymmetric access state of active/optimized, active/non-optimized, or
transitioning. The device server may return one target port group descriptor for each target port group in a
target port asymmetric access state of unavailable.

56

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 18 Target port group descriptor


Bit
Byte

Reserved

ASYMMETRIC ACCESS STATE

Reserved

(MSB)

TARGET PORT GROUP

(LSB)

The ASYMMETRIC ACCESS STATE field (see SPC-4) contains the asymmetric access state of the user data
segment(s) specified by this descriptor that may be accessed through this target port group.
The TARGET PORT GROUP field specifies a target port group (see SPC-4) that the application client uses when
issuing commands associated with the user data segments specified by this descriptor.
4.18.5 Direct-access block device sense data descriptor

Table 19 defines the direct-access block device sense data descriptor, which may be used in descriptor format
sense data (see SPC-4) instead of any of the following sense data descriptors:
a)
b)
c)
d)
e)

information (see SPC-4);


command-specific information (see SPC-4);
sense key specific (see SPC-4);
field replaceable unit (see SPC-4); and
block commands (see 4.18.3).

If the device server includes the direct-access block device sense data descriptor in a sense data descriptor
list, then it shall not include any of those sense data descriptors in the same sense data descriptor list.

Table 19 Direct-access block device sense data descriptor format


Bit
Byte

DESCRIPTOR TYPE

ADDITIONAL LENGTH
VALID

Reserved

(1Eh)
Reserved

ILI

Reserved

3
4

(0Dh)

0
2

SKSV

Sense key specific information

FIELD REPLACEABLE UNIT CODE

15

(MSB)

16

23

(MSB)

INFORMATION

(LSB)
COMMAND-SPECIFIC INFORMATION

Working Draft SCSI Block Commands 4 (SBC-4)

(LSB)

57

T10/BSR INCITS 506 Revision 3

27 August 2014

The DESCRIPTOR TYPE field is described in SPC-4, and shall be set as shown in table 19 for the direct-access
block device sense data descriptor.
A VALID bit set to zero indicates that the INFORMATION field is not defined in this standard or any other
command standard. A VALID bit set to one indicates the INFORMATION field contains valid information as defined
in this standard or a command standard.
The ILI bit is described in the block commands sense data descriptor (see 4.18.3).
A sense-key specific valid (SKSV) bit set to one indicates the sense key specific information contains valid
information as defined in SPC-4. An SKSV bit set to zero indicates that the sense key specific information is not
as defined by SPC-4.
The sense key specific information is described in the sense key specific sense data descriptor (see SPC-4).
The FIELD REPLACEABLE UNIT CODE field is described in the field replaceable unit sense data descriptor (see
SPC-4).
The INFORMATION field is described in the information sense data descriptor (see SPC-4).
The COMMAND-SPECIFIC INFORMATION field is described in the command-specific information sense data
descriptor (see SPC-4). The COMMAND-SPECIFIC INFORMATION field should be ignored in sense data for a
command or operation for which the COMMAND-SPECIFIC INFORMATION field is not defined and in sense data
that is not related to a command or operation (e.g., pollable sense data).

4.19 Model for XOR commands


4.19.1 Model for XOR commands overview

In storage arrays, a SCSI storage array device (see SCC-2) organizes a group of direct access block devices
into objects. The type of object supported by this model is the redundancy group, where some of the logical
blocks on the direct access block devices are used for XOR-protected data and some of the logical blocks are
used for check data. The check data is generated by performing a cumulative XOR operation of the
XOR-protected data. The XOR operation may be performed by the SCSI storage array device or by the direct
access block devices.
A direct access block device containing XOR-protected data is called a data disk. A direct access block device
containing check data is called a parity disk.
Performing the XOR operation in the direct access block devices may result in a reduced number of data
transfers across a service delivery subsystem.
For example, when the XOR operation is performed within the SCSI storage array device, the following
commands are used for a typical update write sequence:
1)
2)
3)
4)

a read command to the data disk;


a write command to the data disk;
a read command to the parity disk; and
a write command to the parity disk.

The SCSI storage array device also does two internal XOR operations in this sequence.
In contrast, during SCSI storage array device supervised XOR operations (see 4.19.2) only the following
operations are used:
a) a write command to the data disk;
b) a read command to the data disk; and
c) a write command to the parity disk.

58

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.19.2 SCSI storage array device supervised XOR operations


4.19.2.1 SCSI storage array device supervised XOR operations overview

A SCSI storage array device (see SCC-2) supervises three basic operations that require XOR functionality:
a) update write operation (see 4.19.2.2);
b) regenerate operation (see 4.19.2.3); and
c) rebuild operation (see 4.19.2.4).
Command sequences for each of these operations use the device servers in the direct access block devices
to perform the necessary XOR functions.
XDWRITEREAD commands (see 5.49 and 5.50) and XPWRITE commands (see 5.51 and 5.52) are required
to implement SCSI storage array device supervised XOR operations. The SCSI storage array device also
uses READ commands and WRITE commands for certain operations.
4.19.2.2 Update write operation

The update write operation writes new XOR-protected data to a data disk and updates the check data on the
parity disk. The sequence performed by the SCSI storage array device (see SCC-2) is as follows:
1) send an XDWRITEREAD command to the data disk with the Data-Out Buffer containing the new
XOR-protected data; and
2) send an XPWRITE command to the parity disk with the Data-Out Buffer for this command containing
the logical block data from the Data-In Buffer of the XDWRITEREAD command.
4.19.2.3 Regenerate operation

The regenerate operation is used to recreate one or more logical blocks that have an error. This is
accomplished by reading the associated logical block from each of the other direct access block devices
within the redundancy group and performing an XOR operation on each of these logical blocks. The last XOR
result is the data that should have been present on the unreadable direct access block device. The number of
steps is dependent on the number of direct access block devices in the redundancy group, but the sequence
performed by the SCSI storage array device (see SCC-2) is as follows:
1) send a READ command to the first direct access block device;
2) send an XDWRITEREAD command with the DISABLE WRITE bit set to one to the next direct access
block device using the logical block data from the Data-In Buffer of the previous command as the
logical block data in the Data-Out Buffer for this command; and
3) repeat step 2) until all direct access block devices in the redundancy group except the failed device
have been accessed. The logical block data in the Data-In Buffer for the last command is the
regenerated data.
4.19.2.4 Rebuild operation

The rebuild operation is similar to the regenerate operation, except that the last XOR result is written to the
replacement device. This function is used when a failed device is replaced and the SCSI storage array device
(see SCC-2) is writing the rebuilt data to the replacement device. The number of steps is dependent on the
number of direct access block devices in the redundancy group, but the sequence performed by the SCSI
storage array device (see SCC-2) is as follows:
1) perform the regenerate operation (see 4.19.2.3); and
2) send a WRITE command to the replacement device using the regenerated data.

Working Draft SCSI Block Commands 4 (SBC-4)

59

T10/BSR INCITS 506 Revision 3

27 August 2014

4.19.3 Array subsystem considerations


4.19.3.1 Array subsystem considerations overview

This subclause lists considerations that apply to any array subsystem and describes how use of the XOR
commands may affect handling of those situations.
4.19.3.2 Access to an inconsistent stripe

A stripe is a set of corresponding extents from two or more direct access block devices.
When the SCSI storage array device (see SCC-2) issues an update write to a data disk, the data in the data
disk has been updated when successful status is returned for the command. Until the parity disk has been
updated the associated stripe in the redundancy group is not consistent (i.e., performing an XOR operation on
the XOR-protected data does not produce the check data).
The SCSI storage array device shall keep track of this window of inconsistency and ensure that a regenerate
or rebuild operation for any data extent within the stripe is not attempted until after the parity disk has been
updated, making the stripe consistent again. For multi-initiator systems, tracking the updates may be more
complex because each SCSI storage array device is required to ensure that a second SCSI storage array
device is not writing to a stripe that the first SCSI storage array device is regenerating or rebuilding. The
coordination between SCSI storage array devices is system specific and is beyond the scope of this standard.
If a device server terminates any of the XOR commands with CHECK CONDITION status and an unrecovered
error is indicated, then an inconsistent stripe may result. It is the SCSI storage array devices responsibility to
identify the failing device, identify the scope of the failure, and then to limit access to the inconsistent stripe.
The recovery procedures that the SCSI storage array device implements are outside the scope of this
standard.

4.20 Rebuild assist mode


4.20.1 Rebuild assist mode overview

The rebuild assist mode provides a method for a SCSI storage array device (see SCC-2) to read recovered
logical blocks from a failed logical unit in a storage array instead of rebuilding the logical blocks from other
logical units in the storage array. This mode allows the failed logical unit to report logical blocks that are
unreadable without requiring the SCSI storage array device to read every LBA in the failed logical unit to
determine the unrecovered logical blocks. The SCSI storage array device then copies the logical blocks
recovered from the failed logical unit to a replacement logical unit and only rebuilds the failed logical blocks.
Enabling the rebuild assist mode:
a) may cause the device server to initiate a self test to identify the scope of failures, if any;
b) modifies READ command recovery behavior by the device server based on the setting of the RARC bit
(see 4.20.3 and 5.11); and
c) may cause sense data to be returned by the device server that indicates the location of multiple failing
logical blocks on read commands and write commands.
The self-test operations performed by the device server while rebuild assist mode is enabled may result in
detection of failed physical elements. A predicted unrecovered error is an unrecovered error that is the result
of an attempt by the device server to access an LBA associated with a failed physical element. An unpredicted
unrecovered error is an unrecovered error that is the result of a device server accessing an LBA that is not
associated with a failed physical element.

60

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.20.2 Enabling rebuild assist mode

An application client should enable rebuild assist mode after the application client determines that a rebuild is
required. The application client enables the rebuild assist mode by setting the ENABLED bit to one and setting
the DISABLED PHYSICAL ELEMENT field to all zeros in the Rebuild Assist Output diagnostic page (see 6.3.3).
If a SEND DIAGNOSTIC command requests the enabling of the rebuild assist mode, then the device server:
1) shall enable the rebuild assist mode;
2) may perform a diagnostic test of the physical elements contained within the logical unit; and
3) should disable any physical elements that are not functional if a diagnostic test of the physical
elements is performed.
The application client may verify that rebuild assist mode is enabled by verifying that the ENABLED bit is set to
one in the Rebuild Assist Input diagnostic page (see 6.3.2).
4.20.3 Using the rebuild assist mode
4.20.3.1 Using rebuild assist mode overview

After rebuild assist mode is enabled, the application client should issue read commands to read the available
logical block data from the failed logical unit. If the device server does not detect an unrecovered error while
processing a read command, then the device server should complete the read command without error.
The rebuild assist mode allows the device server to report unrecovered read errors or unrecovered write
errors that are either predicted (i.e., predicted unrecovered errors) or unpredicted (i.e., unpredicted
unrecovered errors).
4.20.3.2 Unpredicted unrecovered read error

If a device server receives a read command with the RARC bit set to one, then rebuild assist mode shall not
affect processing of the read command.
If rebuild assist mode is enabled and a device server receives a read command with the RARC bit set to zero
and the device server detects an unpredicted unrecovered error that is not a pseudo unrecovered read error
(see 4.18.2), then the device server:
1) shall perform limited read recovery that is vendor specific;
2) shall transfer the data for all recovered logical blocks, if any, from the logical block referenced by the
starting LBA of the failed read command up to the first unrecovered logical block (i.e., the lowest
numbered LBA) to the Data-in Buffer;
3) shall terminate the command with CHECK CONDITION status with the sense key set to MEDIUM
ERROR, the additional sense code set to UNRECOVERED READ ERROR, and report the LBA
referencing the unrecovered logical block in the INFORMATION field (see SPC-4); and
4) may use this failure in a vendor specific manner to predict other logical blocks that may be
unrecovered.
If the application client receives sense data with the sense key set to MEDIUM ERROR, the additional sense
code set to UNRECOVERED READ ERROR, and the INFORMATION field indicating a valid LBA (see SPC-4),
then the application client should issue the next read command with the starting LBA set to the contents of the
INFORMATION field plus one.
4.20.3.3 Predicted unrecovered read error

If the device server receives a read command with the RARC bit set to one, then rebuild assist mode shall not
affect the processing of the read command.
If rebuild assist mode is enabled and the device server receives a read command with the RARC bit set to zero,
and the device server detects a predicted unrecovered error, then the device server:
1) shall perform limited read recovery that is vendor specific;

Working Draft SCSI Block Commands 4 (SBC-4)

61

T10/BSR INCITS 506 Revision 3

27 August 2014

2) shall transfer the data for all recovered logical blocks, if any, from the logical block referenced by the
starting LBA of the failed read command up to the first predicted unrecovered LBA (i.e., the lowest
numbered LBA) to the Data-in Buffer; and
3) shall terminate the read command with CHECK CONDITION status with the sense key set to
ABORTED COMMAND, the additional sense code set to MULTIPLE READ ERRORS, and:
A) report the following value in the INFORMATION field (see SPC-4):
a) the LBA referencing the first unrecovered logical block (i.e., the lowest numbered LBA);
and
B) report the following value in the COMMAND-SPECIFIC INFORMATION field (see SPC-4):
a) the LBA referencing the last unrecovered logical block (i.e., the highest numbered LBA) in a
sequence of contiguous unrecovered logical blocks that started with the LBA indicated in the
INFORMATION field.
If the application client receives sense data with the sense key set to ABORTED COMMAND, the additional
sense code set to MULTIPLE READ ERRORS, and the INFORMATION field indicating a valid LBA (see SPC-4),
then the application client should issue the next read command with the starting LBA set to the contents of the
COMMAND-SPECIFIC INFORMATION field plus one to continue recovering data from the logical unit. This process
should be repeated until all of the LBAs have been scanned.
4.20.3.4 Unpredicted unrecovered write error

If rebuild assist mode is enabled and the device server detects an unpredicted unrecovered error while
processing a write command, then the device server shall terminate the command with CHECK CONDITION
status with the sense key set to MEDIUM ERROR, the additional sense code set to WRITE ERROR, and
report the LBA referencing the first logical block (i.e., the lowest numbered LBA) in error in the INFORMATION
field (see SPC-4).
4.20.3.5 Predicted unrecovered write error

If rebuild assist mode is enabled and the device server detects a predicted unrecovered error while
processing a write command, then the device server:
1) transfers the write data from the Data-Out Buffer;
2) writes the transferred data up to the logical block referenced by the failing LBA; and
3) shall terminate the write command with CHECK CONDITION status with the sense key set to
ABORTED COMMAND, the additional sense code set to MULTIPLE WRITE ERRORS, and:
A) report the following value in the INFORMATION field (see SPC-4):
a) the LBA referencing the first logical block (i.e., the lowest numbered LBA) in error;
and
B) report the following value in the COMMAND-SPECIFIC INFORMATION field (see SPC-4):
a) the LBA referencing the last logical block (i.e., the highest numbered LBA) in error in a
sequence of contiguous logical blocks that started with the LBA indicated in the INFORMATION
field.
If the application client receives sense data with the sense key set to ABORTED COMMAND, the additional
sense code set to MULTIPLE WRITE ERRORS, and the INFORMATION field indicating a valid LBA (see
SPC-4), then the application client should issue the next write command with the starting LBA set to the
contents of the COMMAND-SPECIFIC INFORMATION field plus one to continue writing to the logical unit.
4.20.4 Disabling the rebuild assist mode

Rebuild assist mode shall be disabled after a power on.


Rebuild assist mode shall not be affected by a hard reset, an I_T nexus loss, or any task management
functions (see SAM-5).

62

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The application client disables rebuild assist mode by setting the ENABLED bit to zero in the Rebuild Assist
Output diagnostic page (see 6.3.3).
4.20.5 Testing rebuild assist mode

The Rebuild Assist Output diagnostic page (see 6.3.3) provides a method to test the application clients
rebuild process.
An application client places a logical unit into a simulated failing condition by setting the ENABLED bit to one
and setting one or more bits in the DISABLED PHYSICAL ELEMENT field to one in the Rebuild Assist Output
diagnostic page.
Each bit in the DISABLED PHYSICAL ELEMENT field represents a physical element that is associated with a group
of LBAs that are treated as having predicted unrecovered read errors. The correlation of bits in the DISABLED
PHYSICAL ELEMENT field to LBAs in the logical unit is vendor specific.
An application client ends a test by disabling the rebuild assist mode (see 4.20.4).

4.21 START STOP UNIT and power conditions


4.21.1 START STOP UNIT and power conditions overview

The START STOP UNIT command (see 5.25) allows an application client to control the power condition of a
logical unit. This method includes specifying that the logical unit transition to a specific power condition.
In addition to the START STOP UNIT command, the power condition of a logical unit may be controlled by the
Power Condition mode page (see SPC-4). If both the START STOP UNIT command and the Power Condition
mode page methods are being used to control the power condition of the same logical unit, then the power
condition specified by any START STOP UNIT command shall override the Power Condition mode page's
power control.
4.21.2 Processing of concurrent START STOP UNIT commands

If a START STOP UNIT command is being processed by the device server, and a subsequent START STOP
UNIT command for which the CDB is validated requests that the logical unit change to a different power
condition than was specified by the START STOP UNIT command being processed, then the device server
shall terminate the subsequent START STOP UNIT command with CHECK CONDITION status with the
sense key set to NOT READY and the additional sense code set to LOGICAL UNIT NOT READY, START
STOP UNIT COMMAND IN PROGRESS.
The constraints on concurrent START STOP UNIT commands apply only to commands that have the IMMED
bit set to zero. The effects of concurrent power condition changes requested by START STOP UNIT
commands with the IMMED bit set to one are vendor specific.
4.21.3 Managing logical block access commands during a change to the active power condition

Application clients may minimize the return of BUSY status or TASK SET FULL status during a change to the
active power condition by:
a) polling the power condition using the REQUEST SENSE command (see SPC-4); or
b) sending a START STOP UNIT command with the IMMED bit set to zero and the START bit set to one
and waiting for GOOD status to be returned.
4.21.4 Stopped power condition

In addition to the active power condition, idle power conditions, and standby power conditions described in
SPC-4, this standard describes the stopped power condition.

Working Draft SCSI Block Commands 4 (SBC-4)

63

T10/BSR INCITS 506 Revision 3

27 August 2014

While in the stopped power condition:


a) the device server shall terminate TEST UNIT READY commands and logical block access commands
with CHECK CONDITION status with the sense key set to NOT READY and the additional sense
code set to LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED;
b) the power consumed by the SCSI target device while in the stopped power condition should be less
than the power consumed when the logical unit is in the active power condition or any of the idle
power conditions (e.g., for direct access block devices that have a rotating medium, the medium is
stopped in the stopped power condition);
c) the peak power consumption during a change from the stopped power condition to the active power
condition or an idle power condition is not limited by this standard; and
d) the peak power consumption during a change from the stopped power condition to a standby power
condition shall be no more than the typical peak power consumption in the active power condition.
No power condition defined in this standard shall affect the supply of any power required for proper operation
of a service delivery subsystem.
4.21.5 START STOP UNIT and power condition state machine
4.21.5.1 START STOP UNIT and power condition state machine overview

The SSU_PC (START STOP UNIT and power condition) state machine for logical units implementing the
START STOP UNIT command describes the:
a) logical unit power states and transitions resulting from specifications in the START STOP UNIT
command;
b) settings in the Power Condition mode page (see SPC-4); and
c) the processing of commands.
NOTE 4 - The SSU_PC state machine is an enhanced version of the PC (power condition) state machine
described in SPC-4.

The SSU_PC state machine consists of the states shown in table 20.

Table 20 Summary of states in the SSU_PC state machine


State

PC state machine state with additional


definition (see SPC-4)

SSU_PC0:Powered_On a

4.21.5.2

PC0:Powered_On

SSU_PC1:Active

4.21.5.3

PC1:Active

SSU_PC2:Idle

4.21.5.4

PC2:Idle

SSU_PC3:Standby

4.21.5.5

PC3:Standby

SSU_PC4:Active_Wait

4.21.5.6

PC4:Active_Wait

SSU_PC5:Wait_Idle

4.21.5.7

PC5:Wait_Idle

SSU_PC6:Wait_Standby

4.21.5.8

PC6:Wait_Standby

SSU_PC7:Idle_Wait

4.21.5.9

n/a

SSU_PC8:Stopped

4.21.5.10

n/a

SSU_PC9:Standby_Wait

4.21.5.11

n/a

SSU_PC10:Wait_Stopped

4.21.5.12

n/a

64

Reference

SSU_PC0:Powered_On is the initial state.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

While in the following SSU_PC states, the logical unit may be increasing power usage to enter a higher power
condition:
a) SSU_PC4:Active_Wait;
b) SSU_PC7:Idle_Wait; and
c) SSU_PC9:Standby_Wait.
While in the following SSU_PC states, the logical unit may be decreasing power usage to enter a lower power
condition:
a) SSU_PC5:Wait_Idle;
b) SSU_PC6:Wait_Standby; and
c) SSU_PC10:Wait_Stopped.
Any command causing a state machine transition (e.g., a START STOP UNIT command with the IMMED bit set
to zero) shall not complete with GOOD status until this state machine reaches the state (i.e., power condition)
required or specified by the command.
The SSU_PC state machine shall start in the SSU_PC0:Powered_On state after power on. The SSU_PC
state machine shall be configured to transition to the SSU_PC4:Active_Wait state or the SSU_PC8:Stopped
state after power on by a mechanism outside the scope of this standard.
This state machine references timers controlled by the Power Condition mode page (see SPC-4) and refers to
the START STOP UNIT command (see 5.25).

Working Draft SCSI Block Commands 4 (SBC-4)

65

T10/BSR INCITS 506 Revision 3

27 August 2014

Figure 12 describes the SSU_PC state machine.


SSU_PC0:
Powered_On

SSU_PC4:
Active_Wait

SSU_PC8:
Stopped b

SSU_PC9:
Standby_Wait b

SSU_PC3:
Standby a

SSU_PC1:
Active a

SSU_PC10:
Wait_Stopped b

SSU_PC7:
Wait_Standby

SSU_PC6:
Wait_Idle a

SSU_PC2:
Idle a

SSU_PC5:
Idle_Wait b

Notes:
a
This state or transition is also described in SPC-4, but may have additional characteristics
unique to this standard (e.g., a transition to or from a state described in this standard).
b
This state or transition is described in this standard.

Figure 12 SSU_PC state machine

66

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.21.5.2 SSU_PC0:Powered_On state


4.21.5.2.1 SSU_PC0:Powered_On state description

See the PC0:Powered_On state in SPC-4 for details about this state.
4.21.5.2.2 Transition SSU_PC0:Powered_On to SSU_PC4:Active_Wait

This transition shall occur if:


a) the logical unit is ready to begin power on initialization; and
b) the logical unit has been configured to transition to the SSU_PC4:Active_Wait state.
The transition shall include a Transitioning From Powered On argument.
4.21.5.2.3 Transition SSU_PC0:Powered_On to SSU_PC8:Stopped

This transition shall occur if:


a) the logical unit has been configured to transition to the SSU_PC8:Stopped state.
The transition shall include a Transitioning From Powered On argument.
4.21.5.3 SSU_PC1:Active state
4.21.5.3.1 SSU_PC1:Active state description

See the PC1:Active state in SPC-4 for details about this state.
4.21.5.3.2 Transition SSU_PC1:Active to SSU_PC5:Wait_Idle

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 2h (i.e., IDLE); or
b) an idle condition timer (see SPC-4) is enabled, and that timer has expired.
The transition shall include a:
a) Transitioning To Idle_a argument, if:
A) the highest priority timer that expired is the idle_a condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 0h (i.e., idle_a power condition);
b) Transitioning To Idle_b argument, if:
A) the highest priority timer that expired is the idle_b condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 1h (i.e., idle_b power condition);
or
c) Transitioning To Idle_c argument, if:
A) the highest priority timer that expired is the idle_c condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 2h (i.e., idle_c power condition).
4.21.5.3.3 Transition SSU_PC1:Active to SSU_PC6:Wait_Standby

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 3h (i.e., STANDBY); or
b) a standby condition timer (see SPC-4) is enabled and that timer has expired.
Working Draft SCSI Block Commands 4 (SBC-4)

67

T10/BSR INCITS 506 Revision 3

27 August 2014

The transition shall include a:


a) Transitioning To Standby_z argument, if:
A) the highest priority timer that expired is the standby_z condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 0h (i.e., standby_z power condition);
or
b) Transitioning To Standby_y argument, if:
A) the highest priority timer that expired is the standby_y condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 1h (i.e., standby_y power condition).
4.21.5.3.4 Transition SSU_PC1:Active to SSU_PC10:Wait_Stopped

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the START bit set to zero
and the POWER CONDITION field set to 0h (i.e., START_VALID).
4.21.5.4 SSU_PC2:Idle state
4.21.5.4.1 SSU_PC2:Idle state description

See the PC2:Idle state in SPC-4 for details about this state.
4.21.5.4.2 Transition SSU_PC2:Idle to SSU_PC4:Active_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the START bit set to one
and the POWER CONDITION field set to 0h (i.e., START_VALID);
b) the device server processes a START STOP UNIT command with the POWER CONDITION field set to 1h
(i.e., ACTIVE); or
c) the device server processes a command that requires the logical unit to be in the SSU_PC1:Active
state to continue processing that command.
The transition shall include a:
a) Transitioning From Idle argument; and
b) Transitioning From Idle_c argument if the current power condition is the idle_c power condition.
4.21.5.4.3 Transition SSU_PC2:Idle to SSU_PC5:Wait_Idle

This transition shall occur if:


a) the following occur:
A) an idle condition timer is enabled and that idle condition timer has expired; and
B) the priority of that idle condition timer is greater than the priority of the idle condition timer
associated with the current idle power condition (see SPC-4);
or
b) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 2h (i.e., IDLE) and the POWER CONDITION MODIFIER field set to a value that specifies that the
logical unit transition to a lower idle power condition.
The transition shall include a:
a) Transitioning To Idle_b argument, if:
A) the highest priority timer that expired is the idle_b condition timer; or

68

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 1h (i.e., idle_b power condition);
or
b) Transitioning To Idle_c argument, if:
A) the highest priority timer that expired is the idle_c condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 2h (i.e., idle_c power condition).
4.21.5.4.4 Transition SSU_PC2:Idle to SSU_PC6:Wait_Standby

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 3h (i.e., STANDBY); or
b) a standby condition timer is enabled and that timer has expired.
The transition shall include a:
a) Transitioning To Standby_z argument, if:
A) the highest priority timer that expired is the standby_z condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 0h (i.e., standby_z power condition);
or
b) Transitioning To Standby_y argument, if:
A) the highest priority timer that expired is the standby_y condition timer; or
B) the START STOP UNIT command being processed has the POWER CONDITION MODIFIER field set
to 1h (i.e., standby_y power condition).
4.21.5.4.5 Transition SSU_PC2:Idle to SSU_PC7:Idle_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 2h (i.e., IDLE) and the POWER CONDITION MODIFIER field set to a value that specifies that the
logical unit transition to a higher idle power condition.
The transition shall include Transitioning From Idle argument and a:
a) Transitioning To Idle_a argument, if the START STOP UNIT command being processed has the
POWER CONDITION MODIFIER field set to 0h (i.e., idle_a power condition); or
b) Transitioning To Idle_b argument, if the START STOP UNIT command being processed has the
POWER CONDITION MODIFIER field set to 1h (i.e., idle_b power condition).
4.21.5.4.6 Transition SSU_PC2:Idle to SSU_PC10:Wait_Stopped

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the START bit set to zero
and the POWER CONDITION field set to 0h (i.e., START_VALID).
4.21.5.5 SSU_PC3:Standby state
4.21.5.5.1 SSU_PC3:Standby state description

See the PC3:Standby state in SPC-4 for details about this state.

Working Draft SCSI Block Commands 4 (SBC-4)

69

T10/BSR INCITS 506 Revision 3

27 August 2014

4.21.5.5.2 Transition SSU_PC3:Standby to SSU_PC4:Active_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the START bit set to one
and the POWER CONDITION field set to 0h (i.e., START_VALID);
b) the device server processes a START STOP UNIT command with the POWER CONDITION field set to 1h
(i.e., ACTIVE); or
c) the device server processes a command that requires the logical unit to be in the SSU_PC1:Active
state to continue processing that command.
The transition shall include a Transitioning From Standby argument.
4.21.5.5.3 Transition SSU_PC3:Standby to SSU_PC6:Wait_Standby

This transition shall occur if:


a) the following occur:
A) the standby_z condition timer is enabled and that timer expires; and
B) the priority of that standby condition timer is greater than the priority of the standby condition timer
associated with the current standby power condition (see SPC-4);
or
b) the device server processes a START STOP UNIT command with the POWER CONDITION field set to 3h
(i.e., STANDBY) and the POWER CONDITION MODIFIER field set to a value that specifies that the logical
unit transition to a lower standby power condition.
The transition shall include Transitioning To Standby_z argument.
4.21.5.5.4 Transition SSU_PC3:Standby to SSU_PC7:Idle_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 2h (i.e., IDLE); or
b) the device server processes a command and determines that the device server is capable of
continuing the processing of that command, when the logical unit is in the SSU_PC2:Idle state.
The transition shall include a Transitioning From Standby argument and a:
a) Transitioning To Idle_a argument, if:
A) the device server processes a command and determines that the device server is capable of
continuing the processing of that command, when the logical unit is in the idle_a power condition;
or
B) the device server processes a START STOP UNIT command with the POWER CONDITION MODIFIER
field set to 0h (i.e., idle_a power condition);
b) Transitioning To Idle_b argument, if:
A) the device server processes a command and determines that the device server is capable of
continuing the processing of that command, when the logical unit is in the idle_b power condition;
or
B) the device server processes a START STOP UNIT command with the POWER CONDITION MODIFIER
field set to 1h (i.e., idle_b power condition);
or
c) Transitioning To_Idle_c argument, if:
A) the device server processes a command and determines that the device server is capable of
continuing the processing of that command, when the logical unit is in the idle_c power condition;
or
B) the device server processes a START STOP UNIT command with the POWER CONDITION MODIFIER
field set to 2h (i.e., idle_c power condition).

70

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.21.5.5.5 Transition SSU_PC3:Standby to SSU_PC9:Standby_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 3h (i.e., STANDBY) and the POWER CONDITION MODIFIER field set to a value that specifies
that the logical unit transition to a higher standby power condition.
The transition shall include a Transitioning To Standby_y argument.
4.21.5.5.6 Transition SSU_PC3:Standby to SSU_PC10:Wait_Stopped

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the START bit set to zero
and the POWER CONDITION field set to 0h (i.e., START_VALID).
4.21.5.6 SSU_PC4:Active_Wait state
4.21.5.6.1 SSU_PC4:Active_Wait state description

While in this state:


a) each idle condition timer that is enabled and not expired is running;
b) each standby condition timer that is enabled and not expired is running;
c) the device server shall provide power management pollable sense data (see SPC-4) with the sense
key set to NO SENSE and the additional sense code set to LOGICAL UNIT TRANSITIONING TO
ANOTHER POWER CONDITION; and
d) the logical unit is performing the operations required for it to be in the SSU_PC1:Active state (e.g., a
disk drive spins up its medium).
If this state was entered with a Transitioning From Idle argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero (see 5.25), that the device server is able to
process and complete while in the SSU_PC2:Idle state;
b) the peak power consumed in this state shall be no more than the typical peak power consumed in the
SSU_PC1:Active state; and
c) if:
A) this state was entered with a Transitioning From Idle_c argument; and
B) the CCF IDLE field in the Power Condition mode page (see SPC-4) is set to 10b (i.e., enabled),
then the device server shall terminate any command, except a START STOP UNIT command, that
requires the logical unit be in the SSU_PC1:Active state to continue processing, with CHECK
CONDITION status, with the sense key set to NOT READY and the additional sense code set to
LOGICAL UNIT IS IN PROCESS OF BECOMING READY.
If this state was entered with a Transitioning From Standby argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero, that the device server is able to process and
complete while in the SSU_PC3:Standby state;
b) the peak power consumption in this state is not limited by this standard; and
c) if the CCF STANDBY field in the Power Condition mode page (see SPC-4) is set to 10b (i.e., enabled),
then the device server shall terminate any command, except a START STOP UNIT command, that
requires the logical unit be in the SSU_PC1:Active state or SSU_PC2:Idle state to continue
processing, with CHECK CONDITION status, with the sense key set to NOT READY and the
additional sense code set to LOGICAL UNIT IS IN PROCESS OF BECOMING READY.

Working Draft SCSI Block Commands 4 (SBC-4)

71

T10/BSR INCITS 506 Revision 3

27 August 2014

If this state was entered with a Transitioning From Stopped argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero, that the device server is able to process and
complete while in the SSU_PC8:Stopped state;
b) the peak power consumption in this state is not limited by this standard; and
c) if the CCF STOPPED field in the Power Condition mode page (see SPC-4) is set to 10b (i.e., enabled),
then the device server shall terminate any TEST UNIT READY command or medium access
command, with CHECK CONDITION status, with the sense key set to NOT READY and the
additional sense code set to LOGICAL UNIT IS IN PROCESS OF BECOMING READY.
If this state was entered with a Transitioning From Powered On argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero or TEST UNIT READY command, that the
device server is able to process and complete while in the SSU_PC8:Stopped state;
b) the peak power consumption in this state is not limited by this standard; and
c) the device server shall terminate any TEST UNIT READY command or medium access command
with CHECK CONDITION status with the sense key set to NOT READY and the additional sense
code set to LOGICAL UNIT IS IN PROCESS OF BECOMING READY.
If an idle condition timer or a standby condition timer is enabled and expires, then that timer is ignored in this
state.
4.21.5.6.2 Transition SSU_PC4:Active_Wait to SSU_PC1:Active

See the PC4:Active_Wait to PC1:Active transition in SPC-4 for details about this transition.
4.21.5.7 SSU_PC5:Wait_Idle state
4.21.5.7.1 SSU_PC5:Wait_Idle state description

See the PC5:Wait_Idle state in SPC-4 for details about this state.
4.21.5.7.2 Transition SSU_PC5:Wait_Idle to SSU_PC2:Idle

See the PC5:Wait_Idle to PC2:Idle transition in SPC-4 for details about this transition.
4.21.5.8 SSU_PC6:Wait_Standby state
4.21.5.8.1 SSU_PC6:Wait_Standby state description

See the PC6:Wait_Standby state in SPC-4 for details about this state.
4.21.5.8.2 Transition SSU_PC6:Wait_Standby to SSU_PC3:Standby

See the PC6:Wait_Standby to PC3:Standby transition in SPC-4 for details about this transition.
4.21.5.9 SSU_PC7:Idle_Wait state
4.21.5.9.1 SSU_PC7:Idle_Wait state description

While in this state:


a) each idle condition timer that is enabled and not expired is running;
b) each standby condition timer that is enabled and not expired is running;
c) the device server shall provide power management pollable sense data (see SPC-4) with the sense
key set to NO SENSE and the additional sense code set to LOGICAL UNIT TRANSITIONING TO
ANOTHER POWER CONDITION; and

72

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

d) the logical unit is performing the operations required for it to be in the SSU_PC2:Idle state (e.g., a disk
drive spins up its medium).
If this state was entered with a Transitioning From Idle argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero (see 5.25), that the device server is able to
process and complete while in the SSU_PC2:Idle state; and
b) the peak power consumed in this state shall be no more than the typical peak power consumed in the
SSU_PC1:Active state.
If this state was entered with a Transitioning From Standby argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero, that the device server is able to process and
complete while in the SSU_PC3:Standby state;
b) the peak power consumption in this state is not limited by this standard; and
c) the CCF STANDBY field in the Power Condition mode page (see SPC-4) is set to 10b (i.e., enabled),
then the device server shall terminate any command, except a START STOP UNIT command, that
requires the logical unit be in the SSU_PC1:Active state or SSU_PC2:Idle state to continue
processing, with CHECK CONDITION status, with the sense key set to NOT READY and the
additional sense code set to LOGICAL UNIT IS IN PROCESS OF BECOMING READY.
If this state was entered with a Transitioning From Stopped argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero, that the device server is able to process and
complete while in the SSU_PC8:Stopped state;
b) the peak power consumption in this state is not limited by this standard; and
c) if the CCF STOPPED field in the Power Condition mode page (see SPC-4) is set to 10b (i.e., enabled),
then the device server shall terminate any TEST UNIT READY command or medium access
command, with CHECK CONDITION status, with the sense key set to NOT READY and the
additional sense code set to LOGICAL UNIT IS IN PROCESS OF BECOMING READY.
If an idle condition timer or a standby condition timer is enabled and expires, then that timer is ignored in this
state.
4.21.5.9.2 Transition SSU_PC7:Idle_Wait to SSU_PC2:Idle

This transition shall occur when the logical unit meets the requirements for being in the:
a) idle_a power condition, if this state was entered with a Transitioning To Idle_a argument;
b) idle_b power condition, if this state was entered with a Transitioning To Idle_b argument; or
c) idle_c power condition, if this state was entered with a Transitioning To Idle_c argument.
4.21.5.10 SSU_PC8:Stopped state
4.21.5.10.1 SSU_PC8:Stopped state description

While in this state:


a)
b)
c)
d)

the logical unit is in the stopped power condition (see 4.21.4);


the idle condition timers and the standby condition timers are disabled;
the device server shall provide power management pollable sense data (see SPC-4); and
the device server shall terminate each medium access command or TEST UNIT READY command
(see SPC-4) as described in 4.21.4.

Working Draft SCSI Block Commands 4 (SBC-4)

73

T10/BSR INCITS 506 Revision 3

27 August 2014

4.21.5.10.2 Transition SSU_PC8:Stopped to SSU_PC4:Active_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the START bit set to one
and the POWER CONDITION field set to 0h (i.e., START_VALID); or
b) the device server processes a START STOP UNIT command with the POWER CONDITION field set to 1h
(i.e., ACTIVE).
The transition shall include a Transitioning From Stopped argument.
4.21.5.10.3 Transition SSU_PC8:Stopped to SSU_PC7:Idle_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to 2h (i.e., IDLE).
The transition shall include a Transitioning From Stopped argument and a:
a) Transitioning To Idle_a argument, if the START STOP UNIT command being processed has the
POWER CONDITION MODIFIER field set to 0h (i.e., idle_a power condition);
b) Transitioning To Idle_b argument, if the START STOP UNIT command being processed has the
POWER CONDITION MODIFIER field set to 1h (i.e., idle_b power condition); or
c) Transitioning To Idle_c argument, if the START STOP UNIT command being processed has the
POWER CONDITION MODIFIER field set to 2h (i.e., idle_c power condition).
4.21.5.10.4 Transition SSU_PC8:Stopped to SSU_PC9:Standby_Wait

This transition shall occur if:


a) the device server processes a START STOP UNIT command (see 5.25) with the POWER CONDITION
field set to STANDBY.
The transition shall include a Transitioning From Stopped argument and a:
a) Transitioning To Standby_z argument, if the START STOP UNIT command being processed has the
POWER CONDITION MODIFIER field set to 0h (i.e., standby_z power condition); or
b) Transitioning To Standby_y argument, if the START STOP UNIT command being processed has the
POWER CONDITION MODIFIER field set to 1h (i.e., standby_y power condition).
4.21.5.11 SSU_PC9:Standby_Wait state
4.21.5.11.1 SSU_PC9:Standby_Wait state description

While in this state:


a) the device server shall provide power management pollable sense data (see SPC-4) with the sense
key set to NO SENSE and the additional sense code set to LOGICAL UNIT TRANSITIONING TO
ANOTHER POWER CONDITION;
b) the peak power consumed in this state shall be no more than the typical peak power consumed in the
SSU_PC1:Active state; and
c) the logical unit is performing the operations required for it to be in the SSU_PC3:Standby state ((e.g.,
a direct access block device is activating circuitry).
If this state was entered with a Transitioning From Standby argument, then the device server is capable of
processing and completing the same commands, except START STOP UNIT commands with the IMMED bit
set to zero (see 5.25), that the device server is able to process and complete in the SSU_PC3:Standby state.

74

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If this state was entered with a Transitioning From Stopped argument, then:
a) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero, that the device server is able to process and
complete while in the SSU_PC8:Stopped state; and
b) if the CCF STOPPED field in the Power Condition mode page (see SPC-4) is set to 10b (i.e., enabled),
then the device server shall terminate any TEST UNIT READY command or medium access
command, with CHECK CONDITION status, with the sense key set to NOT READY and the
additional sense code set to LOGICAL UNIT IS IN PROCESS OF BECOMING READY.
4.21.5.11.2 Transition SSU_PC9:Standby_Wait to SSU_PC3:Standby

This transition shall occur when the logical unit meets the requirements for being in the:
a) standby_y power condition, if this state was entered with a Transitioning To Standby_y argument; or
b) standby_z power condition, if this state was entered with a Transitioning To Standby_z argument.
4.21.5.12 SSU_PC10:Wait_Stopped state
4.21.5.12.1 SSU_PC10:Wait_Stopped state description

While in this state:


a) the device server shall provide power management pollable sense data (see SPC-4) with the sense
key set to NO SENSE and the additional sense code set to LOGICAL UNIT TRANSITIONING TO
ANOTHER POWER CONDITION;
b) the device server is capable of processing and completing the same commands, except START
STOP UNIT commands with the IMMED bit set to zero (see 5.25), that the device server is able to
process and complete in the SSU_PC8:Stopped state;
c) the logical unit is performing the operations required for it to be in the SSU_PC8:Stopped state (e.g., a
disk drive spins down its medium); and
d) the device server shall terminate any TEST UNIT READY command or medium access command
with CHECK CONDITION status with the sense key set to NOT READY and the additional sense
code set to LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED.
4.21.5.12.2 Transition SSU_PC10:Wait_Stopped to SSU_PC8:Stopped

This transition shall occur when:


a) the logical unit meets the requirements for being in the SSU_PC8:Stopped state.

4.22 Protection information model


4.22.1 Protection information overview

The protection information model provides for protection of user data while user data is being transferred
between a sender and a receiver. Protection information is generated at the application layer and may be
checked by any object associated with the I_T_L nexus (see SAM-5). Once received, protection information is
retained (e.g., written to the medium, stored in non-volatile memory, or recalculated on read back) by the
device server until overwritten. Power loss, hard reset, logical unit reset, and I_T nexus loss shall have no
effect on the retention of protection information.
Support for protection information shall be indicated in the PROTECT bit in the standard INQUIRY data (see
SPC-4).
If the logical unit is formatted with protection information, and the EMDP bit is set to one in the
Disconnect-Reconnect mode page (see SPC-4), then checking of the logical block reference tag within a

Working Draft SCSI Block Commands 4 (SBC-4)

75

T10/BSR INCITS 506 Revision 3

27 August 2014

service delivery subsystem without accounting for modified data pointers and data alignments may cause
false errors when logical blocks are transmitted out of order.
Protection information is also referred to as the data integrity field (DIF).
4.22.2 Protection types
4.22.2.1 Protection types overview

The content of protection information is dependent on the type of protection to which a logical unit has been
formatted.
The type of protection supported by the logical unit shall be indicated in the SPT field in the Extended INQUIRY
Data VPD page (see SPC-4). The current protection type shall be indicated in the P_TYPE field in the READ
CAPACITY (16) parameter data (see 5.16.2).
An application client may format the logical unit to a specific type of protection using the FMTPINFO field and the
PROTECTION FIELD USAGE field in the FORMAT UNIT command (see 5.3).
An application client may format the logical unit to place protection information at intervals other than on
logical block boundaries using the PROTECTION INTERVAL EXPONENT field in the FORMAT UNIT command.
A medium access command is processed in a different manner by a device server depending on the type of
protection in effect. When used in relation to types of protection, the term medium access command is
defined as any one of the following commands:
a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
k)
l)
m)
n)
o)
p)
q)
r)
s)
t)
u)
v)
w)
x)
y)
z)

COMPARE AND WRITE;


ORWRITE (16);
ORWRITE (32);
READ (10);
READ (12);
READ (16);
READ (32);
VERIFY (10);
VERIFY (12);
VERIFY (16);
VERIFY (32);
WRITE (10);
WRITE (12);
WRITE (16);
WRITE (32);
WRITE AND VERIFY (10);
WRITE AND VERIFY (12);
WRITE AND VERIFY (16);
WRITE AND VERIFY (32);
WRITE ATOMIC (16);
WRITE ATOMIC (32);
WRITE SAME (10);
WRITE SAME (16);
WRITE SAME (32);
XDWRITEREAD (10); and
XDWRITEREAD (32).

4.22.2.2 Type 0 protection

Type 0 protection defines no protection over that which is defined within the transport protocol.
A logical unit that has been formatted with protection information disabled (see 5.2) or a logical unit that does
not support protection information (i.e., the PROTECT bit set to zero in the standard INQUIRY data (see
SPC-4)) has type 0 protection.

76

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If type 0 protection is enabled and the RDPROTECT field, the WRPROTECT field, the VRPROTECT field, or the
ORPROTECT field is set to a non-zero value, then medium access commands are invalid and may be
terminated by the device server with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If type 0 protection is enabled, then the following medium access commands are invalid and shall be
terminated by the device server with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID COMMAND OPERATION CODE:
a)
b)
c)
d)
e)
f)

READ (32);
VERIFY (32);
WRITE (32);
WRITE AND VERIFY (32);
WRITE ATOMIC (32); and
WRITE SAME (32).

4.22.2.3 Type 1 protection

Type 1 protection:
a) defines the content of each LOGICAL BLOCK GUARD field;
b) does not define the content of any LOGICAL BLOCK APPLICATION TAG field; and
c) defines the content of each LOGICAL BLOCK REFERENCE TAG field.
If type 1 protection is enabled, then the following medium access commands are invalid and shall be
terminated by the device server with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID COMMAND OPERATION CODE:
a)
b)
c)
d)
e)
f)

READ (32);
VERIFY (32);
WRITE (32);
WRITE AND VERIFY (32);
WRITE ATOMIC (32); and
WRITE SAME (32).

For valid medium access commands in which the RDPROTECT field, the WRPROTECT field, the VRPROTECT field,
or the ORPROTECT field is set to:
a) zero, the Data-In Buffer and/or Data-Out Buffer associated with those commands shall consist of
logical block data containing only user data; or
b) a non-zero value, the Data-In Buffer and/or Data-Out Buffer shall consist of logical block data
containing both user data and protection information.
4.22.2.4 Type 2 protection

Type 2 protection:
a) defines the content of each LOGICAL BLOCK GUARD field;
b) does not define the content of any LOGICAL BLOCK APPLICATION TAG field; and
c) defines, except for the first logical block addressed by the command, the content of each LOGICAL
BLOCK REFERENCE TAG field.
If type 2 protection is enabled and the RDPROTECT field, the WRPROTECT field, the VRPROTECT field, or the
ORPROTECT field is set to a non-zero value, then the following medium access commands are invalid and shall
be terminated by the device server with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID COMMAND OPERATION CODE:
a)
b)
c)
d)
e)

COMPARE AND WRITE;


ORWRITE (16);
ORWRITE (32);
READ (10);
READ (12);

Working Draft SCSI Block Commands 4 (SBC-4)

77

T10/BSR INCITS 506 Revision 3

f)
g)
h)
i)
j)
k)
l)
m)
n)
o)
p)
q)
r)
s)
t)

27 August 2014

READ (16);
VERIFY (10);
VERIFY (12);
VERIFY (16);
WRITE (10);
WRITE (12);
WRITE (16);
WRITE AND VERIFY (10);
WRITE AND VERIFY (12);
WRITE AND VERIFY (16);
WRITE ATOMIC (16);
WRITE SAME (10);
WRITE SAME (16);
XDWRITEREAD (10); and
XDWRITEREAD (32).

For valid medium access commands in which the RDPROTECT field, the WRPROTECT field, the VRPROTECT field,
or the ORPROTECT field is set to:
a) zero, the Data-In Buffer and/or Data-Out Buffer associated with those commands shall consist of
logical block data containing only user data; or
b) a non-zero value, the Data-In Buffer and/or Data-Out Buffer shall consist of logical block data
containing both user data and protection information.
4.22.2.5 Type 3 protection

Type 3 protection:
a) defines the content of each LOGICAL BLOCK GUARD field;
b) does not define the content of any LOGICAL BLOCK APPLICATION TAG field; and
c) does not define the content of any LOGICAL BLOCK REFERENCE TAG field.
If type 3 protection is enabled, then the following medium access commands are invalid and shall be
terminated by the device server with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID COMMAND OPERATION CODE:
a)
b)
c)
d)
e)
f)

READ (32);
VERIFY (32);
WRITE (32);
WRITE AND VERIFY (32);
WRITE ATOMIC (32); and
WRITE SAME (32).

For valid medium access commands in which the RDPROTECT field, the WRPROTECT field, the VRPROTECT field,
or the ORPROTECT field is set to:
a) zero, the Data-In Buffer and/or Data-Out Buffer associated with those commands shall consist of
logical block data containing only user data; or
b) a non-zero value, the Data-In Buffer and/or Data-Out Buffer shall consist of logical block data
containing both user data and protection information.

78

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.22.3 Protection information format

Table 21 defines the placement of protection information in a logical block with a single protection information
interval (i.e., the PROTECTION INTERVAL EXPONENT field is set to zero in the parameter list header for a FORMAT
UNIT command (see 5.3.2.2))
.
Table 21 Logical block data format with a single protection information interval
Bit
Byte

n-1
n

(MSB)
(MSB)

n+3
n+4

n+7

USER DATA

n+1
n+2

LOGICAL BLOCK GUARD

LOGICAL BLOCK APPLICATION TAG

(LSB)
(LSB)

(MSB)
LOGICAL BLOCK REFERENCE TAG

Working Draft SCSI Block Commands 4 (SBC-4)

(LSB)

79

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 22 shows an example of the placement of protection information in a logical block with more than one
protection information interval (i.e., the PROTECTION INTERVAL EXPONENT field is set to a non-zero value in the
parameter list header for a FORMAT UNIT command (see 5.3.2.2)).

Table 22 An example of the logical block data for a logical block with more than one protection
information interval
Bit
Byte

n-1
n

(MSB)
(MSB)

n+3
n+4

n+7

[first]

(LSB)

[first]

LOGICAL BLOCK REFERENCE TAG

[first]

(LSB)

(MSB)
(LSB)
USER DATA

(MSB)
(MSB)

m+3
m+4

m+7

[first]

LOGICAL BLOCK APPLICATION TAG

[second]

LOGICAL BLOCK GUARD

m+1
m+2

LOGICAL BLOCK GUARD

n+8

m-1
m

USER DATA

n+1
n+2

[second]

LOGICAL BLOCK APPLICATION TAG

[second]

LOGICAL BLOCK REFERENCE TAG

[second]

(LSB)
(LSB)

(MSB)
(LSB)

z-1
z

USER DATA

(MSB)

LOGICAL BLOCK GUARD

z+1
z+2

(MSB)

z+3
z+4

z+7

[last]

[last]

(LSB)

LOGICAL BLOCK APPLICATION TAG

[last]

LOGICAL BLOCK REFERENCE TAG

[last]

(LSB)

(MSB)
(LSB)

Each USER DATA field shall contain user data.

80

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Each LOGICAL BLOCK GUARD field contains a CRC (see 4.22.4). Only the contents of the USER DATA field
immediately preceding THE LOGICAL BLOCK GUARD field (i.e., the user data between the preceding logical block
reference tag, if any, and the current logical block guard) shall be used to generate and check the CRC
contained in the LOGICAL BLOCK GUARD field.
Each LOGICAL BLOCK APPLICATION TAG field is set by the application client. If the device server detects a:
a)
b)
c)

field set to FFFFh and type 1 protection (see 4.22.2.3) is enabled;


field set to FFFFh and type 2 protection (see 4.22.2.4) is enabled; or
field set to FFFFh, LOGICAL BLOCK REFERENCE TAG field set to
FFFF_FFFFh, and type 3 protection (see 4.22.2.5) is enabled,
LOGICAL BLOCK APPLICATION TAG
LOGICAL BLOCK APPLICATION TAG
LOGICAL BLOCK APPLICATION TAG

then the device server disables checking of all protection information for the associated protection information
interval when performing:
a) a read operation; and
b) a write operation if the NO_CHK_WR bit is set to one in the Extended INQUIRY Data VPD page (see
SPC-5).
Otherwise, if the ATMPE bit in the Control mode page (see SPC-4) is:
a) set to one, then the logical block application tags are defined by the Application Tag mode page
(see 6.5.3); or
b) set to zero, then the logical block application tags are not defined by this standard.
The LOGICAL BLOCK APPLICATION TAG field may be modified by a device server if the ATO bit is set to zero in the
Control mode page (see SPC-4). If the ATO bit is set to one in the Control mode page, then the device server
shall not modify the LOGICAL BLOCK APPLICATION TAG field.
The contents of a LOGICAL BLOCK APPLICATION TAG field shall not be used to generate or check the CRC
contained in the LOGICAL BLOCK GUARD field.
The first LOGICAL BLOCK REFERENCE TAG field of the first logical block in the Data-In Buffer and/or Data-Out
Buffer shall contain the value specified in table 23.

Table 23 Content of the first LOGICAL BLOCK REFERENCE TAG field for the first logical block in the
Data-In Buffer and/or Data-Out Buffer
Protection Type

Content of the first LOGICAL BLOCK REFERENCE TAG field for the first logical block
in the Data-In Buffer and/or Data-Out Buffer

Type 1 a
protection
(see 4.22.2.3)

The least significant four bytes of the LBA contained in the LOGICAL BLOCK ADDRESS
field of the CDB.

Type 2 protection
(see 4.22.2.4)

The value in the EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG field of the CDB.

Type 3 protection
(see 4.22.2.5)

Not defined in this standard. If the ATO bit is set to zero in the Control mode page (see
SPC-4), then this field may be modified by the device server. If the ATO bit is set to one
in the Control mode page, then the device server shall not modify this field.

The length of the protection information interval is equal to the logical block length (see 5.3.2).

Working Draft SCSI Block Commands 4 (SBC-4)

81

T10/BSR INCITS 506 Revision 3

27 August 2014

Subsequent LOGICAL BLOCK REFERENCE TAG fields for a logical block in the Data-In Buffer and/or Data-Out
Buffer shall be set as specified in table 24.

Table 24 Content of subsequent LOGICAL BLOCK REFERENCE TAG fields for a logical block in the
Data-In Buffer and/or Data-Out Buffer
Protection Type

The content of subsequent LOGICAL BLOCK REFERENCE TAG fields in the Data-In
Buffer and/or Data-Out Buffer

Type 1 protection
(see 4.22.2.3) and
Type 2 protection
(see 4.22.2.4)

The previous logical block reference tag plus one. If the contents of the previous
LOGICAL BLOCK REFERENCE TAG field is FFFF_FFFFh, then the contents of the
subsequent LOGICAL BLOCK REFERENCE TAG field is 0000_0000h.

Type 3 protection
(see 4.22.2.5)

Not defined in this standard. If the ATO bit is set to zero in the Control mode page (see
SPC-4), then this field may be modified by the device server. If the ATO bit is set to
one in the Control mode page, then the device server shall not modify this field.

The contents of a LOGICAL BLOCK REFERENCE TAG field shall not be used to generate or check the CRC
contained in the LOGICAL BLOCK GUARD field.

82

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.22.4 Logical block guard


4.22.4.1 Logical block guard overview

A LOGICAL BLOCK GUARD field shall contain a CRC that is generated from the contents of only the USER DATA
field immediately preceding the LOGICAL BLOCK GUARD field.
Table 25 defines the CRC polynomials used to generate the logical block guard from the contents of the USER
DATA field.

Table 25 CRC polynomials


Function

Definition

F(x)

A polynomial representing the transmitted USER DATA field, which is covered by the CRC. For
the purposes of the CRC, the coefficient of the highest order term shall be byte zero bit seven
of the USER DATA field and the coefficient of the lowest order term shall be bit zero of the last
byte of the USER DATA field.

F(x)

A polynomial representing the received USER DATA field.

G(x)

The generator polynomial:


G(x) = x16 + x15 + x11 + x9 + x8 + x7 + x5 + x4 + x2 + x + 1
(i.e., in finite field notation G(x) = 1_8BB7h)

R(x)

The remainder polynomial calculated during CRC generation by the transmitter, representing
the transmitted LOGICAL BLOCK GUARD field.

R(x)

A polynomial representing the received LOGICAL BLOCK GUARD field.

RB(x)

The remainder polynomial calculated during CRC checking by the receiver.


RB(x) = 0 indicates no error was detected.

RC(x)

The remainder polynomial calculated during CRC checking by the receiver.


RC(x) = 0 indicates no error was detected.

QA(x)

The quotient polynomial calculated during CRC generation by the transmitter. The value of
QA(x) is not used.

QB(x)

The quotient polynomial calculated during CRC checking by the receiver. The value of QB(x)
is not used.

QC(x)

The quotient polynomial calculated during CRC checking by the receiver. The value of QC(x)
is not used.

M(x)
M(x)

A polynomial representing the transmitted USER DATA field followed by the transmitted
field.

LOGICAL BLOCK GUARD

A polynomial representing the received USER DATA field followed by the received LOGICAL
BLOCK GUARD field.

4.22.4.2 CRC generation

The equations that are used to generate the CRC from F(x) are as follows. All arithmetic is modulo 2.
The transmitter shall calculate the CRC by appending 16 zeros to F(x) and dividing by G(x) to obtain the
remainder R(x):
16

x Fx
R x
------------------------------ = QA x + -----------Gx
Gx

R(x) is the CRC value, and is transmitted in the LOGICAL BLOCK GUARD field.

Working Draft SCSI Block Commands 4 (SBC-4)

83

T10/BSR INCITS 506 Revision 3

27 August 2014

M(x) is the polynomial representing the USER DATA field followed by the LOGICAL BLOCK GUARD field (i.e., F(x)
followed by R(x)):
M(x) = (x16 F(x)) + R(x)
4.22.4.3 CRC checking

M(x) (i.e., the polynomial representing the received USER DATA field followed by the received LOGICAL BLOCK
GUARD field) may differ from M(x) (i.e., the polynomial representing the transmitted USER DATA field followed by
the transmitted LOGICAL BLOCK GUARD field) if there are transmission errors.
The receiver may check M(x) validity by appending 16 zeros to F(x) and dividing by G(x) and comparing the
calculated remainder RB(x) to the received CRC value R(x):
16

x Fx
RB x
-------------------------------- = QB x + ---------------Gx
Gx

In the absence of errors in F(x) and R(x), the remainder RB(x) is equal to R(x).
The receiver may check M(x) validity by dividing M(x) by G(x) and comparing the calculated remainder RC(x)
to zero:
M' x
RC x
-------------- = QC x + ----------------G x
Gx
In the absence of errors in F(x) and R(x), the remainder RC(x) is equal to zero.
Both methods of checking M(x) validity are mathematically equivalent.
4.22.4.4 CRC test cases

Several CRC test cases are shown in table 26.

Table 26 CRC test cases


Pattern

CRC

32 bytes each set to 00h

0000h

32 bytes each set to FFh

A293h

32 bytes of an incrementing pattern from 00h to 1Fh

0224h

2 bytes each set to FFh followed by 30 bytes set to 00h

21B8h

32 bytes of a decrementing pattern from FFh to E0h

A0B7h

4.22.5 Application of protection information

Before an application client transmits or receives logical block data with protection information, the application
client:
1) determines if a logical unit supports protection information using the INQUIRY command (see the
PROTECT bit in the standard INQUIRY data in SPC-4);
2) if protection information is supported, then determines if the logical unit is formatted to accept
protection information using the READ CAPACITY (16) command (e.g., see the PROT_EN bit and the
P_TYPE field in the returned parameter data (see 5.16.2)); and
3) if the logical unit supports protection information and is not formatted to accept protection information,
then formats the logical unit (see 5.3) with protection information enabled.

84

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the logical unit supports protection information and is formatted to accept protection information, then the
application client may use read commands that support protection information and should use verify
commands and write commands that support protection information.
4.22.6 Protection information and commands

The enabling of protection information enables fields in medium access commands that instruct the device
server on the handling of protection information. The detailed definitions of each commands protection
information fields are in the individual command descriptions.
The commands that are affected while protection information is enabled are listed in table 33.
Commands that cause a device server to return the length in bytes of each logical block (e.g., the MODE
SENSE (10) command and the READ CAPACITY (16) command) shall cause the device server to return the
combined length of the USER DATA field(s) contained in the logical block, not including the length of any
protection information (i.e., the LOGICAL BLOCK GUARD field(s), the LOGICAL BLOCK APPLICATION TAG field(s), and
the LOGICAL BLOCK REFERENCE TAG field(s)) (e.g., if the user data plus the protection information is equal to 520
bytes and there is one protection information interval, then 512 is returned).

4.23 Grouping function


A grouping function is a function that collects information about attributes associated with commands (i.e.,
information about commands with the same group value are collected into the specified group). The definition
of the attributes and the groups is outside the scope of this standard. Groups are identified with the GROUP
NUMBER field in the CDBs of certain commands (e.g., the PRE-FETCH (10) command (see 5.8)).
Support for the grouping function is indicated in the GROUP_SUP bit in the Extended INQUIRY Data VPD page
(see SPC-4).
The collection of this information is outside the scope of this standard (e.g., the information may not be
transmitted using any SCSI protocols).
EXAMPLE - In a SCSI domain in which two applications are using a subsystem where one application streams data and
another accesses data randomly, if:
a)the streaming application groups all of its commands with one group number (e.g., x); and
b)the random application groups all of its commands with another group number (e.g., y),
then the applications use those group numbers (e.g., x and y) to collect separate performance metrics for each
application.
A management application then reads the performance metrics and determines if the performance of a specific
group is acceptable.

4.24 Background scan operations


4.24.1 Background scan overview

A background scan operation is either a background pre-scan operation (see 4.24.2) or a background
medium scan operation (see 4.24.3).
During a background scan operation, the device server performs read medium operations for the purpose of:
a) identifying logical blocks that are difficult to read (i.e., recoverable) or unreadable (i.e.,
unrecoverable);
b) logging problems encountered during the background scan operation; and
c) when allowed, taking a vendor specific action to repair recoverable logical blocks or perform
automatic read reallocation of recoverable logical blocks.

Working Draft SCSI Block Commands 4 (SBC-4)

85

T10/BSR INCITS 506 Revision 3

27 August 2014

During a background scan operation, if a read medium operation encounters a recovered error (i.e., a logical
block is readable but requires extra actions (e.g., retries or application of a correction algorithm) to be read),
then the device server may resolve the problem using vendor specific means. The value of the ARRE bit in the
Read-Write Error Recovery mode page (see 6.5.8) determines whether or not the device server performs
automatic read reassignment.
During a background scan operation, if a read medium operation encounters an unrecovered error (i.e., a
logical block is unreadable), then the device server may mark the logical block unrecoverable. The value of
the AWRE bit in the Read-Write Error Recovery mode page (see 6.5.8) determines whether or not the device
server performs automatic write reassignment. If the AWRE bit is set to one, then the device server performs
automatic write reassignment at the start of the next write medium operation accessing that logical block.
During a background scan operation, the device server:
a)
b)
c)
d)

may scan the logical blocks in any order (e.g., based on physical block layout);
should not retain any data from logical blocks in cache memory after the logical blocks are read;
shall ignore pseudo unrecovered errors with correction disabled (see 4.18.2); and
shall process pseudo unrecovered errors with correction enabled.

4.24.2 Background pre-scan operations


4.24.2.1 Enabling background pre-scan operations

A background pre-scan operation is enabled after:


1) the EN_PS bit in the Background Control mode page (see 6.5.4) is set to zero:
2) the EN_PS bit is set to one; and
3) the SCSI device is power cycled if;
A) the S_L_FULL bit in the Background Control mode page is:
a) set to zero; or
b) set to one and the Background Scan log parameters in the Background Scan Results log
page (see 6.4.2) are not all used;
and
B) the saved value of the EN_PS bit is set to one.
After a background pre-scan operation is enabled, the device server shall:
a) initialize the Background Pre-scan Time Limit timer to the time specified in the BACKGROUND PRE-SCAN
TIME LIMIT field in the Background Control mode page and start the timer;
b) initialize the Background Medium Scan Interval timer to the time specified in the BACKGROUND MEDIUM
SCAN INTERVAL TIME field in the Background Control mode page and start the timer; and
c) begin the background pre-scan operation (i.e., begin scanning the medium).
4.24.2.2 Suspending and resuming background pre-scan operations

A background pre-scan operation shall be suspended when any of the following occurs:
a) a command or task management function is processed that requires the background pre-scan
operation to be suspended;
b) a SCSI event (e.g., a hard reset) (see SAM-5) is processed that requires the background pre-scan
operation to be suspended;
c) a power condition timer expires (see the Power Condition mode page in SPC-4), and the
PM_BG_PRECEDENCE field in the Power Condition mode page is set to 10b; or
d) the S_L_FULL bit in the Background Control mode page (see 6.5.4) is set to one, and the Background
Scan log parameters in the Background Scan Results log page (see 6.4.2) are all used.

86

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If a command is received that requires a background pre-scan operation to be suspended, then the following
should occur within the time specified in the MAXIMUM TIME TO SUSPEND BACKGROUND SCAN field in the
Background Control mode page:
a) the logical unit suspends the background medium scan operation; and
b) the device server begins processing the command.
If a background pre-scan operation is suspended, then the device server shall not stop:
a) the Background Pre-scan Time Limit timer;
b) the Background Medium Scan Interval timer; and
c) any process that results in an event that causes a background function to occur (e.g., not stop any
timers or counters associated with background functions).
While a background pre-scan operation is suspended and not halted (see 4.24.3.2), the device server shall
convert each write operation accessing a logical block that has not been scanned during the background
pre-scan operation into a write medium operation followed by a verify medium operation in order to verify that
the logical block data just written was read back without error. If a write medium operation accesses a logical
block that has already been scanned during the background pre-scan operation, then the device server shall
not perform the additional verify medium operation.
A background pre-scan operation shall be resumed from where the operation was suspended when:
a)
b)
c)
d)
e)

there are no commands in any task set to be processed;


there are no task management functions to be processed;
there are no SCSI events to be processed;
no ACA condition exists;
the PM_BG_PRECEDENCE field in the Power Condition mode page is set to 10b (see SPC-4), but no
power condition timer defined in the Power Condition mode page has expired;
f) the S_L_FULL bit in the Background Control mode page is set to zero, or the Background Medium
Scan log parameters in the Background Scan Results log page are not all used;
g) the logical unit has been idle for the time specified in the MINIMUM IDLE TIME BEFORE BACKGROUND SCAN
field in the Background Control mode page; and
h) the background pre-scan operation has not been halted (see 4.24.3.2).
4.24.2.3 Halting background pre-scan operations

The device server shall halt a background pre-scan operation if any of the following occurs:
a)
b)
c)
d)
e)
f)
g)

the background pre-scan operation completes scanning all logical blocks on the medium;
an application client sets the EN_PS bit to zero in the Background Control mode page (see 6.5.4);
the Background Pre-scan Time Limit timer expires;
the device server detects a fatal error;
the device server detects a vendor specific pattern of errors;
the device server detects a medium formatted without a PLIST (see 4.13); or
the device server detects temperature out of range.

After a background pre-scan operation has been halted, the device server shall not enable a background
operation until the conditions in 4.24.2.1 are met.
4.24.3 Background medium scan
4.24.3.1 Enabling background medium scan operations

Background medium scan operations are enabled if:


a) a background pre-scan operation (see 4.24.2) is not in progress;
b) the S_L_FULL bit in the Background Control mode page (see 6.5.4) is:
A) set to zero; or
B) set to one and the Background Scan log parameters in the Background Scan Results log page
(see 6.4.2) are not all used;

Working Draft SCSI Block Commands 4 (SBC-4)

87

T10/BSR INCITS 506 Revision 3

27 August 2014

and
c) the EN_BMS bit in the Background Control mode page is set to one.
If background medium scan operations are enabled, then the device server shall begin a background medium
scan operation (i.e., begin scanning the medium) when:
a) the Background Medium Scan Interval timer has expired; and
b) the logical unit has been idle for the time specified in the MINIMUM IDLE TIME BEFORE BACKGROUND SCAN
field in the Background Control mode page.
After power on, if background pre-scan operations are not enabled (see 4.24.2.1), then the device server shall
set the Background Medium Scan Interval timer to zero (i.e., expired).
Whenever a background medium scan operation begins, the device server shall set the Background Medium
Scan Interval timer to the time specified in the BACKGROUND MEDIUM SCAN INTERVAL TIME field in the
Background Control mode page and start the timer.
4.24.3.2 Suspending and resuming background medium scan operations

The logical unit shall suspend a background medium scan operation if any of the following occurs:
a) a command or task management function is processed that requires the background medium scan
operation to be suspended;
b) a SCSI event (e.g., a hard reset) (see SAM-5) is processed that requires the background medium
scan operation to be suspended;
c) a power condition timer expires (see the Power Condition mode page in SPC-4), and the
PM_BG_PRECEDENCE field in the Power Condition mode page is set to 10b;
d) the S_L_FULL bit in the Background Control mode page (see 6.5.4) is set to one, and the Background
Scan log parameters in the Background Scan Results log page (see 6.4.2) are all used; or
e) an application client sets the EN_BMS bit in the Background Control mode page to zero.
If a command is received that requires a background medium scan operation to be suspended, then the
following should occur within the time specified in the MAXIMUM TIME TO SUSPEND BACKGROUND SCAN field in the
Background Control mode page:
a) the logical unit suspends the background medium scan operation; and
b) and the device server begins processing the command.
If a background pre-scan operation is suspended, then the device server shall not stop:
a) the Background Medium Scan Interval timer; and
b) any process that results in an event that causes a background function to occur (e.g., not stop any
timers or counters associated with background functions).
The logical unit shall resume a suspended background medium scan operation from where the operation was
suspended when:
a)
b)
c)
d)

there are no commands in any task set to be processed;


there are no task management functions to be processed;
there are no SCSI events to be processed;
the PM_BG_PRECEDENCE field in the Power Condition mode page is set to 10b (see SPC-4), but no
power condition timer defined in the Power Condition mode page has expired;
e) the S_L_FULL bit in the Background Control mode page is set to zero, or the Background Medium
Scan log parameters in the Background Scan Results log page are not all used;
f) the EN_BMS bit in the Background Control mode page is set to one; and
g) the logical unit has been idle for the time specified in the MINIMUM IDLE TIME BEFORE BACKGROUND SCAN
field in the Background Control mode page.

88

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.24.3.3 Halting background medium scan operations

The device server shall halt background medium scan operations if any of the following occurs:
a)
b)
c)
d)
e)

the background medium scan operation completes scanning all logical blocks on the medium;
the device server detects a fatal error;
the device server detects a vendor specific pattern of errors;
the device server detects a medium formatted without a PLIST (see 4.13); or
the device server detects temperature out of range.

After background medium scan operations have been halted, the device server shall not enable a
background medium scan operation until the conditions in 4.24.3.1 are met.
4.24.4 Interpreting the logged background scan results

An application client may:


a) poll the Background Scan Results log page (see 6.4.2) to get information about background pre-scan
and background medium scan activity; or
b) use the EBACKERR bit and the MRIE field in the Informational Exceptions Control mode page (see 6.5.6)
to select a method of indicating that a medium error was detected.
If the EBACKERR bit is set to one and a medium error was detected, then the device server shall return the
following additional sense codes using the method defined by the value in the MRIE field:
a) WARNING - BACKGROUND PRE-SCAN DETECTED MEDIUM ERROR, if the failure occurs during
a background pre-scan operation; or
b) WARNING - BACKGROUND MEDIUM SCAN DETECTED MEDIUM ERROR, if the failure occurs
during a background medium scan operation.
The Background Scan Status log parameter (see 6.4.2.2) in the Background Scan Results log page
(see 6.4.2) indicates:
a) whether or not a background scan operation is active or halted;
b) the number of background scan operations that have been performed on the medium; and
c) the progress of a background scan operation, if active.
This information may be used by an application client to monitor the background scan operations and should
be used by an application client after notification via an informational exception (see 6.5.6).
The Background Scan Results log parameters (see 6.4.2.3), if any, in the Background Scan Results log page
describe the LBA and the reassignment status of each logical block that generated recovered errors or
unrecovered errors during the background scans read medium operations.
After an application client analyzes the Background Scan Results log parameters and has completed actions,
if any, to repair any of the indicated LBAs, the application client may delete all Background Scan Results
parameters by issuing a LOG SELECT command (e.g., with the PCR bit set to one in the CDB or with the PC
field set to 11b and the PARAMETER LIST LENGTH field set to zero in the CDB) (see SPC-4).
A background medium scan operation may continue to run during log page accesses. To ensure that the
values in the Background Scan Results log page do not change during a sequence of accesses, the
application client:
1) sets the EN_BMS bit to zero in the Background Control mode page in order to suspend the background
medium scan operation;
2) reads the Background Scan Results log page with a LOG SENSE command;
3) processes the Background Scan Results log page;
4) deletes the Background Scan Results log page entries with the LOG SELECT command (e.g., with
the PCR bit set to one in the CDB); and
5) sets the EN_BMS bit to one in the Background Control mode page in order to re-enable the background
scan operation.

Working Draft SCSI Block Commands 4 (SBC-4)

89

T10/BSR INCITS 506 Revision 3

27 August 2014

4.25 Association between commands and CbCS permission bits


Table 27 defines the CbCS permissions required for each command defined in this standard. The permissions
shown in table 27 are defined in the PERMISSIONS BIT MASK field in the CbCS capability descriptor in a CbCS
extension descriptor (see SPC-4). This standard does not define any permissions specific to block
commands.

Table 27 Associations between commands and CbCS permissions (part 1 of 2)


Permissions bit mask bits a

Command
DATA READ

DATA WRITE

COMPARE AND WRITE

FORMAT UNIT

GET LBA STATUS

PARM READ

POPULATE TOKEN

PRE-FETCH (10) / (16)

PREVENT ALLOW MEDIUM


REMOVAL

1
1

READ CAPACITY (10) / (16)

READ DEFECT DATA (10) / (12)

READ LONG (10) / (16)

REASSIGN BLOCKS

RECEIVE ROD TOKEN


INFORMATION

See SPC-4

REPORT REFERRALS

START STOP UNIT

SYNCHRONIZE CACHE (10) / (16)

UNMAP

VERIFY (10) / (12) / (16) / (32)

WRITE (10) / (12) / (16) / (32)

WRITE AND VERIFY (10) / (12) /


(16) / (32)

WRITE ATOMIC (16) / (32)

90

PHY ACC

ORWRITE (16) / (32)

READ (10) / (12) / (16) / (32)

PARM WRITE

A device server shall only process a command shown in this table as specified by the CDB field of an
extended CDB (see SPC-4) that contains a CbCS capability descriptor when all of the bits marked with
a 1 in the row for that command are set to one in the PERMISSIONS BIT MASK field in that descriptor. The
permissions bits represented by the empty cells in a row are ignored. If a device server receives a
command specified by the CDB field of an extended CDB that does not contain the CbCS capability
descriptor with all of the bits set to one as defined in this table, then the device server shall terminate
the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST.
Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 27 Associations between commands and CbCS permissions (part 2 of 2)


Permissions bit mask bits a

Command
DATA READ

DATA WRITE

WRITE LONG (10) / (16)

WRITE SAME (10) / (16) / (32)

WRITE USING TOKEN

XDWRITEREAD (10) / (32)

XPWRITE (10) / (32)


a

PARM READ

PARM WRITE

PHY ACC

1
1

A device server shall only process a command shown in this table as specified by the CDB field of an
extended CDB (see SPC-4) that contains a CbCS capability descriptor when all of the bits marked with
a 1 in the row for that command are set to one in the PERMISSIONS BIT MASK field in that descriptor. The
permissions bits represented by the empty cells in a row are ignored. If a device server receives a
command specified by the CDB field of an extended CDB that does not contain the CbCS capability
descriptor with all of the bits set to one as defined in this table, then the device server shall terminate
the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST.

4.26 Deferred microcode activation


After receiving a FORMAT UNIT command (see 5.3) or a START STOP UNIT command (see 5.25), a device
server shall, prior to processing the command, activate any deferred microcode that has been downloaded as
a result of a WRITE BUFFER command with the MODE field set to 0Eh (see SPC-4).

Working Draft SCSI Block Commands 4 (SBC-4)

91

T10/BSR INCITS 506 Revision 3

27 August 2014

4.27 Model for uninterrupted sequences on LBA ranges


Direct access block devices may perform commands that require an uninterrupted sequence of actions to be
performed on a specified range of LBAs. The uninterrupted sequence requirements are described in table 28.
The uninterrupted sequences do not impact the processing of commands that access logical blocks other than
those specified in the command requiring an uninterrupted sequence. The task attribute (see SAM-5) controls
interactions between multiple commands. Commands with uninterrupted sequences on LBA ranges are
shown in table 28.

Table 28 Commands that require uninterrupted sequences


Command

ORWRITE (16)
ORWRITE (32)
XDWRITEREAD (10)
XDWRITEREAD (32)
XPWRITE (10)
XPWRITE (32)

COMPARE AND WRITE

Consistency enforcement

The device server shall not perform any operations requested


by any other command in the task set on logical blocks in the
range specified by the command that requires an
uninterrupted sequence of actions while performing the
specified uninterrupted sequence of actions.

Reference

4.29
5.49
5.51

The device server shall not perform:


a) any operations requested by any COMPARE AND
WRITE command in the task set on logical blocks in the
range specified by the command that requires an
uninterrupted sequence of actions while performing the
specified uninterrupted sequence of actions;
b) any write operations to or unmap operations on logical
blocks in the range specified by the command that
requires an uninterrupted sequence of actions while
performing the read operations specified in the
uninterrupted sequence of actions; and
c) any read operations or verify operations from logical
blocks in the range specified by the command that
requires an uninterrupted sequence of actions while
performing the write operations specified in the
uninterrupted sequence of actions.

5.2

4.28 Referrals
4.28.1 Referrals overview

Referrals allow a logical unit to inform an application client that one or more user data segments (i.e., ranges
of logical blocks) are accessible through target port group(s).
Support for referrals is indicated by the device server setting the R_SUP bit to one in the Extended INQUIRY
Data VPD page (see SPC-4).
An application client may determine information on referrals by:
a) issuing commands; or
b) monitoring sense data returned as part of a completed command or a terminated command.
Figure 13 shows an example of how a logical unit informs an application client that one or more user data
segments are accessible through target port groups.

92

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Target port group


SCSI target port

Target port group

SCSI target port

SCSI target port

User data segment

SCSI target port

User data segment

Logical unit
SCSI target device
SCSI device
Active/optimized target port asymmetric access (see SPC-4) to user data segment
Active/non-optimized target port asymmetric access (see SPC-4) to user data segment

Figure 13 Referrals
4.28.2 Discovering referrals

An application client may determine referrals information on a logical unit by:


1) determining if the R_SUP bit is set to one (i.e., the logical unit supports referrals) in the Extended
INQUIRY Data VPD page (see SPC-4);
2) requesting the user data segment information from the Referrals VPD page (see 6.6.6);
3) requesting a list of target port groups by issuing a REPORT TARGET PORT GROUPS command (see
SPC-4); and
4) either:
A) requesting referrals information by issuing a REPORT REFERRALS command (see 5.23); or
B) monitoring for referral information in sense data returned by the device server (see 4.28.3).
The following calculation is used to determine the first LBA for each user data segment within the range of
LBAs indicated by the user data segment referral descriptors (see table 17) returned in:
a) the REPORT REFERRALS parameter data (see table 87); or
b) the user data segment referrals sense data descriptor (see 4.18.4):
first LBA of the current user data segment = first LBA + (segment size segment multiplier)
where:
first LBA

segment size
segment multiplier

the initial value is the first user data segment LBA specified in the user data
segment referral descriptor (see table 17). Subsequent values, if any, are the
first LBA of the previous user data segment;
the content of the USER DATA SEGMENT SIZE field (see 6.6.6); and
the content of the USER DATA SEGMENT MULTIPLIER field (see 6.6.6).

Working Draft SCSI Block Commands 4 (SBC-4)

93

T10/BSR INCITS 506 Revision 3

27 August 2014

If the content of the USER DATA SEGMENT SIZE field is greater than zero, and the content of the USER DATA
SEGMENT MULTIPLIER field is greater than zero, then the following calculation may be used to determine the last
LBA for each user data segment within the range of LBAs indicated by the user data segment referral
descriptors (see table 17) returned in:
a) the REPORT REFERRALS parameter data (see table 87); or
b) the user data segment referrals sense data descriptor (see 4.18.4):
last LBA of the current user data segment = first LBA + (segment size 1)
where:
first LBA
segment size

the first LBA of the current user data segment;


the content of the USER DATA SEGMENT SIZE field (see 6.6.6).

If the content of the USER DATA SEGMENT SIZE field is zero, then there is only one user data segment, and the
last LBA of that user data segment is equal to the last LBA specified in the last USER DATA SEGMENT LBA field
(see table 17).
See annex G for examples for discovering referrals.
4.28.3 Referrals in sense data

Returning referral information in sense data is enabled if the:


a)

R_SUP bit is set to one (i.e., the logical unit supports referrals) in the Extended INQUIRY Data VPD
page (see SPC-4); and
b) D_SENSE bit in the Control mode page is set to one (i.e., returning descriptor formatted sense data is
enabled) (see SPC-4).

If reporting of referrals in sense data is enabled, a command completes without error, no other sense data is
available within the logical unit, and the device server has an alternate I_T_L nexus that an application client
should use to access at least one of the specified logical blocks, then the device server shall complete the
command with GOOD status with the sense key set to COMPLETED, the additional sense code set to
INSPECT REFERRALS SENSE DESCRIPTORS, and a user data segment referrals sense data descriptor
(see 4.18.4).
The user data segment referral sense data descriptor (see 4.18.4) shall define the description of as many
complete user data segments (i.e., one user data segment referral descriptor contains one complete user data
segment) that fit in the maximum number of bytes allowed for sense data (i.e., 244 bytes or the maximum
supported sense data length indicated in the Extended INQUIRY Data VPD page (see SPC-4)). If all the user
data segments do not fit within the maximum number of bytes allowed for sense data, then:
a) the device server shall set the NOT_ALL_R bit to one in the user data segment referral sense data
descriptor (see 4.18.4); and
b) the selection of which user data segments to include in the user data segment referral sense data
descriptor is vendor specific.
Each user data segment referral sense data descriptor (see 4.18.4) contains information on alternate I_T_L
nexuses to user data segments that the application client should use to access LBAs within the LBA range(s)
indicated by the user data segments.
If reporting of referrals in sense data is enabled, the device server receives a command for which the device
server is not able to access user data associated with the requested command, and the inaccessible user
data is accessible through another target port group, then the device server shall terminate the command with
CHECK CONDITION status with the sense key set to ABORTED COMMAND, the additional sense code set
to INSPECT REFERRALS SENSE DESCRIPTORS, and a user data segment referral sense data descriptor.
The user data segment referral sense data descriptor shall, at a minimum, indicate the user data segment that
contains the LBA of the first inaccessible logical block. Any other type of error that occurs while processing the
command shall take precedence and be reported as described in this standard. If any other type of error
occurs while the device server is processing the command, then processing that error shall take precedence
over processing the command, and the device server shall report the error as described in this standard.

94

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If reporting of referrals in sense data is disabled (see 4.28.1), the device server receives a command for which
the device server is not able to access user data associated with the requested command, and the
inaccessible user data is accessible through another target port group, then the device server shall terminate
the command with CHECK CONDITION status with the sense key set to HARDWARE ERROR and the
additional sense code set to INTERNAL TARGET FAILURE.

4.29 ORWRITE commands


4.29.1 ORWRITE commands overview

The ORWRITE commands (see 5.5 and 5.6) provide a mechanism for an application client to manipulate
bitmap structures on direct access block devices.
An ORWRITE command shall be processed by the device server performing the following as an uninterrupted
sequence of actions (see 4.27):
1) perform read operations from the LBAs specified by this command;
2) transfer the specified number of logical blocks from the Data-Out Buffer;
3) perform the specified Boolean arithmetic function on:
A) the user data contained in the logical blocks from read operations; and
B) the user data contained in the logical blocks transferred from the Data-Out Buffer;
4) store the results of the Boolean arithmetic function in a bitmap buffer;
5) generate new protection information, if any, from the stored results;
6) store the generated protection information, if any, into the bitmap buffer; and
7) perform write operations using the updated logical block data from the bitmap buffer.
If the check of the protection information from the read operations is successful (see table 48), and the check
of the protection information transferred from the Data-Out Buffer is successful (see table 49), then the device
server shall generate the new protection information (see 4.22) as follows:
a) set the LOGICAL BLOCK GUARD field to the CRC (see 4.22.4) generated from the bitmap buffer by the
device server;
b) set the LOGICAL BLOCK REFERENCE TAG field to the LOGICAL BLOCK REFERENCE TAG field received from
the Data-Out Buffer; and
c) set the LOGICAL BLOCK APPLICATION TAG field to the LOGICAL BLOCK APPLICATION TAG field received from
the Data-Out Buffer.
In order to support the manipulation of bitmap structures:
a) the ORWRITE (16) command supports the set operation (see 4.29.4); and
b) the ORWRITE (32) command supports:
A) the set operation; and
B) the change generation and clear operation (see 4.29.3).
4.29.2 ORWgeneration code
4.29.2.1 ORWgeneration code overview

The ORWRITE commands use a generation code for synchronization. The device server shall establish and
maintain the following generation codes:
a) a current ORWgeneration code; and
b) a previous ORWgeneration code.
Subsequent ORWRITE command processing by the device server is dependent on comparisons involving the
ORWgeneration codes. Changes in these ORWgeneration codes define a synchronization point in the
management of the bitmap.

Working Draft SCSI Block Commands 4 (SBC-4)

95

T10/BSR INCITS 506 Revision 3

27 August 2014

4.29.2.2 ORWgeneration code processing

The device server shall maintain at least one current ORWRITE processing policy. The device server may
support more than one ORWRITE processing policy (see table 29 in 4.29.4).
When processing an ORWRITE (32) command (see 5.6), the device server compares the value in the
EXPECTED ORWGENERATION field in the CDB to the current ORWgeneration code (see 4.29.2.1), and:
a) if the two values are equal, then the device server continues processing the ORWRITE (32)
command as described in table 29 for the set operation and as described in 4.29.3 for the change
generation and clear operation; or
b) if the two values are not equal, then:
A) for a set operation, the current ORWRITE processing policy (see table 29) determines how the
device server continues processing the ORWRITE (32) command; and
B) for a change generation and clear operation, the device server terminates the ORWRITE (32)
command (see 4.29.3).
If the device server supports both the ORWRITE (16) command (see 5.5) and the ORWRITE (32) command,
then the device server shall process all ORWRITE (16) commands as if they contained an EXPECTED
ORWGENERATION field set to zero.
4.29.3 Change generation and clear operation

The change generation portion of the change generation and clear operation is used to establish a point of
synchronization. The clear portion of the change generation and clear operation is used to set zero or more
bits in the bitmap structure to zero.
The device server performs a change generation and clear operation if:
a) the BMOP field in the ORWRITE (32) command (see 5.6) is set to 001b; and
b) the value in the EXPECTED ORWGENERATION field is equal to the current ORWgeneration code in the
device server.
If the device server performs a change generation and clear operation, then the device server shall perform
the following as an uninterrupted sequence:
1) perform read operations from the LBAs specified by this command;
2) transfer the specified logical blocks from the Data-Out Buffer;
3) perform an AND operation (see 3.2.3) on the user data contained in the logical blocks from the read
operations and the user data contained in the logical blocks transferred from the Data-Out Buffer;
4) store the results of the AND operation in a bitmap buffer;
5) generate new protection information, if any, from the stored results;
6) store the generated protection information, if any, into the bitmap buffer;
7) perform write operations using the updated logical block data from the bitmap buffer;
8) set the current ORWRITE processing policy to the value in the PREVIOUS GENERATION PROCESSING
field in the ORWRITE (32) command;
9) set the previous ORWGeneration code (see 4.29.2) to the current ORWgeneration code in the device
server; and
10) set the current ORWGeneration code (see 4.29.2) to the value in the NEW ORWGENERATION field in
the ORWRITE (32) command.
If the value in the EXPECTED ORWGENERATION field is not equal to the current ORWgeneration code, then the
device server shall terminate the ORWRITE (32) command with CHECK CONDITION status with the sense
key set to ILLEGAL REQUEST and the additional sense code set to ORWRITE GENERATION DOES NOT
MATCH.
If a power on or hard reset condition occurs, then the device server shall set:
a) the current ORWGeneration code to zero;
b) the previous ORWGeneration code to zero; and
c) the current ORWRITE processing policy to 7h.

96

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server shall preserve the following across a logical unit reset:
a) the current ORWGeneration code;
b) the previous ORWGeneration code; and
c) the current ORWRITE processing policy.
4.29.4 Set operation

The set operation is used to set zero or more bits in the bitmap structure to one.
The device server performs a set operation for an ORWRITE command (see 5.5 and 5.6) if the BMOP field in
the CDB is set to 000b.
The device server shall perform a set operation by performing the actions specified in table 29, which shows
the current ORWgeneration code, the previous ORWgeneration code, and the device servers current
ORWRITE processing policy (see 4.29.3).

Table 29 Performing an ORWRITE set operation


Current ORWRITE
processing policy

0h

The value in the EXPECTED ORWGENERATION field matches


Current
ORWgeneration code

Previous
ORWgeneration code

Any other value

PA

PA

CCG

1h

Reserved

2h

PA

DN

CCG

3h

PA

PA

PA

4h
5h

Reserved
PA

6h
7h

DN

DN

Reserved
PA

8h to Fh

CCG

CCG

Reserved

Key:
PA = the device server shall perform the following as an uninterrupted sequence:
1) perform read operations from the LBAs specified by the command;
2) transfer the specified logical blocks from the Data-Out Buffer;
3) perform an OR operation on the logical blocks from the read operations and the user data contained
in the logical blocks transferred from the Data-Out Buffer;
4) store the results of the OR operation in a bitmap buffer;
5) generate new protection information, if any, from the stored results;
6) store the generated protection information, if any, into the bitmap buffer; and
7) perform write operations using the updated logical block data (i.e., those containing the user data
resulting from the OR operation and the generated protection information, if any) from the bitmap
buffer.
DN = the device server shall discard the contents of the Data-Out Buffer and shall complete the command
with GOOD status.
CCG = the device server shall terminate the command with CHECK CONDITION status with the sense key
set to ILLEGAL REQUEST and the additional sense code set to ORWRITE GENERATION DOES NOT
MATCH

Working Draft SCSI Block Commands 4 (SBC-4)

97

T10/BSR INCITS 506 Revision 3

27 August 2014

4.30 Block device ROD token operations


4.30.1 Block device ROD token operations overview

Application clients request that block device ROD token operations (see SPC-4) be performed using the
commands summarized in this subclause or the commands specified in SPC-4.
Copy managers (see SPC-4) that implement the POPULATE TOKEN command (see 5.7) or the WRITE
USING TOKEN command (see 5.48) shall implement the following:
a)
b)
c)
d)
e)

the POPULATE TOKEN command;


the WRITE USING TOKEN command;
the RECEIVE COPY STATUS (LID4) command (see SPC-4);
the RECEIVE ROD TOKEN INFORMATION command (see SPC-4 and 5.22); and
the Third-party Copy VPD page (see 6.6.7) containing at least one Block Device ROD Token Limits
descriptor (see 6.6.7.3).

The POPULATE TOKEN command may cause the copy manager to create zero or one point in time ROD
tokens. If the POPULATE TOKEN command causes one point in time ROD token to be created, then this
point in time ROD token may be retrieved by an application client using the RECEIVE ROD TOKEN
INFORMATION command.
The WRITE USING TOKEN command causes the copy manager to transfer the data represented by the
specified ROD token (i.e., the data represented by the ROD token retrieved using the RECEIVE ROD TOKEN
INFORMATION command or the data represented by the block device zero ROD token).
The copy manager manages the point in time ROD token.
After the copy manager begins processing a POPULATE TOKEN command or a WRITE USING TOKEN
command, the copy manager shall preserve information for return in response to a RECEIVE ROD TOKEN
INFORMATION command as defined in SPC-4.
Block device range descriptor lists (see 5.7.3) contain non-overlapping block device range descriptors and are
used by the application client to specify:
a) the logical blocks to include in the data represented by the ROD token;
b) the sequence of the logical blocks in the data represented by the ROD token (e.g., the first logical
block represented by the LBA described in the first block device range descriptor is placed at the
beginning of the data represented by the ROD token, and the first logical block represented by the
LBA described in the second block device range descriptor is placed in the data represented by the
ROD token immediately following the last logical block represented by the LBA described in the first
block device range descriptor);
c) the logical blocks to be written from the data represented by the ROD token; and
d) the sequence of the logical blocks written from the data represented by the ROD token (e.g., the first
logical block represented by the LBA described in the first block device range descriptor is written
from the beginning of the data represented by the ROD token, and the first logical block represented
by the LBA described in the second block device range descriptor is written from data represented by
the ROD token immediately following the data written to the last logical block represented by the LBA
described in the first block device range descriptor).
If the copy manager uses out of order transfers to create the representation of data for the ROD token, then
the TRANSFER COUNT field in the parameter data returned in the response to a RECEIVE ROD TOKEN
INFORMATION command with a list identifier that specifies a POPULATE TOKEN command (see 5.22.2)
shall be based only on the contiguous transfers that complete without error starting at the first LBA specified
by the first block device range descriptor (i.e., any transfers completed without error beyond the first
incomplete or unsuccessful transfer shall not contribute to the computation of the value in the TRANSFER
COUNT field).
If the copy manager uses out of order transfers to write from the data represented by the ROD token, then the
TRANSFER COUNT field in the parameter data returned in response to a RECEIVE ROD TOKEN
INFORMATION command with a list identifier that specifies a WRITE USING TOKEN command (see 5.22.3)

98

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

shall be based only on the contiguous transfers that complete without error starting at the first LBA specified
by the first block device range descriptor (i.e., any transfers completed without error beyond the first
incomplete or unsuccessful transfer shall not contribute to the computation of the value in the TRANSFER
COUNT field).
4.30.2 POPULATE TOKEN command and WRITE USING TOKEN command completion

As part of completing a block device token operation originated by a POPULATE TOKEN command (see 5.7)
or a WRITE USING TOKEN command (see 5.48), the copy manager shall compute the residual by
subtracting the sum of the contents of the NUMBER OF LOGICAL BLOCK fields in all of the complete block device
range descriptors of the parameter list (see 5.7.3) from the TRANSFER COUNT field in the parameter data
returned in response to a RECEIVE ROD TOKEN INFORMATION command (see 5.22.2 and 5.22.3).
If the POPULATE TOKEN command was received with the IMMED bit set to zero, and the residual is negative,
then the copy manager shall:
a) terminate the command with CHECK CONDITION status, with the additional sense code set to COPY
TARGET DEVICE DATA UNDERRUN, the sense key set to:
A) COPY ABORTED, if the transfer count is not zero; or
B) ILLEGAL REQUEST, if the transfer count is zero,
and report the transfer count in the INFORMATION field (see SPC-4); or
b) complete the command with GOOD status and return parameter data for the RECEIVE ROD TOKEN
INFORMATION command received on the same I_T nexus with a matching LIST IDENTIFIER field with:
A) the COPY OPERATION STATUS field set to 03h or 60h (see SPC-4);
B) the EXTENDED COPY COMPLETION STATUS field set to CHECK CONDITION (see SAM-5); and
C) the SENSE DATA field with the additional sense code set to COPY TARGET DEVICE DATA
UNDERRUN, the sense key set to:
a) COPY ABORTED, if the transfer count is not zero; or
b) ILLEGAL REQUEST, if the transfer count is zero;
and report the transfer count in the INFORMATION field (see SPC-4).
If the WRITE USING TOKEN command was received with the IMMED bit set to zero, and the residual is
negative, then the copy manager shall terminate the command with CHECK CONDITION status, the
additional sense code set to COPY TARGET DEVICE DATA UNDERRUN, the sense key set to:
a) COPY ABORTED, if the transfer count is not zero; or
b) ILLEGAL REQUEST, if the transfer count is zero,
and report the transfer count in the INFORMATION field (see SPC-4).
If the POPULATE TOKEN command or WRITE USING TOKEN command was received with the IMMED bit set
to one, and the residual is negative, then the copy manager shall return parameter data for the RECEIVE
ROD TOKEN INFORMATION command received on the same I_T nexus with a matching LIST IDENTIFIER field
with:
a) the COPY OPERATION STATUS field set to 03h or 60h (see SPC-4);
b) the EXTENDED COPY COMPLETION STATUS field set to CHECK CONDITION status (see SAM-5); and
c) the SENSE DATA field with the additional sense code set to COPY TARGET DEVICE DATA
UNDERRUN, the sense key set to:
A) COPY ABORTED, if the transfer count is not zero; or
B) ILLEGAL REQUEST, if the transfer count is zero,
and report the transfer count in the INFORMATION field (see SPC-4).
4.30.3 Block device specific ROD tokens

Block device specific ROD token types (see SPC-4) are shown in table 30.

Working Draft SCSI Block Commands 4 (SBC-4)

99

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 30 ROD token type values


ROD token type

Description

Reference

FF00_0000h to FFFF_0000h

Reserved

FFFF_0001h

Block device zero ROD token

FFFF_0002h to FFFF_FFEFh

Reserved

4.30.4

4.30.4 Block device zero ROD token

The block device zero ROD token represents user data in which all bits are set to zero and protection
information, if any, is set to FFFF_FFFF_FFFF_FFFFh. If user data with all bits set to zero and protection
information, if any, set to FFFF_FFFF_FFFF_FFFFh, is represented by a ROD token, then, in response to a
RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER field specifies a POPULATE
TOKEN command, the copy manager may or may not return a ROD token that is the block device zero ROD
token. The block device zero ROD token format is shown in table 31.

Table 31 Block device zero ROD token format


Bit
Byte
0

(MSB)
ROD TOKEN TYPE

(FFFF_0001h)
(LSB)

Reserved

5
6

(MSB)

7
8

511

ROD TOKEN LENGTH

(01F8h)

(LSB)

Reserved

The logical block length associated with the block device zero ROD token is that of the direct access block
device to which the data is being written (e.g., if a block device zero ROD token is used to write to a logical
unit that has 642-byte logical blocks, then the logical block length of the block device zero ROD token is 642
bytes).
The ROD TOKEN TYPE field is defined in SPC-4 and shall be set to the value shown in table 31 for the block
device zero ROD token.
The ROD TOKEN LENGTH field is defined in SPC-4 and shall be set to the value shown in table 31 for the block
device zero ROD token.
4.30.5 ROD token device type specific data

The device type specific data for ROD tokens (see SPC-4) created by a copy manager for a direct access
block devices (see 6.7):
a) provides information about the logical unit at the time that the ROD token was created; and

100

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

b) is a subset of the parameter data returned by the READ CAPACITY (16) command (see 5.16) for the
logical unit that contains the copy manager that created the ROD token.
If the READ CAPACITY (16) parameter data changes so that the copy manager that created the ROD token is
no longer able to access the data represented by the ROD token, then that copy manager shall invalidate the
ROD token.

4.31 Atomic writes


4.31.1 Atomic writes overview

An atomic write command performs an atomic write operation. The following write commands are atomic write
commands:
a) WRITE ATOMIC (16) (see 5.41); and
b) WRITE ATOMIC (32) (see 5.42).
To perform an atomic write operation, the device server:
a) ensures that any subsequent read operation returns either all of the write data or none of the write
data for the atomic write operation as described in 4.31.2;
b) performs operations as described in 4.31.3; and
c) processes ACA conditions as described in 4.31.4.
All commands that are not specifically identified as atomic commands are non-atomic commands.
The MAXIMUM ATOMIC TRANSFER LENGTH field in the Block Limits VPD page (see 6.6.4) indicates the maximum
transfer length for atomic write commands. If an atomic command specifies a transfer length greater than the
maximum atomic transfer length, then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
INVALID FIELD IN CDB, and the field pointer pointing to the transfer length field in the CDB.
If the starting LBA of an atomic write command does not meet the requirements of the atomic alignment field
(see 6.4.4), then the device server shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the ATOMIC TRANSFER LENGTH GRANULARITY field (see 6.6.4) contains a non-zero value and the TRANSFER
LENGTH field in an atomic write command is not a multiple of the atomic transfer length granularity, then the
device server shall terminate the command with CHECK CONDITION status with the sense key set to
ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
All operations that are not specifically identified as atomic operations are non-atomic operations.
If the device server supports atomic write commands, then the device server shall process commands as
described in SAM-5 with the additional restrictions described in 4.31.
4.31.2 Atomic write operations that do not complete

If the device server is not able to successfully complete an atomic write operation (e.g., the command is
terminated or aborted), then the device server shall ensure that none of the LBAs specified by the atomic write
operation have been altered by any logical block data from the atomic write operation (i.e., the specified LBAs
return logical block data as if the atomic write operation had not occurred).
If a power loss causes loss of logical block data from an atomic write operation in a volatile write cache that
has not yet been stored on the medium, then the device server shall ensure that none of the LBAs specified
by the atomic write operation have been altered by any logical block data from the atomic write operation (i.e.,
the specified LBAs return logical block data as if the atomic write operation had not occurred and writes from
the cache to the medium preserve the specified atomicity).

Working Draft SCSI Block Commands 4 (SBC-4)

101

T10/BSR INCITS 506 Revision 3

27 August 2014

4.31.3 Performing operations with respect to atomic operations


4.31.3.1 Performing operations before and after an atomic write operation

Before an atomic write operation completes, the device server shall not use any logical block data from the
atomic write operation for any other operations (e.g., read operations return old logical block data until the
atomic write operation completes).
After an atomic write operation completes, the device server shall use all of the logical block data from the
atomic write operation as the basis for subsequent operations (e.g., read operations return logical block data
from the atomic write operation).
4.31.3.2 Performing operations during an atomic write operation

Table 32 defines the device server requirements for starting to perform an atomic write operation that has an
overlapping LBA with an operation that the device server is already performing.
Table 32 Performing atomic operations with overlapping LBAs during current operations
Operation A that is currently being
processed by the device server is a

read or verify

write or unmap

format or sanitize

Device server is requested to perform an atomic


write operation B that accesses an LBA that is
being accessed by operation A

The device server shall perform one of the following:


a) should complete operation A before starting
operation B; or
b) may terminate operation A with CHECK
CONDITION status with a sense key of
ABORTED COMMAND and an additional
sense code set to OVERLAPPING ATOMIC
COMMAND IN PROGRESS before starting
operation B.
The device server shall abort operation B as specified
in 3.4.11.2 and 5.3.1

Uninterruptible sequence of operations The device server shall wait for operation A to complete
before it starts performing operation B.
atomic write
If the device server is performing an atomic write operation and is requested to perform another operation that
has an LBA that overlaps with the atomic operation being performed, then the device server shall complete
the current atomic write operation before performing the requested operation.
EXAMPLE - While the device server is performing an atomic write operation that accesses LBAs 0 to 15, it may perform a
second atomic write operation accessing LBAs 16 to 31 and shall not perform a third atomic write operation accessing
LBAs 7 to 15. After the first atomic write operation completes, the device server may perform the third atomic write
operation.
EXAMPLE - While the device server is performing an atomic write operation that accesses LBAs 0 to 15, if a second write
operation accessing LBAs 7 to 31 is available for performing, then the device server may perform the write operations
accesses to LBAs 16 to 31 and shall not perform the write operations accesses to LBAs 7 to 15. After the atomic write
operation completes, the device server may perform the write operations accesses to LBAs 7 to 15.

Performing an atomic write operation does not prevent the device server from performing, at any time, other
operations that only contain non-overlapping LBAs.

102

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

4.31.4 Processing ACA conditions during atomic write commands

If another command causes an ACA condition while an atomic write command is being processed, then the
device server:
a) shall ensure that none of the LBAs specified by the atomic write operation have been altered by any
logical block data from the atomic write operation (i.e., the specified LBAs return logical block data, as
if the atomic write operation had not occurred); and
b) after the ACA condition is cleared:
A) may terminate the atomic write command with CHECK CONDITION status with a sense key of
ABORTED COMMAND and an additional sense code set to ATOMIC COMMAND ABORTED
DUE TO ACA; or
B) may process the atomic write operation.

Working Draft SCSI Block Commands 4 (SBC-4)

103

T10/BSR INCITS 506 Revision 3

27 August 2014

5 Commands for direct access block devices


5.1 Commands for direct access block devices overview
The commands for direct access block devices are listed in table 33.

Table 33 Commands for direct access block devices (part 1 of 4)


Operation
code a

Type

LBACT

Reference

ACCESS CONTROL IN

86h

n/a

SPC-4

ACCESS CONTROL OUT

87h

n/a

SPC-4

ATA PASS-THROUGH (12)

A1h

n/a

SAT-3

ATA PASS-THROUGH (16)

85h

n/a

SAT-3

A4h/0Bh

n/a

SPC-4

COMPARE AND WRITE

89h

R, W

5.2

EXTENDED COPY

83h

n/a

SPC-4

FORMAT UNIT

04h

5.3

9Eh/12h

n/a

5.4

INQUIRY

12h

n/a

SPC-4

LOG SELECT

4Ch

n/a

SPC-4

LOG SENSE

4Dh

n/a

SPC-4

MAINTENANCE IN

A3h/00h to 04h
A3h/06h to 09h

n/a

SPC-4
SCC-2

MAINTENANCE OUT

A4h/00h to 05h
A4h/07h to 09h

n/a

SPC-4
SCC-2

MODE SELECT (6)

15h

n/a

SPC-4

MODE SELECT (10)

55h

n/a

SPC-4

MODE SENSE (6)

1Ah

n/a

SPC-4

MODE SENSE (10)

5Ah

n/a

SPC-4

ORWRITE (16)

8Bh

R, W

5.5

ORWRITE (32)

7Fh/000Eh

R, W

5.6

PERSISTENT RESERVE IN

5Eh

n/a

SPC-4

PERSISTENT RESERVE OUT

5Fh

n/a

SPC-4

83h/10h

n/a

5.7

Command

CHANGE ALIASES

GET LBA STATUS

POPULATE TOKEN
Key:
O
M
X
R
U
a

104

= optional
= mandatory
= implementation requirements are defined in
the reference
= read command
= unmap command

V
= verify command
W
= write command
Z
= other command
PI
= protection information
LBACT= logical block access command type
(see 4.2.2)

If a command is defined by a combination of operation code and service action, then the operation
code value is shown preceding a slash and the service action value is shown after the slash.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3


Table 33 Commands for direct access block devices (part 2 of 4)
Operation
code a

Type

LBACT

Reference

PRE-FETCH (10)

34h

5.8

PRE-FETCH (16)

90h

5.9

PREVENT ALLOW MEDIUM REMOVAL

1Eh

n/a

5.10

READ (10)

28h

5.11

READ (12)

A8h

5.12

READ (16)

88h

5.13

READ (32)

7Fh/0009h

5.14

READ ATTRIBUTE

8Ch

n/a

SPC-4

READ BUFFER

3Ch

n/a

SPC-4

READ CAPACITY (10)

25h

n/a

5.15

READ CAPACITY (16)

9Eh/10h

n/a

5.16

READ DEFECT DATA (10)

37h

n/a

5.17

READ DEFECT DATA (12)

B7h

n/a

5.18

READ LONG (10)

3Eh

5.19

READ LONG (16)

9Eh/11h

5.20

REASSIGN BLOCKS

07h

5.21

RECEIVE COPY RESULTS

84h

n/a

SPC-4

RECEIVE DIAGNOSTIC RESULTS

1Ch

n/a

SPC-4
6.3
4.30

84h/07h

n/a

SPC-4
5.22

REDUNDANCY GROUP IN

BAh

n/a

SCC-2

REDUNDANCY GROUP OUT

BBh

n/a

SCC-2

REMOVE I_T NEXUS

A4h/0Ch

n/a

SPC-4

REPORT REFERRALS

9Eh/13h

n/a

5.23

REPORT ALIASES

A3h/0Bh

n/a

SPC-4

REPORT IDENTIFYING INFORMATION

A3h/05h

n/a

SPC-4

A0h

n/a

SPC-4

REPORT PRIORITY

A3h/0Eh

n/a

SPC-4

REPORT SUPPORTED OPERATION CODES

A3h/0Ch

n/a

SPC-4

REPORT SUPPORTED TASK MANAGEMENT


FUNCTIONS

A3h/0Dh

n/a

SPC-4

Command

RECEIVE ROD TOKEN INFORMATION

REPORT LUNS

Key:
O
M
X
R
U
a

= optional
= mandatory
= implementation requirements are defined in
the reference
= read command
= unmap command

V
= verify command
W
= write command
Z
= other command
PI
= protection information
LBACT= logical block access command type
(see 4.2.2)

If a command is defined by a combination of operation code and service action, then the operation
code value is shown preceding a slash and the service action value is shown after the slash.

Working Draft SCSI Block Commands 4 (SBC-4)

105

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 33 Commands for direct access block devices (part 3 of 4)


Operation
code a

Type

LBACT

Reference

A3h/0Ah

n/a

SPC-4

REQUEST SENSE

03h

n/a

SPC-4

SANITIZE

48h

5.24

SECURITY PROTOCOL IN

A2h

n/a

SPC-4

SECURITY PROTOCOL OUT

B5h

n/a

SPC-4

SEND DIAGNOSTIC

1Dh

n/a

SPC-4

SET IDENTIFYING INFORMATION

A4h/06h

n/a

SPC-4

SET PRIORITY

A4h/0Eh

n/a

SPC-4

SET TARGET PORT GROUPS

A4h/0Ah

n/a

SPC-4

SPARE IN

BCh

n/a

SCC-2

SPARE OUT

BDh

n/a

SCC-2

START STOP UNIT

1Bh

n/a

5.25

SYNCHRONIZE CACHE (10)

35h

5.26

SYNCHRONIZE CACHE (16)

91h

5.27

TEST UNIT READY

00h

n/a

SPC-4

UNMAP

42h

5.28
4.7

VERIFY (10)

2Fh

V, W

5.29

VERIFY (12)

AFh

V, W

5.30

VERIFY (16)

8Fh

V, W

5.31

VERIFY (32)

7Fh/000Ah

V, W

5.32

VOLUME SET IN

BEh

n/a

SCC-2

VOLUME SET OUT

BFh

n/a

SCC-2

WRITE (10)

2Ah

5.33

WRITE (12)

AAh

5.34

WRITE (16)

8Ah

5.35

WRITE (32)

7Fh/000Bh

5.36

WRITE AND VERIFY (10)

2Eh

V, W

5.37

WRITE AND VERIFY (12)

AEh

V, W

5.38

WRITE AND VERIFY (16)

8Eh

V, W

5.39

WRITE AND VERIFY (32)

7Fh/000Ch

V, W

5.40

9Ch

5.41

Command

REPORT TARGET PORT GROUPS

WRITE ATOMIC (16)


Key:
O
M
X
R
U
a

106

= optional
= mandatory
= implementation requirements are defined in
the reference
= read command
= unmap command

V
= verify command
W
= write command
Z
= other command
PI
= protection information
LBACT= logical block access command type
(see 4.2.2)

If a command is defined by a combination of operation code and service action, then the operation
code value is shown preceding a slash and the service action value is shown after the slash.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3


Table 33 Commands for direct access block devices (part 4 of 4)

Command

Operation
code a

Type

LBACT

Reference

WRITE ATOMIC (32)

7Fh/000Fh

5.42

WRITE ATTRIBUTE

8Dh

n/a

SPC-4

WRITE BUFFER

3Bh

n/a

SPC-4

WRITE LONG (10)

3Fh

5.43

WRITE LONG (16)

9Fh/11h

5.44

WRITE SAME (10)

41h

U, W

5.45
4.7

WRITE SAME (16)

93h

U, W

5.46
4.7

WRITE SAME (32)

7Fh/000Dh

U, W

5.47
4.7

83h/11h

5.48
4.30

XDWRITEREAD (10)

53h

R, W

5.49

XDWRITEREAD (32)

7Fh/0007h

R, W

5.50

XPWRITE (10)

51h

R, W

5.51

XPWRITE (32)

7Fh/0006h

R, W

5.52

WRITE USING TOKEN

Note 1 - The following operation codes are obsolete: 01h, 08h, 0Ah, 0Bh, 16h, 17h, 18h, 2Bh, 30h, 31h,
32h, 33h, 36h, 39h, 3Ah, 40h, 50h, 52h, 56h, 57h, 80h, 81h, 82h, 92h, A7h, B3h, and B4h.
Note 2 - The following operation codes are vendor specific: 02h, 05h, 06h, 09h, 0Ch, 0Dh, 0Eh, 0Fh, 10h,
11h, 13h, 14h, 19h, 20h, 21h, 22h, 23h, 24h, 26h, 27h, 29h, 2Ch, 2Dh, and C0h to FFh.
Note 3 - A complete summary of operation codes is available at http://www.t10.org/lists/2op.htm. The
summary includes information about obsolete commands.
Key:
O
M
X
R
U
a

= optional
= mandatory
= implementation requirements are defined in
the reference
= read command
= unmap command

V
= verify command
W
= write command
Z
= other command
PI
= protection information
LBACT= logical block access command type
(see 4.2.2)

If a command is defined by a combination of operation code and service action, then the operation
code value is shown preceding a slash and the service action value is shown after the slash.

5.2 COMPARE AND WRITE command


The COMPARE AND WRITE command (see table 34) requests that the device server perform the following
as an uninterrupted sequence of actions (see 4.27):
1) perform read operations from the specified LBAs;
2) perform a compare operation on only the user data (i.e., not on the protection information) from:
A) the read operations; and
B) the compare instance transferred from the Data-Out Buffer;
3) if the compare operation indicates a match, then perform the following operations:
1) check the protection information, if any, in the write instance transferred from the Data-Out Buffer
based on the contents of the WRPROTECT field as defined in table 109; and

Working Draft SCSI Block Commands 4 (SBC-4)

107

T10/BSR INCITS 506 Revision 3

27 August 2014

2) perform write operations to the LBAs specified by this command using the write instance;
and
4) if the compare operation does not indicate a match, then terminate the command with CHECK
CONDITION status with the sense key set to MISCOMPARE and the additional sense code set to
MISCOMPARE DURING VERIFY OPERATION. In the sense data (see 4.18 and SPC-4) the offset
from the start of the Data-Out Buffer to the first byte of data that was not equal shall be reported in the
INFORMATION field.
The Data-Out Buffer contains two instances of logical block data:
1) the compare instance, in which:
A) the user data is used for the compare operation; and
B) the protection information, if any, is not used;
and
2) the write instance, in which:
A) the user data is used for the write operations; and
B) the protection information, if any, is used for the write operations.

Table 34 COMPARE AND WRITE command


Bit
Byte

OPERATION CODE

1
2

WRPROTECT

DPO

Reserved

FUA

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

13

NUMBER OF LOGICAL BLOCKS

15

(89h)

10

12
14

Reserved

GROUP NUMBER
CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 34 for the
COMPARE AND WRITE command.
See the WRITE (10) command for the definition of the WRPROTECT field.
See the READ (10) command (see 5.11) for the definition of the DPO bit. See the READ (10) command
(see 5.11) for the definition of the FUA bit specifying behavior for the read operations. See the WRITE (10)
command (see 5.33) for the definition of the FUA bit specifying behavior for the write operations.
The LOGICAL BLOCK ADDRESS field specifies the LBA of the first logical block (see 4.5) to be accessed by the
device server (e.g., the first LBA accessed by both a read operation and a write operation). If the specified
LBA exceeds the capacity of the medium, then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
LOGICAL BLOCK ADDRESS OUT OF RANGE.

108

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The NUMBER OF LOGICAL BLOCKS field specifies:


a) the number of contiguous logical blocks on which read operations shall be performed, starting with the
LBA specified by the LOGICAL BLOCK ADDRESS field;
b) the number of contiguous logical blocks that shall be transferred from the Data-Out Buffer for the
compare operation; and
c) if the compare operation indicates a match, then the number of contiguous logical blocks that shall be
transferred from the Data-Out Buffer and on which write operations shall be performed, starting with
the LBA specified by the LOGICAL BLOCK ADDRESS field.
A NUMBER OF LOGICAL BLOCKS field set to zero specifies that no read operations shall be performed, no logical
block data shall be transferred from the Data-Out Buffer, no compare operations shall be performed, and no
write operations shall be performed. This condition shall not be considered an error.
If the specified LBA and the specified number of logical blocks exceed the capacity of the medium (see 4.5),
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS OUT OF RANGE.
If the number of logical blocks exceeds the value in the MAXIMUM COMPARE AND WRITE LENGTH field in the Block
Limits VPD page (see 6.6.4), then the device server shall terminate the command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN
CDB.
See the PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER field.
The CONTROL byte is defined in SAM-5.

5.3 FORMAT UNIT command


5.3.1 FORMAT UNIT command overview

The FORMAT UNIT command (see table 35) requests that the device server format the medium into
application client accessible logical blocks as specified in the number of logical blocks and logical block length
values received in the last mode parameter block descriptor (see 6.5.2) in a MODE SELECT command (see
SPC-4). In addition, the device server may certify the medium and create control structures for the
management of the medium and defects. The degree that the medium is altered by this command is vendor
specific.
If a device server receives a FORMAT UNIT command before receiving a MODE SELECT command with a
mode parameter block descriptor, then the device server shall use the number of logical blocks and logical
block length at which the logical unit is currently formatted (i.e., no change is made to the number of logical
blocks and the logical block length of the logical unit during the format operation).
The device server shall handle any deferred microcode as specified in 4.26.
Before performing the operation specified by this command, the device server shall stop all:
a) enabled power condition timers (see SPC-4):
b) timers for enabled background scan operations (see 4.24); and
c) timers or counters enabled for device-specific background functions.
After the operation is complete, the device server shall reinitialize and restart all enabled timers and counters
for power conditions and background functions.
While performing a format operation, the device server shall:
a) process commands already in a task set when a FORMAT UNIT command is received in a vendor
specific manner;
b) process an INQUIRY command by returning parameter data based on the condition of the logical unit
before beginning the FORMAT UNIT command (i.e., INQUIRY data shall not change until after
successful completion of a format operation):

Working Draft SCSI Block Commands 4 (SBC-4)

109

T10/BSR INCITS 506 Revision 3

27 August 2014

c) process a REQUEST SENSE command by returning parameter data containing sense data with the
sense key set to NOT READY, the additional sense code set to LOGICAL UNIT NOT READY,
FORMAT IN PROGRESS, and the PROGRESS INDICATION field in the sense data (see SPC-4) set to
indicate the progress of the format operation;
d) process REPORT LUNS commands;
e) terminate all commands, except INQUIRY commands, REPORT LUNS commands, and REQUEST
SENSE commands, with CHECK CONDITION status with the sense key set to NOT READY and the
additional sense code set to LOGICAL UNIT NOT READY, FORMAT IN PROGRESS; and
f) remove all Background Scan Results log parameters (see 6.4.2.3) from the Background Scan Results
log page, if supported, and remove all Pending Defect log parameters (see 6.4.6.3) from the Pending
Defects log page, if supported.
NOTE 5 - The progress indication is available to the application client during a format operation as a
means to determine the logical units format progress.

The simplest form of the FORMAT UNIT command (i.e., a FORMAT UNIT command with no parameter data)
accomplishes medium formatting with little application client control over medium defect management. The
device server implementation determines the degree of medium defect management that is to be performed.
Additional forms of this command increase the application client's control over medium defect management
(see 4.13). The application client may specify:
a) that the device server clear the existing GLIST;
b) a list of address descriptors that the device server adds to the GLIST;
c) that the device server enable a certification operation that adds address descriptors for physical
blocks with medium defects discovered during the certification operation to the GLIST; and
d) the behavior of the device server if it is not able to access the PLIST or GLIST or determine whether
one or both of them exists.
Following a successful format operation:
a) if the logical unit is fully provisioned (i.e., the LBPME bit in the READ CAPACITY (16) parameter data is
set to zero), then all LBAs in the logical unit are mapped (see 4.7.2); or
b) if the logical unit supports logical block provisioning management (i.e., the LBPME bit is set to one),
then:
A) if the LBPRZ bit in the READ CAPACITY (16) parameter data is set to zero, then each LBA in the
logical unit shall be either:
a) mapped, if an initialization pattern was specified that does not match the vendor-specific data
returned by a read command for an unmapped LBA (see 4.7.4.5); or
b) unmapped (see 4.7.3.2 and 4.7.3.3), if no initialization pattern was specified or an
initialization pattern was specified that matches the vendor-specific data returned by a read
command for an unmapped LBA (see 4.7.4.5); and
B) if the LBPRZ bit is set to one, then each LBA in the logical unit:
a) shall be mapped, if the format operation did not initialize the user data to all zeroes for the
logical block referenced by that LBA;
b) shall be unmapped (see 4.7.3.2 and 4.7.3.3), if the format operation initialized the user data
to all zeroes for the logical blocks referenced by all valid LBAs in the logical unit; or
c) may be unmapped (see 4.7.3.2 and 4.7.3.3), if the format operation initialized the user data to
all zeroes for the logical block referenced by that LBA, and the format operation did not
initialize the user data to all zeroes for the logical blocks referenced by all valid LBAs in the
logical unit.

110

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 35 defines the FORMAT UNIT command.

Table 35 FORMAT UNIT command


Bit
Byte

0
1
2

OPERATION CODE
FMTPINFO

LONGLIST

FMTDATA

(04h)

CMPLST

DEFECT LIST FORMAT

Vendor specific

3
4
5

Obsolete
CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 35 for the FORMAT
UNIT command.
The combination (see table 40) of the format protection information (FMTPINFO) field and the PROTECTION FIELD
USAGE field in the parameter list header (see 5.3.2.2) specifies whether or not the device server enables or
disables the use of protection information.
A LONGLIST bit set to zero specifies that the parameter list, if any, contains a short parameter list header as
defined in table 38. A LONGLIST bit set to one specifies that the parameter list, if any, contains a long parameter
list header as defined in table 39. If the FMTDATA bit is set to zero, then the LONGLIST bit shall be ignored.
A format data (FMTDATA) bit set to one specifies that the FORMAT UNIT parameter list (see 5.3.2) shall be
transferred from the Data-Out Buffer. A FMTDATA bit set to zero specifies that no parameter list be transferred
from the Data-Out Buffer. If the FMTDATA bit is set to zero and the FMTPINFO field is not set to zero, then the
device server shall terminate the command with CHECK CONDITION status with the sense key set to
ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
Following a successful format operation, the PROT_EN bit and the P_TYPE field in the READ CAPACITY (16)
parameter data (see 5.16.2) indicate the type of protection currently in effect on the logical unit.
If protection information is written during a format operation (i.e., the FMTPINFO field is set to a value greater
than zero), then protection information shall be written to a default value of FFFF_FFFF_FFFF_FFFFh.
A complete list (CMPLST) bit set to zero specifies that the device server shall add the defect list included in the
FORMAT UNIT parameter list to the existing GLIST (see 4.13). A CMPLST bit set to one specifies that the
device server shall replace the existing GLIST with the defect list, if any, included in the FORMAT UNIT
parameter list.
If the FMTDATA bit is set to zero, then the CMPLST bit shall be ignored.
If the FMTDATA bit is set to one, then the DEFECT LIST FORMAT field specifies the format of the address
descriptors in the defect list in the FORMAT UNIT parameter list.

Working Draft SCSI Block Commands 4 (SBC-4)

111

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 36 defines support requirements for address descriptors based on the combinations of the FMTDATA bit,
the CMPLST bit, the DEFECT LIST FORMAT field, and the DEFECT LIST LENGTH field.

Table 36 FORMAT UNIT command address descriptor support requirements


Field in the FORMAT UNIT CDB

DEFECT
LIST

FMTDATA CMPLST DEFECT LIST FORMAT

any
0
1
0

Either:
a) 000b (i.e., short block address
descriptor)(see 6.2.2);
b) 001b (i.e., extended bytes from index
address descriptor)(see 6.2.3);
c) 010b (i.e., extended physical sector
address descriptor)(see 6.2.4);
d) 011b (i.e., long block address
descriptor)(see 6.2.5);
e) 100b (i.e., bytes from index address
descriptor)(see 6.2.6); or
f) 101b (i.e., physical sector address
descriptor)(see 6.2.7)

110b (i.e., vendor specific)


1
All other combinations

d
e

Support

Comments

Vendor specific
defect information

See b and d

See b and e

See c and d

See c and e

Zero

See b and d

Non-zero

See c and d

Zero

See b and e

Non-zero

See c and e

Not
available

000b

a
b
c

LENGTH

Zero

Non-zero

Reserved

This field is in the parameter list header.


No defect list is included in the parameter list.
A defect list is included in the parameter list.
The device server retains the existing GLIST.
The device server discards the existing GLIST.

The CONTROL byte is defined in SAM-5.

112

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.3.2 FORMAT UNIT parameter list


5.3.2.1 FORMAT UNIT parameter list overview

Table 37 defines the FORMAT UNIT parameter list.

Table 37 FORMAT UNIT parameter list


Bit
Byte

Parameter list header (see table 38 or table 39 in 5.3.2.2)


Initialization pattern descriptor (if any) (see table 41 in 5.3.2.3)
Defect list (if any)

The parameter list header is defined in 5.3.2.2.


The initialization pattern descriptor, if any, is defined in 5.3.2.3.
The defect list, if any, contains address descriptors (see 6.2) each specifying a location on the medium to
which the device server shall not assign LBAs. The device server shall maintain the current logical block to
physical block alignment (see 4.6) for logical blocks not specified in the defect list.
Short block format address descriptors and long block format address descriptors should be in ascending
order. Bytes from index format address descriptors and physical sector format address descriptors shall be in
ascending order. If the address descriptors are not in the required order, then the device server may terminate
the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST.
5.3.2.2 Parameter list header

The parameter list headers (see table 38 and table 39) provide several optional format control parameters. If
the application client requests a function that is not implemented by the device server, then the device server
shall terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST
and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the LONGLIST bit is set to zero in the FORMAT UNIT CDB, then the short parameter list header (see table 38)
is used.

Table 38 Short parameter list header


Bit
Byte

2
3

Reserved

0
1

DPRY

(MSB)

DCRT

PROTECTION FIELD USAGE

Format options bits

FOV

STPF

IP

DEFECT LIST LENGTH

Working Draft SCSI Block Commands 4 (SBC-4)

Obsolete

IMMED

Vendor
specific

(LSB)
113

T10/BSR INCITS 506 Revision 3

27 August 2014

If the LONGLIST bit is set to one in the FORMAT UNIT CDB, then the long parameter list header (see table 39)
is used.

Table 39 Long parameter list header


Bit
Byte

DPRY

DCRT

PROTECTION FIELD USAGE

STPF

Obsolete

IP

IMMED

Vendor
specific

Reserved
P_I_INFORMATION

114

Format options bits

FOV

2
4

Reserved

0
1

PROTECTION INTERVAL EXPONENT

(MSB)
DEFECT LIST LENGTH

(LSB)

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The combination (see table 40) of the PROTECTION FIELD USAGE field and the FMTPINFO field (see 5.3.1)
specifies the requested protection type (see 4.22.2).

Table 40 FMTPINFO field and PROTECTION FIELD USAGE field (part 1 of 2)


Fields indicated by
the device server
SPT a

PROTECT b

Fields specified by the


application client
FMTPINFO

xxxb

000b
>000b

Illegal e

01b

xxxb

Illegal f

1xb

xxxb

Illegal f

000b

The logical unit shall be formatted to type 0


protection c (see 4.22.2.2) resulting in the PROT_EN
bit d being set to zero and the P_TYPE field d being set
to 000b.

>000b

Illegal e

xxxb

xxxb

Illegal f

000b

The logical unit shall be formatted to type 1


protection g (see 4.22.2.3) resulting in the PROT_EN
bit d being set to one and the P_TYPE field d being set
to 000b.

>000b

Illegal e

FIELD USAGE

The logical unit shall be formatted to type 0


protection c (see 4.22.2.2) resulting in the PROT_EN
bit d being set to zero and the P_TYPE field d being set
to 000b.

00b
xxxb

Description

PROTECTION

00b

01b

000b
001b
011b
111b

010b
100b
101b

10b

xxxb

Illegal f

000b

11b

xxxb

Illegal f

a
b
c
d
e
f
g

10b

See the Extended INQUIRY Data VPD page (see SPC-4) for the definition of the SPT field.
See the standard INQUIRY data (see SPC-4) for the definition of the PROTECT bit.
The device server shall format the medium to the logical block length specified in the mode parameter
block descriptor of the mode parameter header (see SPC-4).
See the READ CAPACITY (16) parameter data (see 5.16.2) for the definition of the PROT_EN bit and
P_TYPE field.
The device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
The device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
The device server shall format the medium to the logical block length specified in the mode parameter
block descriptor of the mode parameter header plus eight bytes for each protection information interval
(e.g., if the logical block length is 2 048 and the PROTECTION INTERVAL EXPONENT field set to two, then
there are four 512 byte protection information intervals each followed by eight bytes of protection
information resulting in a formatted logical block length of 2 080 bytes). Following a successful format
operation, the PROT_EN bit in the READ CAPACITY (16) parameter data (see 5.16.2) indicates whether
protection information (see 4.22) is enabled.

Working Draft SCSI Block Commands 4 (SBC-4)

115

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 40 FMTPINFO field and PROTECTION FIELD USAGE field (part 2 of 2)


Fields indicated by
the device server
SPT

PROTECT

Fields specified by the


application client
FMTPINFO

Description

PROTECTION
FIELD USAGE

001b
010b
101b
111b

11b

000b

The logical unit shall be formatted to type 2


protection g (see 4.22.2.4) resulting in the PROT_EN
bit d being set to one and the P_TYPE field d being set
to 001b.

001b
010b

11b

>000b

Illegal e

011b
100b

11b

000b

Illegal e

001b

The logical unit shall be formatted to type 3


protection. g (see 4.22.2.5) resulting in the PROT_EN
bit d being set to one and the P_TYPE field d being set
to 010b.

>001b

Illegal e

011b
100b
101b
111b

110b

a
b
c
d
e
f
g

11b

10b
11b

xxxb

Reserved

See the Extended INQUIRY Data VPD page (see SPC-4) for the definition of the SPT field.
See the standard INQUIRY data (see SPC-4) for the definition of the PROTECT bit.
The device server shall format the medium to the logical block length specified in the mode parameter
block descriptor of the mode parameter header (see SPC-4).
See the READ CAPACITY (16) parameter data (see 5.16.2) for the definition of the PROT_EN bit and
P_TYPE field.
The device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
The device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
The device server shall format the medium to the logical block length specified in the mode parameter
block descriptor of the mode parameter header plus eight bytes for each protection information interval
(e.g., if the logical block length is 2 048 and the PROTECTION INTERVAL EXPONENT field set to two, then
there are four 512 byte protection information intervals each followed by eight bytes of protection
information resulting in a formatted logical block length of 2 080 bytes). Following a successful format
operation, the PROT_EN bit in the READ CAPACITY (16) parameter data (see 5.16.2) indicates whether
protection information (see 4.22) is enabled.

A format options valid (FOV) bit set to zero specifies that the device server shall use its default settings for the
functionality represented by the DPRY bit, the DCRT bit, the STPF bit, and IP bit (i.e., the format options bits). If
the FOV bit is set to zero, then the application client should set each of the format options bits to zero. If the
FOV bit is set to zero, and any of the format options bits are not set to zero, then the device server shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN PARAMETER LIST.
A FOV bit set to one specifies that the device server shall process the format options bits as follows:
a) a disable primary (DPRY) bit:
A) set to zero specifies that the device server shall not assign LBAs to parts of the medium identified
as defective in the PLIST; or
B) set to one specifies that the device server shall not use the PLIST to identify defective areas of
the medium, and the PLIST shall not be deleted;
116

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

b) a disable certification (DCRT) bit:


A) set to zero specifies that the device server shall perform a vendor specific medium certification
operation and add address descriptors for defects that it detects during the certification operation
to the GLIST; or
B) set to one specifies that the device server shall not perform any vendor specific medium certification process or format verification operation;
c) the stop format (STPF) bit controls the behavior of the device server if the device server has been
requested to use the PLIST (i.e., the DPRY bit is set to zero) or the GLIST (i.e., the CMPLST bit is set to
zero) and one or more of the following occurs:
A) list locate error: the device server is not able to locate a specified defect list or determine
whether a specified defect list exists; or
B) list access error: the device server encounters an error while accessing a specified defect list;
d) a STPF bit set to zero specifies that:
A) if a list locate error or a list access error occurs, then the device server shall continue to process
the FORMAT UNIT command; and
B) after the format operation is complete, if:
a) a list locate error and a list access error both occurred, then the device server shall terminate
the FORMAT UNIT command with CHECK CONDITION status at the completion of the
command with the sense key set to RECOVERED ERROR and the additional sense code set
to DEFECT LIST NOT FOUND or DEFECT LIST ERROR;
b) a list locate error occurred and a list access error did not occur, then the device server shall
terminate the FORMAT UNIT command with CHECK CONDITION status with the sense key
set to RECOVERED ERROR with the additional sense code set to DEFECT LIST NOT
FOUND; and
c) a list access error occurred and a list locate error did not occur, then the device server shall
terminate the FORMAT UNIT command with CHECK CONDITION status with the sense key
set to RECOVERED ERROR with the additional sense code set to DEFECT LIST ERROR;
e) a STPF bit set to one specifies that:
A) if a list locate error occurs, then the device server shall terminate the FORMAT UNIT command
with CHECK CONDITION status with the sense key set to MEDIUM ERROR and the additional
sense code set to either DEFECT LIST NOT FOUND; or
B) if a list access error occurs, then the device server shall terminate the FORMAT UNIT command
with CHECK CONDITION status with the sense key set to MEDIUM ERROR with the additional
sense code set to DEFECT LIST ERROR;
and
f)

an initialization pattern (IP) bit:


A) set to zero specifies that an initialization pattern descriptor (see 5.3.2.3) is not included and that
the device server shall use its default initialization pattern; or
B) set to one specifies that:
a) an initialization pattern descriptor is included in the FORMAT UNIT parameter list following
the parameter list header; and
b) if the device server does not support initialization pattern descriptors, then the device server
shall terminate the FORMAT UNIT command with CHECK CONDITION status with the sense
key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN
PARAMETER LIST.

An immediate (IMMED) bit set to zero specifies that the device server shall return status after the format
operation has completed. An IMMED bit set to one specifies that the device server shall return status after the
entire parameter list has been transferred.
The P_I_INFORMATION field, if any (i.e., if the long parameter list header is used), should be set to 0h. If the
P_I_INFORMATION field is not set to zero, then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
INVALID FIELD IN PARAMETER LIST.
For a type 0 or a type 1 protection information request, if the PROTECTION INTERVAL EXPONENT field, if any, is
not set to 0h, then the device server shall terminate the command with CHECK CONDITION status with the

Working Draft SCSI Block Commands 4 (SBC-4)

117

T10/BSR INCITS 506 Revision 3

27 August 2014

sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER
LIST.
For a type 2 protection or a type 3 protection format request, the protection interval exponent determines the
length of user data to be transferred before protection information is transferred (i.e., the protection
information interval).
The protection information interval is calculated as follows:
protection information interval = logical block length 2(protection interval exponent)
where:
logical block length

is the number of bytes of user data in a logical block (see 4.5)

protection interval exponent

is zero if the short parameter list header (see table 38) is used or the
contents of the PROTECTION INTERVAL EXPONENT field if the long parameter list
header (see table 39) is used

If the protection information interval calculates to a value that is not an even number (e.g., 520 23 = 65) or
not a whole number (e.g., 520 24 = 32.5 and 520 210 = 0.508), then the device server shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to INVALID FIELD IN PARAMETER LIST.
The DEFECT LIST LENGTH field specifies the total length in bytes of the defect list (i.e., the address descriptors)
that follow and does not include the length of the initialization pattern descriptor, if any. The formats for the
address descriptor(s) are shown in 6.2.
5.3.2.3 Initialization pattern descriptor

The initialization pattern descriptor specifies that the device server initialize logical blocks to a specified
pattern. The initialization pattern descriptor (see table 41) is transferred to the device server as part of the
FORMAT UNIT parameter list.

Table 41 Initialization pattern descriptor


Bit
Byte
0

Obsolete

1
2
3
4

Reserved

SI

INITIALIZATION PATTERN TYPE

(MSB)

INITIALIZATION PATTERN LENGTH

(n - 3)

(LSB)

INITIALIZATION PATTERN

A security initialize (SI) bit set to one specifies that the device server shall attempt to write the initialization
pattern to all areas of the medium including those that may have been reassigned (i.e., are in a defect list). An
SI bit set to one specifies that the device server shall ignore:
a)
b)
c)
d)
e)
f)

118

the FMTPINFO field;


the FMTDATA bit;
the CMPLIST bit;
the DEFECT LIST FORMAT field;
all the bits and fields in the parameter list header, except the IMMED bit; and
any defect list data.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server shall write the initialization pattern using a security erasure write technique. The security
erasure write technique requirement and procedure is outside the scope of this standard. The device server is
not required to write the initialization pattern over the header and other parts of the medium not previously
accessible to the application client. If the device server is unable to write over any part of the medium that is
currently accessible to the application client or may be made accessible to the application client in the future
(e.g., by clearing the defect list), then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to MEDIUM ERROR and the additional sense code set to the
appropriate value for the condition. The device server shall attempt to rewrite all remaining parts of the
medium even if some parts are not able to be rewritten.
NOTE 6 - The intent of the security erasure write is to render any previous user data unrecoverable by any
analog or digital technique.
NOTE 7 - Migration from the SI bit to the SANITIZE command (see 5.24) is recommended for all
implementations.

An SI bit set to zero specifies that the device server shall initialize the application client accessible part of the
medium. The device server is not required to initialize other areas of the medium. The device server shall
format the medium as defined in the FORMAT UNIT command.
The INITIALIZATION PATTERN TYPE field (see table 42) specifies the type of pattern the device server shall use to
initialize each logical block within the application client accessible part of the medium. All bytes within a logical
block shall be written with the initialization pattern.

Table 42 INITIALIZATION PATTERN TYPE field


Code

Description

00h

Use a default initialization pattern a

01h

Repeat the pattern specified in the INITIALIZATION PATTERN field as required to fill the logical
block b

02h to 7Fh

Reserved

80h to FFh

Vendor specific

If the INITIALIZATION PATTERN LENGTH field is not set to zero, then the device server shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the INITIALIZATION PATTERN LENGTH field is set to zero, then the device server shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST.

The INITIALIZATION PATTERN LENGTH field specifies the number of bytes contained in the INITIALIZATION PATTERN
field. If the initialization pattern length exceeds the current logical block length, then the device server shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN PARAMETER LIST.
The INITIALIZATION PATTERN field specifies the initialization pattern.

Working Draft SCSI Block Commands 4 (SBC-4)

119

T10/BSR INCITS 506 Revision 3

27 August 2014

5.4 GET LBA STATUS command


5.4.1 GET LBA STATUS command overview

The GET LBA STATUS command (see table 43) requests that the device server transfer parameter data
describing the logical block provisioning status (see 4.7) for the specified LBA and zero or more subsequent
LBAs to the Data-In Buffer.
The device server may or may not process this command as an uninterrupted sequence of actions (e.g., if
concurrent operations are occurring that affect the logical block provisioning status, then the returned
parameter data may be inconsistent or out of date).
This command uses the SERVICE ACTION IN (16) CDB format (see A.2).

Table 43 GET LBA STATUS command


Bit
Byte

OPERATION CODE

Reserved

1
2

(MSB)

10

13

(MSB)

(9Eh)
SERVICE ACTION

(12h)

STARTING LOGICAL BLOCK ADDRESS

(LSB)
ALLOCATION LENGTH

(LSB)

14

Reserved

15

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 43 for the GET LBA
STATUS command.
The SERVICE ACTION field is defined in SPC-4 and shall be set to the value shown in table 43 for the GET LBA
STATUS command.
The STARTING LOGICAL BLOCK ADDRESS field specifies the LBA of the first logical block addressed by this
command. If the specified starting LBA exceeds the capacity of the medium (see 4.5), then the device server
shall terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST
and the additional sense code set to LOGICAL BLOCK ADDRESS OUT OF RANGE.
The ALLOCATION LENGTH field is defined in SPC-4. In response to a GET LBA STATUS command, the device
server may send less data to the Data-In Buffer than is specified by the allocation length. If, in response to a
single GET LBA STATUS command, the device server does not send sufficient data to the Data-In Buffer to
satisfy the requirement of the application client, then, to retrieve additional information, the application client
may send additional GET LBA STATUS commands with different starting LBA values.
The CONTROL byte is defined in SAM-5.

120

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.4.2 GET LBA STATUS parameter data


5.4.2.1 GET LBA STATUS parameter data overview

The GET LBA STATUS parameter data (see table 44) contains an eight-byte header followed by one or more
LBA status descriptors.

Table 44 GET LBA STATUS parameter data


Bit
Byte
0

(MSB)
PARAMETER DATA LENGTH

(n - 3)
(LSB)

Reserved
LBA status descriptors

23

LBA status descriptor [first] (see 5.4.2.2)

n - 15

LBA status descriptor [last] (see 5.4.2.2) (if any)

The PARAMETER DATA LENGTH field indicates the number of bytes of parameter data that follow. The value in
the PARAMETER DATA LENGTH field shall be:
a) at least 20 (i.e., the available parameter data shall contain at least one LBA status descriptor); and
b) four added to a multiple of 16 (i.e., the available parameter data shall end on a boundary between
LBA Status descriptors).
Due to processing considerations outside the scope of this standard, two GET LBA STATUS commands with
identical values in all CDB fields may result in two different values in the PARAMETER DATA LENGTH field.
The relationship between the PARAMETER DATA LENGTH field and the ALLOCATION LENGTH field in the CDB is
defined in SPC-4.

Working Draft SCSI Block Commands 4 (SBC-4)

121

T10/BSR INCITS 506 Revision 3

27 August 2014

5.4.2.2 LBA status descriptor

The LBA status descriptor (see table 45) contains LBA status information for one or more LBAs.

Table 45 LBA status descriptor format


Bit

Byte

(MSB)

11

(MSB)

LBA STATUS LOGICAL BLOCK ADDRESS

(LSB)
NUMBER OF LOGICAL BLOCKS

(LSB)
Reserved

12
13

15

PROVISIONING STATUS

Reserved

The LBA STATUS LOGICAL BLOCK ADDRESS field contains the first LBA of the LBA extent for which this descriptor
reports LBA status.
The NUMBER OF LOGICAL BLOCKS field contains the number of logical blocks in that LBA extent. The device
server should return the largest possible value in the NUMBER OF LOGICAL BLOCKS field.
The PROVISIONING STATUS field is defined in table 46.

Table 46 PROVISIONING STATUS field


Code

Description

0h

Each LBA in the LBA extent is mapped (see 4.7.4.6) or has an unknown state.

1h

Each LBA in the LBA extent is deallocated (see 4.7.4.7).

2h

Each LBA in the LBA extent is anchored (see 4.7.4.8).

All others

Reserved

If the logical unit is fully provisioned (see 4.7.2), then the PROVISIONING STATUS field for all LBAs shall be set to
0h (i.e., mapped or unknown).
5.4.2.3 LBA status descriptor relationships

The LBA STATUS LOGICAL BLOCK ADDRESS field in the first LBA status descriptor returned in the GET LBA
STATUS parameter data shall contain the value specified in the STARTING LOGICAL BLOCK ADDRESS field of the
CDB. For subsequent LBA status descriptors, the contents of the LBA STATUS LOGICAL BLOCK ADDRESS field
shall contain the sum of the values in:
a) the LBA STATUS LOGICAL BLOCK ADDRESS field in the previous LBA status descriptor; and
b) the NUMBER OF LOGICAL BLOCKS field in the previous LBA status descriptor.
Adjacent LBA status descriptors may have the same values for the PROVISIONING STATUS field.

122

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.5 ORWRITE (16) command


The ORWRITE (16) command (see table 47) requests that the device server perform an ORWRITE command
set operation (see 4.29.4).

Table 47 ORWRITE (16) command


Bit
Byte

OPERATION CODE

ORPROTECT

(MSB)

10

13

(MSB)

DPO

(8Bh)
Reserved

FUA

LOGICAL BLOCK ADDRESS

(LSB)

14

TRANSFER LENGTH

(LSB)
Reserved

15

GROUP NUMBER
CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 47 for the
ORWRITE (16) command.
See the READ (10) command (see 5.11) for the definition of the FUA bit specifying behavior for read
operations. See the WRITE (10) command (see 5.33) for the definition of the FUA bit specifying behavior for
write operations. See the READ (10) command (see 5.11) for the definition of the DPO bit. See the
PRE-FETCH (10) command (see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field. See the
PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER field.
The TRANSFER LENGTH field specifies the number of contiguous logical blocks of data that are read, transferred
from the Data-Out Buffer, and ORed into a bitmap buffer, starting with the logical block referenced by the LBA
specified by the LOGICAL BLOCK ADDRESS field. If the specified LBA and the specified transfer length exceed
the capacity of the medium (see 4.5), then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
LOGICAL BLOCK ADDRESS OUT OF RANGE. The TRANSFER LENGTH field is constrained by the MAXIMUM
TRANSFER LENGTH field in the Block Limits VPD page (see 6.6.4).
The CONTROL byte is defined in SAM-5.
The device server shall:
a) check protection information from the read operations based on the ORPROTECT field as described in
table 48; and
b) check protection information transferred from the Data-Out Buffer based on the ORPROTECT field as
described in table 49.
The order of the user data and protection information checks and comparisons is vendor specific.

Working Draft SCSI Block Commands 4 (SBC-4)

123

T10/BSR INCITS 506 Revision 3

27 August 2014

The device server shall check the protection information from the read operations based on the ORPROTECT
field as described in table 48. All footnotes for table 48 are at the end of the table.

Table 48 ORPROTECT field - checking protection information from the read operations (part 1 of 3)

Code

Logical unit
formatted with
protection
information

Extended
INQUIRY Data
VPD page bit
value f

Field in
protection
information g

LOGICAL
BLOCK GUARD

000b

Yes i j

LOGICAL
BLOCK
APPLICATION
TAG

No

Yes

Yes

124

=0

No check performed

=1c
=0

=1h

REF_CHK

LOGICAL
BLOCK
APPLICATION
TAG

=0

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
No check performed
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED
No check performed

GRD_CHK

=1

LOGICAL BLOCK GUARD CHECK


FAILED

GRD_CHK

=0

No check performed

APP_CHK

=1c

APP_CHK
REF_CHK

=0

=1h

REF_CHK

=0

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
No check performed
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED
No check performed

Error condition a
No check performed

LOGICAL
BLOCK
APPLICATION
TAG
LOGICAL
BLOCK
REFERENCE
TAG

No

GRD_CHK

No protection information on the medium to check.

LOGICAL
BLOCK GUARD

010b b

LOGICAL BLOCK GUARD CHECK


FAILED

REF_CHK

LOGICAL
BLOCK
REFERENCE
TAG

No

=1

APP_CHK

LOGICAL
BLOCK GUARD

001b
101b b

GRD_CHK

APP_CHK

LOGICAL
BLOCK
REFERENCE
TAG

If check fails d e, additional sense code

APP_CHK

=1c

APP_CHK
REF_CHK

=0

=1h

REF_CHK

=0

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
No check performed
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED
No check performed

Error condition a

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 48 ORPROTECT field - checking protection information from the read operations (part 2 of 3)

Code

011b b

Logical unit
formatted with
protection
information

Yes

No

Field in
protection
information g

Extended
INQUIRY Data
VPD page bit
value f

LOGICAL
BLOCK GUARD

No check performed

LOGICAL
BLOCK
APPLICATION
TAG

No check performed

LOGICAL
BLOCK
REFERENCE
TAG

No check performed

Error condition a
LOGICAL
BLOCK GUARD

100b b

Yes

No

If check fails d e, additional sense code

GRD_CHK

=1

LOGICAL BLOCK GUARD CHECK


FAILED

GRD_CHK

=0

No check performed

LOGICAL
BLOCK
APPLICATION
TAG

No check performed

LOGICAL
BLOCK
REFERENCE
TAG

No check performed

Error condition a

Working Draft SCSI Block Commands 4 (SBC-4)

125

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 48 ORPROTECT field - checking protection information from the read operations (part 3 of 3)

Code

110b to
111b
a

d
e
f
g

126

Logical unit
formatted with
protection
information

Field in
protection
information g

Extended
INQUIRY Data
VPD page bit
value f

If check fails d e, additional sense code

Reserved

If the logical unit supports protection information (see 4.22) and has not been formatted with protection
information, then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the logical unit does not support protection information, then the device server should terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN CDB.
If the device server has knowledge of the contents of the logical block application tag field, then the
device server shall check the logical block application tag. If the ato bit in the Control mode page (see
SPC-4) is set to one, then this knowledge is acquired from:
a) the Application Tag mode page (see 6.5.3), if the atmpe bit in the Control mode page (see SPC-4)
is set to one; or.
b) a method not defined by this standard, if the ATMPE bit is set to zero.
If the device server terminates the command with CHECK CONDITION status, then the device server
shall set the sense key to ABORTED COMMAND.
If multiple errors occur while the device server is processing the command, then the selection by the
device server of which error to report is not defined by this standard.
See the Extended INQUIRY Data VPD page (see SPC-4) for the definitions of the GRD_CHK bit, the
APP_CHK bit, and the REF_CHK bit.
If the device server detects:
a) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, and type 1 protection (see 4.22.2.3) is
enabled; or
b) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, the LOGICAL BLOCK REFERENCE TAG field set to
FFFF_FFFFh, and type 3 protection (see 4.22.2.5) is enabled,
then the device server shall not check any protection information in the associated protection
information interval.
If type 1 protection is enabled, then the device server shall check the logical block reference tag by
comparing it to the lower four bytes of the LBA associated with the logical block. If type 3 protection is
enabled, then the device server shall check each logical block reference tag only if the device server
has knowledge of the contents of the LOGICAL BLOCK REFERENCE TAG field. The method for acquiring this
knowledge is not defined by this standard.
If the RWWP bit in the Control mode page (see SPC-4) is set to one, then the device server shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the DPICZ bit in the Control mode page (see SPC-4) is set to one, and the RWWP bit in the Control
mode page is set to zero, then protection information shall not be checked.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server shall check the protection information transferred from the Data-Out Buffer based on the
ORPROTECT field as described in table 49. All footnotes for table 49 are at the end of the table.

Table 49 ORPROTECT field - checking protection information from the Data-Out Buffer (part 1 of 2)

Code

000b

Logical unit
formatted with
protection
information

Field in
protection
information

001b

No protection information in the Data-Out buffer to check

No

No protection information in the Data-Out buffer to check

Yes

No

010b

Yes

No

011b

Yes

No

100b

Yes

No

LOGICAL BLOCK GUARD CHECK


FAILED

Shall

LOGICAL BLOCK
APPLICATION TAG

Dependent on

LOGICAL BLOCK
REFERENCE TAG

Shall (except
for type 3) i

RWWP

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED

Error condition a
LOGICAL BLOCK
GUARD

If check fails d h, additional sense code

Yes e f g

LOGICAL BLOCK
GUARD

Device server
check

Shall not

LOGICAL BLOCK
APPLICATION TAG

Dependent on

LOGICAL BLOCK
REFERENCE TAG

May i

RWWP

No check performed
LOGICAL BLOCK APPLICATION TAG
CHECK FAILED
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED

Error condition a
LOGICAL BLOCK
GUARD

Shall not

No check performed

LOGICAL BLOCK
APPLICATION TAG

Shall not

No check performed

LOGICAL BLOCK
REFERENCE TAG

Shall not

No check performed

Error condition a
LOGICAL BLOCK GUARD CHECK
FAILED

LOGICAL BLOCK
GUARD

Shall

LOGICAL BLOCK
APPLICATION TAG

Shall not

No check performed

LOGICAL BLOCK
REFERENCE TAG

Shall not

No check performed

Error condition a

Working Draft SCSI Block Commands 4 (SBC-4)

127

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 49 ORPROTECT field - checking protection information from the Data-Out Buffer (part 2 of 2)

Code

101b

Logical unit
formatted with
protection
information

Yes

No
110b to
111b
a

d
e
f

h
i

128

Field in
protection
information

Device server
check

LOGICAL BLOCK
GUARD

Shall

If check fails d h, additional sense code

LOGICAL BLOCK GUARD CHECK


FAILED

LOGICAL BLOCK
APPLICATION TAG

Dependent on

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG

May i

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

RWWP c

Error condition a

Reserved

If a logical unit supports protection information (see 4.22) and has not been formatted with protection
information, then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the logical unit does not support protection information, then the device server should terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN CDB.
If the ATO bit is set to one in the Control mode page (see SPC-4), and the device server has knowledge
of the contents of the LOGICAL BLOCK APPLICATION TAG field, then the device server:
a) may check each logical block application tag if the RWWP bit is set to zero in the Control mode page
(see SPC-4); and
b) shall check each logical block application tag if the RWWP bit is set to one in the Control mode page.
If the ATMPE bit in the Control mode page (see SPC-4) is set to one, then this knowledge is acquired
from the Application Tag mode page. If the ATMPE bit is set to zero, then the method for acquiring this
knowledge is not defined by this standard.
If the device server terminates the command with CHECK CONDITION status, then the device server
shall set the sense key to ABORTED COMMAND.
The device server shall write a generated CRC (see 4.22.4.2) into each LOGICAL BLOCK GUARD field.
If the RWWP bit in the Control mode page (see SPC-4) is set to one, then the device server shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST
and the additional sense code set to INVALID FIELD IN CDB. If the RWWP bit is set to zero, and:
a) type 1 protection is enabled, then the device server shall write the least significant four bytes of
each LBA into the LOGICAL BLOCK REFERENCE TAG field of each of the written logical blocks; or
b) type 3 protection is enabled, then the device server shall write a value of FFFF_FFFFh into the
LOGICAL BLOCK REFERENCE TAG field of each of the written logical blocks.
If the ATO bit is set to one in the Control mode page (see SPC-4), then the device server shall write
FFFFh into each LOGICAL BLOCK APPLICATION TAG field. If the ATO bit is set to zero, then the device
server may write any value into each LOGICAL BLOCK APPLICATION TAG field.
If multiple errors occur while the device server is processing the command, then the selection by the
device server of which error to report is not defined by this standard.
If type 1 protection is enabled, then the device server shall check the logical block reference tag by
comparing it to the lower four bytes of the LBA associated with the logical block. If type 3 protection is
enabled, then the device server may check each logical block reference tag if the ATO bit is set to one in
the Control mode page (see SPC-4), and the device server has knowledge of the contents of the
LOGICAL BLOCK REFERENCE TAG. The method for acquiring this knowledge is not defined by this
standard.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.6 ORWRITE (32) command


The ORWRITE (32) command (see table 50) requests that the device server perform one of the following
ORWRITE command (see 4.29) operations:
a) a change generation and clear operation (see 4.29.3); or
b) a set operation (see 4.29.4).

Table 50 ORWRITE (32) command


Bit
Byte

OPERATION CODE

(7Fh)

CONTROL

Reserved

BMOP

Reserved

PREVIOUS GENERATION PROCESSING

Reserved

Reserved

6
7
8

GROUP NUMBER
ADDITIONAL CDB LENGTH

(MSB)

SERVICE ACTION

9
10

ORPROTECT

DPO

(18h)

(000Eh)
FUA

(LSB)
Reserved

Reserved

11
12

19

(MSB)

20

23

(MSB)

24

27

(MSB)

28

31

(MSB)

LOGICAL BLOCK ADDRESS

(LSB)
EXPECTED

ORWGENERATION
(LSB)

NEW

ORWGENERATION
(LSB)

TRANSFER LENGTH

(LSB)

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 50 for the ORWRITE (32) command.
The CONTROL byte is defined in SAM-5.

Working Draft SCSI Block Commands 4 (SBC-4)

129

T10/BSR INCITS 506 Revision 3

27 August 2014

The bitmap operation (BMOP) field specifies the operation as described in table 51.

Table 51 BMOP field


Code

Description

000b

The device server shall perform a set operation (see 4.29.4), and the contents of the
field and NEW ORWGENERATION field shall be
ignored.

001b

The device server shall perform a change generation and clear operation (see 4.29.3).

All others

PREVIOUS GENERATION PROCESSING

Reserved

The PREVIOUS GENERATION PROCESSING field specifies the policy for performing future set operations that is to
be established in the device server by a successful change generation and clear operation (see 4.29.2.2).
See the ORWRITE (16) command (see 5.5) for the definitions of the FUA bit, the DPO bit, the ORPROTECT field,
the LOGICAL BLOCK ADDRESS field, the TRANSFER LENGTH field, and the GROUP NUMBER field.
The EXPECTED ORWGENERATION field contains a code that is compared with generation codes established and
maintained by the device server.
The NEW ORWGENERATION field specifies the current ORWgeneration code that is to be established in the
device server by a successful change generation and clear operation (see 4.29.3).
The device server shall:
a) check protection information from the read operations based on the ORPROTECT field as described in
table 48; and
b) check protection information transferred from the Data-Out Buffer based on the ORPROTECT field as
described in table 49.
The order of the user data and protection information checks and comparisons is vendor specific.

130

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.7 POPULATE TOKEN command


5.7.1 POPULATE TOKEN command overview

The POPULATE TOKEN command (see table 52) requests that the copy manager (see SPC-4) create a point
in time ROD token that represents the specified logical blocks (see 4.30).
Each logical block represented by the point in time ROD token includes logical block data.

Table 52 POPULATE TOKEN command


Bit
Byte

4
OPERATION CODE

SERVICE ACTION

(83h)

Reserved

(10h)

Reserved

(MSB)

10

13

(MSB)

14

LIST IDENTIFIER

(LSB)
PARAMETER LIST LENGTH

(LSB)
Reserved

15

GROUP NUMBER
CONTROL

The OPERATION CODE field and the SERVICE ACTION field are defined in SPC-4 and shall be set to the values
shown in table 52 for the POPULATE TOKEN command.
The LIST IDENTIFIER field is defined in SPC-4. The list identifier shall be processed as if the LIST ID USAGE field
in the parameter data for an EXTENDED COPY(LID4) command (see SPC-4) is set to 00b.
The PARAMETER LIST LENGTH field specifies the length in bytes of the parameter list that is available to be
transferred from the Data-Out Buffer. If the parameter list length is greater than zero and less than 00000010h
(i.e., 16), then the copy manager shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to PARAMETER LIST LENGTH
ERROR. A PARAMETER LIST LENGTH field set to zero specifies that no data shall be transferred. This shall not
be considered an error.
See the PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER field.
The CONTROL byte is defined in SAM-5.

Working Draft SCSI Block Commands 4 (SBC-4)

131

T10/BSR INCITS 506 Revision 3

27 August 2014

5.7.2 POPULATE TOKEN parameter list

The parameter list for the POPULATE TOKEN command is shown in table 53.

Table 53 POPULATE TOKEN parameter list


Bit
Byte
0

(MSB)

POPULATE TOKEN DATA LENGTH

(n - 1)

(LSB)
RTV

IMMED

Reserved

3
4

(MSB)

11

(MSB)

INACTIVITY TIMEOUT

(LSB)
ROD TYPE

(LSB)

12

Reserved

13
15

Reserved

14

(MSB)

BLOCK DEVICE RANGE DESCRIPTOR LENGTH

(n - 15)

(LSB)

Block device range descriptor list


16

31

Block device range descriptor [first] (see 5.7.3)

n - 15

Block device range descriptor [last] (see 5.7.3) (if any)

The POPULATE TOKEN DATA LENGTH field specifies the length in bytes of the data that is available to be
transferred from the Data-Out Buffer. The populate token data length does not include the number of bytes in
the POPULATE TOKEN DATA LENGTH field. If the POPULATE TOKEN DATA LENGTH field is less than 001Eh (i.e., 30),
then the copy manager shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
A ROD type valid (RTV) bit set to zero specifies that the copy manager may create a ROD token with any point
in time copy ROD type and shall ignore the contents of the ROD TYPE field. An RTV bit set to one specifies that
the copy manager shall use the contents of the ROD TYPE field to create the point in time copy ROD.
The immediate (IMMED) bit specifies when the copy manager shall return status for the POPULATE TOKEN
command. If the IMMED bit is set to zero, then the copy manager shall process the POPULATE TOKEN
command until all specified operations are complete or an error is detected. If the IMMED bit is set to one, then
the copy manager:
1) shall validate the CDB (i.e., detect and report all errors in the CDB);
2) shall transfer all the parameter data to the copy manager;
132

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

3) may validate the parameter data;


4) shall complete the POPULATE TOKEN command with GOOD status; and
5) shall complete performing of all specified operations as a background operation (see SPC-4).
If the INACTIVITY TIMEOUT field is not set to zero, then the INACTIVITY TIMEOUT field specifies the number of
seconds to use for the ROD token inactivity timeout (see SPC-4). If the INACTIVITY TIMEOUT field is set to a
value larger than the value in the MAXIMUM INACTIVITY TIMEOUT field in the Block Device ROD Token Limits
descriptor (see 6.6.7.3), then the copy manager shall terminate the command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN
PARAMETER LIST.
If the INACTIVITY TIMEOUT field is set to zero, then the DEFAULT INACTIVITY TIMEOUT field in the Block Device
ROD Token Limits descriptor (see 6.6.7.3) specifies the number of seconds to use for the ROD token inactivity
timeout (see SPC-4).
If the RTV bit is set to one, then the ROD TYPE field specifies the ROD type (see SPC-4) for creating the point in
time copy ROD token. The copy manager shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN
PARAMETER LIST, if:
a) the copy manager does not support the specified ROD type for use with the POPULATE TOKEN
command; or
b) the ROD TYPE field specifies a ROD type (see SPC-4) that is not a point in time copy ROD.
The BLOCK DEVICE RANGE DESCRIPTOR LENGTH field specifies the length in bytes of the block device range
descriptor list. The block device range descriptor list length should be a multiple of 16. If the block device
range descriptor list length is not a multiple of 16, then the last block device range descriptor is incomplete
and shall be ignored. If the block device range descriptor list length is less than 0010h (i.e.,16), then the copy
manager shall terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If any block device range descriptors in the block device range descriptor list are truncated due to the
parameter list length in the CDB, then those block device range descriptors shall be ignored.
If the number of complete block device range descriptors is larger than the maximum range descriptors value
in the Block Device ROD Token Limits descriptor (see 6.6.7.3), then the copy manager shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to TOO MANY SEGMENT DESCRIPTORS.
If the same LBA is included in more than one block device range descriptor, then the copy manager shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the number of bytes of user data represented by the sum of the contents of the NUMBER OF LOGICAL BLOCKS
fields in all of the complete block device range descriptors is larger than:
a) the MAXIMUM BYTES IN BLOCK ROD field in the block ROD device type specific features descriptor in the
ROD token features third-party copy descriptor in the Third-party Copy VPD page (see SPC-4) and
that field is set to a nonzero value; or
b) the MAXIMUM TOKEN TRANSFER SIZE field in the Block Device ROD Token Limits descriptor (see 6.6.7.3)
and that field is set to a nonzero value,
then the copy manager shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.

Working Draft SCSI Block Commands 4 (SBC-4)

133

T10/BSR INCITS 506 Revision 3

27 August 2014

5.7.3 Block device range descriptor

The block device range descriptor is defined in table 54.

Table 54 Block device range descriptor


Bit
Byte

(MSB)

11

(MSB)

12

15

LOGICAL BLOCK ADDRESS

(LSB)
NUMBER OF LOGICAL BLOCKS

(LSB)
Reserved

The LOGICAL BLOCK ADDRESS field specifies the first LBA on which the copy manager shall operate for this
block device range descriptor.
The NUMBER OF LOGICAL BLOCKS field specifies the number of logical blocks on which the copy manager shall
operate for this block device range descriptor beginning with the LBA specified by the LOGICAL BLOCK ADDRESS
field.
Processing of block device range descriptors with a number of logical blocks that is not a multiple of the
OPTIMAL BLOCK ROD LENGTH GRANULARITY field in the block ROD device type specific features descriptor in the
ROD token features third-party copy descriptor in the Third-party Copy VPD page (see SPC-4) may incur
delays in processing. If the OPTIMAL BLOCK ROD LENGTH GRANULARITY field in the block ROD device type
specific features descriptor in the ROD token features third-party copy descriptor in the Third-party Copy VPD
page is not reported, then the optimal transfer length granularity in the Block Limits VPD page (see 6.6.4) may
indicate the granularity.
For a POPULATE TOKEN command, processing of block device range descriptors where the number of bytes
of user data contained in the number of logical blocks exceeds the OPTIMAL BYTES TO TOKEN PER SEGMENT field
in the block ROD device type specific features descriptor in the ROD token features third-party copy
descriptor in the Third-party Copy VPD page may incur delays in processing.
For a WRITE USING TOKEN command (see 5.48), processing of block device range descriptors where the
number of bytes of user data contained in the number of logical blocks exceeds the OPTIMAL BYTES FROM
TOKEN PER SEGMENT field in the block ROD device type specific features descriptor in the ROD token features
third-party copy descriptor in the Third-party Copy VPD page may incur delays in processing.
If the number of bytes of user data contained in the number of logical blocks is greater than:
1) the value in the MAXIMUM BYTES IN BLOCK ROD field in the block ROD device type specific features
descriptor in the ROD token features third-party copy descriptor in the Third-party Copy VPD page,
and the MAXIMUM BYTES IN BLOCK ROD field is set to a nonzero value; or
2) the value in the MAXIMUM TRANSFER LENGTH field in the Block Limits VPD page (see 6.6.4), the
MAXIMUM TRANSFER LENGTH field is set to a nonzero value, and the MAXIMUM BYTES IN BLOCK ROD field
in the block ROD device type specific features descriptor is not reported,
then the copy manager shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the NUMBER OF LOGICAL BLOCKS field is set to zero, then the copy manager shall perform no operation for this
block device range descriptor. This condition shall not be considered an error.
134

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the specified LBA and the specified number of logical blocks exceed the capacity of the medium (see 4.5),
then the copy manager shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS OUT OF RANGE.

5.8 PRE-FETCH (10) command


The PRE-FETCH (10) command (see table 55) requests that the device server:
a) for any mapped LBAs specified by the command that are not already contained in cache, perform
read medium operations and write cache operations (see 4.15); and
b) for any unmapped LBAs specified by the command, update the volatile cache and/or non-volatile
cache to prevent retrieval of stale data.
No data shall be transferred to the Data-In Buffer.
NOTE 8 - Migration from the PRE-FETCH (10) command to the PRE-FETCH (16) command is
recommended for all implementations.

Table 55 PRE-FETCH (10) command


Bit
Byte

OPERATION CODE

IMMED

Obsolete

(34h)

Reserved

(MSB)

LOGICAL BLOCK ADDRESS

(LSB)
Reserved

(MSB)

7
8

GROUP NUMBER
PREFETCH LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 55 for the
PRE-FETCH (10) command.
An immediate (IMMED) bit set to zero specifies that status shall be returned after the operation is complete. An
bit set to one specifies that the device server shall:

IMMED

a) validate the CDB;


b) if the cache has:
A) sufficient capacity to accept all of the specified logical blocks, then complete the command with
CONDITION MET status; or
B) insufficient capacity to accept all of the specified logical blocks, then complete the command with
GOOD status;
and
c) if one or more of the specified logical blocks are not successfully transferred to the cache for reasons
other than lack of cache capacity, then report a deferred error (see SPC-4).
The LOGICAL BLOCK ADDRESS field specifies the LBA of the first logical block (see 4.5) accessed by this
command.

Working Draft SCSI Block Commands 4 (SBC-4)

135

T10/BSR INCITS 506 Revision 3

27 August 2014

A GROUP NUMBER field set to a non-zero value specifies the group into which attributes associated with the
command should be collected (see 4.23). A GROUP NUMBER field set to zero specifies that any attributes
associated with the command shall not be collected into any group.
The PREFETCH LENGTH field specifies the number of contiguous logical blocks that shall be pre-fetched (i.e.,
transferred to the cache from the medium), starting with the LBA specified by the LOGICAL BLOCK ADDRESS
field. A PREFETCH LENGTH field set to zero specifies that all logical blocks starting with the LBA specified in the
LOGICAL BLOCK ADDRESS field to the last logical block on the medium shall be pre-fetched. Any other value
specifies the number of logical blocks that shall be pre-fetched. If the specified LBA and the specified prefetch
length exceed the capacity of the medium (see 4.5), then the device server shall terminate the command with
CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set
to LOGICAL BLOCK ADDRESS OUT OF RANGE.
The CONTROL byte is defined in SAM-5.
If the IMMED bit is set to zero, and the specified logical blocks were transferred to the cache without error, then
the device server shall complete the command with CONDITION MET status.
If the IMMED bit is set to zero and the cache does not have sufficient capacity to accept all of the specified
logical blocks, then the device server shall transfer to the cache as many of the specified logical blocks that fit.
If these logical blocks are transferred without error, then the device server shall complete the command with
GOOD status.

5.9 PRE-FETCH (16) command


The PRE-FETCH (16) command (see table 56) requests that the device server perform the actions defined for
the PRE-FETCH (10) command (see 5.8).
No data shall be transferred to the Data-In Buffer.

Table 56 PRE-FETCH (16) command


Bit
Byte

(MSB)

10

13

(MSB)

IMMED

Reserved

(90h)

Reserved

15

4
OPERATION CODE

14

LOGICAL BLOCK ADDRESS

(LSB)
PREFETCH LENGTH

(LSB)
Reserved

GROUP NUMBER
CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 56 for the
PRE-FETCH (16) command.
See the PRE-FETCH (10) command (see 5.8) for the definitions of the other fields in this command.

136

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.10 PREVENT ALLOW MEDIUM REMOVAL command


The PREVENT ALLOW MEDIUM REMOVAL command (see table 57) requests that the logical unit enable or
disable the removal of the medium. If medium removal is prevented on any I_T nexus that has access to the
logical unit, then the logical unit shall not allow medium removal.

Table 57 PREVENT ALLOW MEDIUM REMOVAL command


Bit
Byte

OPERATION CODE

Reserved

Reserved

Reserved

(1Eh)

Reserved

PREVENT
CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 57 for the
PREVENT ALLOW MEDIUM REMOVAL command.
Table 58 defines the PREVENT field.

Table 58 PREVENT field


Value

Description

00b
Medium removal is allowed.
01b
Medium removal shall be prevented.
10b to 11b Obsolete
The CONTROL byte is defined in SAM-5.
The prevention of medium removal shall begin when any application client issues a PREVENT ALLOW
MEDIUM REMOVAL command with the PREVENT field set to 01b (i.e., medium removal prevented). The
prevention of medium removal for the logical unit shall no longer be prevented after:
a) one of the following occurs for each I_T nexus through which medium removal had been prevented:
A) receipt of a PREVENT ALLOW MEDIUM REMOVAL command with the PREVENT field set to 00b;
or
B) an I_T nexus loss;
b) a power on;
c) a hard reset; or
d) a logical unit reset.
If possible, the device server shall perform a synchronize cache operation before ending the prevention of
medium removal.
If a persistent reservation or registration is being preempted by a PERSISTENT RESERVE OUT command
with PREEMPT AND ABORT service action (see SPC-4) or PERSISTENT RESERVE OUT command with
CLEAR service action (see SPC-4), then the equivalent of a PREVENT ALLOW MEDIUM REMOVAL
command with the PREVENT field set to 00b shall be processed for each the I_T nexuses associated with the
persistent reservation or registrations being preempted allowing an application client to override the

Working Draft SCSI Block Commands 4 (SBC-4)

137

T10/BSR INCITS 506 Revision 3

27 August 2014

prevention of medium removal function for a SCSI initiator port (e.g., an initiator port is not operating
correctly).
While a prevention of medium removal condition is in effect, the logical unit shall inhibit mechanisms that allow
removal of the medium by an operator.

5.11 READ (10) command


The READ (10) command (see table 59) requests that the device server:
a) perform read operations from the specified LBAs: and
b) transfer the requested logical block data to the Data-In Buffer.
The logical block data transferred to the Data-In Buffer shall include protection information based on the value
in the RDPROTECT field (see table 60) and the medium format.
NOTE 9 - Migration from the READ (10) command to the READ (16) command is recommended for all
implementations.

Table 59 READ (10) command


Bit
Byte

0
RDPROTECT

8
9

DPO

RARC

Obsolete

Obsolete

(28h)

FUA

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

4
OPERATION CODE

1
2

(MSB)

GROUP NUMBER
TRANSFER LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 59 for the
READ (10) command.

138

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server shall check the protection information from the read operations before returning status for
the command based on the RDPROTECT field as described in table 60. All footnotes for table 60 are at the end
of the table.

Table 60 RDPROTECT field (part 1 of 3)

Code

Logical unit
formatted
with
protection
information

Shall device
server
transmit
protection
information?

Field in
protection
information h

LOGICAL BLOCK
GUARD

000b

Yes j

No

No

Yes

No a

If check fails d f,
additional sense code

GRD_CHK

=1

LOGICAL BLOCK
GUARD CHECK FAILED

GRD_CHK

=0

No check performed

=1c

LOGICAL BLOCK
APPLICATION TAG
CHECK FAILED

LOGICAL BLOCK
APPLICATION
TAG

APP_CHK

APP_CHK

=0

No check performed

LOGICAL BLOCK
REFERENCE
TAG

REF_CHK

=1i

LOGICAL BLOCK
REFERENCE TAG
CHECK FAILED

REF_CHK

=0

No check performed

No protection information available to check


LOGICAL BLOCK
GUARD

001b
101b b

Extended
INQUIRY Data
VPD page bit
value g

Yes e

GRD_CHK

=1

LOGICAL BLOCK
GUARD CHECK FAILED

GRD_CHK

=0

No check performed

=1c

LOGICAL BLOCK
APPLICATION TAG
CHECK FAILED

LOGICAL BLOCK
APPLICATION
TAG

APP_CHK

APP_CHK

=0

No check performed

LOGICAL BLOCK
REFERENCE
TAG

REF_CHK

=1i

LOGICAL BLOCK
REFERENCE TAG
CHECK FAILED

REF_CHK

=0

No check performed

No protection information available to transmit to the Data-In Buffer or for


checking

Working Draft SCSI Block Commands 4 (SBC-4)

139

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 60 RDPROTECT field (part 2 of 3)

Code

Logical unit
formatted
with
protection
information

Yes

Shall device
server
transmit
protection
information?

Yes e

Field in
protection
information h

Extended
INQUIRY Data
VPD page bit
value g

LOGICAL BLOCK
GUARD

No check performed

Yes

APP_CHK

APP_CHK

=0

No check performed

LOGICAL BLOCK
REFERENCE
TAG

REF_CHK

=1i

LOGICAL BLOCK
REFERENCE TAG
CHECK FAILED

REF_CHK

=0

No check performed

No protection information available to transmit to the Data-In Buffer or for


checking

Yes e

011b b

No a

LOGICAL BLOCK
GUARD

No check performed

LOGICAL BLOCK
APPLICATION
TAG

No check performed

LOGICAL BLOCK
REFERENCE
TAG

No check performed

No protection information available to transmit to the Data-In Buffer or for


checking
LOGICAL BLOCK
GUARD

Yes
100b b

No a
110b to
111b

140

LOGICAL BLOCK
APPLICATION TAG
CHECK FAILED

LOGICAL BLOCK
APPLICATION
TAG

010b b

No a

=1c

If check fails d f,
additional sense code

Yes e

GRD_CHK

=1

LOGICAL BLOCK
GUARD CHECK FAILED

GRD_CHK

=0

No check performed

LOGICAL BLOCK
APPLICATION
TAG

No check performed

LOGICAL BLOCK
REFERENCE
TAG

No check performed

No protection information available to transmit to the Data-In Buffer or for


checking

Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3


Table 60 RDPROTECT field (part 3 of 3)

Code

d
e
f
g
h

Logical unit
formatted
with
protection
information

Shall device
server
transmit
protection
information?

Field in
protection
information h

Extended
INQUIRY Data
VPD page bit
value g

If check fails d f,
additional sense code

If the logical unit supports protection information (see 4.22) and has not been formatted with protection
information, then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN
CDB.
If the logical unit does not support protection information, then the device server should terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN CDB.
If the device server has knowledge of the contents of the LOGICAL BLOCK APPLICATION TAG field, then the
device server shall check each logical block application tag. If the ATO bit in the Control mode page
(see SPC-4) is set to one, then this knowledge is acquired from:
a) the EXPECTED LOGICAL BLOCK APPLICATION TAG field and the LOGICAL BLOCK APPLICATION TAG MASK
field in the CDB, if a READ (32) command (see 5.14) is received by the device server;
b) the Application Tag mode page (see 6.5.3), if a command other than READ (32) is received by the
device server, and the ATMPE bit in the Control mode page (see SPC-4) is set to one; or
c) a method not defined by this standard, if a command other than READ (32) is received by the
device server, and the ATMPE bit is set to zero.
If the device server terminates the command with CHECK CONDITION status, then the device server
shall set the sense key to ABORTED COMMAND.
The device server shall transmit protection information to the Data-In Buffer.
If multiple errors occur while the device server is processing the command, then the selection by the
device server of which error to report is not defined by this standard.
See the Extended INQUIRY Data VPD page (see SPC-4) for the definitions of the GRD_CHK bit, the
APP_CHK bit, and the REF_CHK bit.
If the device server detects:
a) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, and type 1 protection (see 4.22.2.3) or type 2
protection (see 4.22.2.4) is enabled; or
b) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, the LOGICAL BLOCK REFERENCE TAG field set to
FFFF_FFFFh, and type 3 protection (see 4.22.2.5) is enabled,
then the device server shall not check any protection information in the associated protection
information interval.
If type 1 protection is enabled, then the device server shall check the logical block reference tag by
comparing it to the lower four bytes of the LBA associated with the logical block. If type 2 protection or
type 3 protection is enabled, and the device server has knowledge of the contents of the LOGICAL
BLOCK REFERENCE TAG field, then the device server shall check each logical block reference tag. If type
2 protection is enabled, then this knowledge may be acquired through the EXPECTED INITIAL LOGICAL
BLOCK REFERENCE TAG field in a READ (32) command (see 5.14). If type 3 protection is enabled, then
the method for acquiring this knowledge is not defined by this standard.
If the DPICZ bit in the Control mode page (see SPC-4) is set to one, then protection information shall not
be checked.

A disable page out (DPO) bit set to zero specifies that the retention priority shall be determined by the
RETENTION PRIORITY fields in the Caching mode page (see 6.5.5). A DPO bit set to one specifies that the device
server shall assign the logical blocks accessed by this command the lowest retention priority for being fetched
into or retained by the cache (see 4.15). A DPO bit set to one overrides any retention priority specified in the
Caching mode page. All other aspects of the algorithm implementing the cache replacement strategy are not
defined by this standard.
NOTE 10 - The DPO bit is used to control replacement of logical blocks in the cache when the application
client has information on the future usage of the logical blocks. If the DPO bit is set to one, then the application

Working Draft SCSI Block Commands 4 (SBC-4)

141

T10/BSR INCITS 506 Revision 3

27 August 2014

client is specifying that the logical blocks accessed by the command are not likely to be accessed again in the
near future and are not to be put in the cache nor retained by the cache. If the DPO bit is set to zero, then the
application client is specifying that the logical blocks accessed by this command are likely to be accessed
again in the near future.

A force unit access (FUA) bit set to one specifies that the device server shall read the logical blocks from:
a) the non-volatile cache, if any; or
b) the medium.
If the FUA bit is set to one and a volatile cache contains a more recent version of a logical block than the
non-volatile cache, if any, or the medium, then, before reading the logical block, the device server shall write
the logical block to:
a) the non-volatile cache, if any; or
b) the medium.
An FUA bit set to zero specifies that the device server may read the logical blocks from:
a) the volatile cache, if any;
b) the non-volatile cache, if any; or
c) the medium.
If rebuild assist mode (see 4.20) is supported and not enabled, then the device server shall ignore the rebuild
assist recovery control (RARC) bit. If rebuild assist mode is supported and enabled, then the RARC bit specifies
that the device server shall perform read medium operations as defined in 4.20.3.2 and 4.20.3.3.
If the rebuild assist mode is not supported and the RARC bit is set to one, then the device server should
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN CDB.
See the PRE-FETCH (10) command (see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field.
See the PRE-FETCH (10) command and 4.23 for the definition of the GROUP NUMBER field.
The TRANSFER LENGTH field specifies the number of contiguous logical blocks of data that shall be read and
transferred to the Data-In Buffer, starting with the logical block referenced by the LBA specified by the LOGICAL
BLOCK ADDRESS field. A TRANSFER LENGTH field set to zero specifies that no logical blocks shall be read or
transferred. This condition shall not be considered an error. Any other value specifies the number of logical
blocks that shall be read and transferred. If the specified LBA and the specified transfer length exceed the
capacity of the medium (see 4.5), then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
LOGICAL BLOCK ADDRESS OUT OF RANGE. The TRANSFER LENGTH field is constrained by the MAXIMUM
TRANSFER LENGTH field in the Block Limits VPD page (see 6.6.4).
The CONTROL byte is defined in SAM-5.

5.12 READ (12) command


The READ (12) command (see table 61) requests that the device server perform the actions defined for the
READ (10) command (see 5.11).
NOTE 11 - Migration from the READ (12) command to the READ (16) command is recommended for all
implementations.

142

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 61 READ (12) command


Bit
Byte

OPERATION CODE

RDPROTECT

(MSB)

(MSB)

10

DPO

RARC

Obsolete

Obsolete

(A8h)

FUA

LOGICAL BLOCK ADDRESS

(LSB)
TRANSFER LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

11

GROUP NUMBER

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 61 for the READ
(12) command.
The CONTROL byte is defined in SAM-5.
See the READ (10) command (see 5.11) for the definitions of the other fields in this command.

Working Draft SCSI Block Commands 4 (SBC-4)

143

T10/BSR INCITS 506 Revision 3

27 August 2014

5.13 READ (16) command


The READ (16) command (see table 62) requests that the device server perform the actions defined for the
READ (10) command (see 5.11).

Table 62 READ (16) command


Bit
Byte

OPERATION CODE

RDPROTECT

(MSB)

10

13

(MSB)

14

DPO

RARC

Obsolete

Reserved

(88h)

FUA

LOGICAL BLOCK ADDRESS

(LSB)
TRANSFER LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

15

GROUP NUMBER

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 62 for the
READ (16) command.
The CONTROL byte is defined in SAM-5.
See the READ (10) command (see 5.11) for the definitions of the other fields in this command.

144

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.14 READ (32) command


The READ (32) command (see table 63) requests that the device server perform the actions defined for the
READ (10) command (see 5.11).
The device server shall only process a READ (32) command if type 2 protection is enabled (see 4.22.2.4).

Table 63 READ (32) command


Bit
Byte

OPERATION CODE

CONTROL

Reserved

ADDITIONAL CDB LENGTH

(MSB)

SERVICE ACTION

9
10

RDPROTECT

DPO

12

19

(MSB)

20

23

(MSB)

24

(MSB)

(0009h)
FUA

(LSB)
RARC

Obsolete

Reserved

LOGICAL BLOCK ADDRESS

(LSB)
EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG

(LSB)

25

(MSB)

27
28

31

(18h)

Reserved

11

26

GROUP NUMBER

7
8

(7Fh)

Reserved

EXPECTED LOGICAL BLOCK APPLICATION TAG

LOGICAL BLOCK APPLICATION TAG MASK

(LSB)
(LSB)

(MSB)
TRANSFER LENGTH

(LSB)

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 63 for the READ (32) command.
The CONTROL byte is defined in SAM-5.
See the READ (10) command (see 5.11) for the definitions of the GROUP NUMBER field, the RDPROTECT field,
the DPO bit, the FUA bit, the RARC bit, the LOGICAL BLOCK ADDRESS field, and the TRANSFER LENGTH field.
If checking of the LOGICAL BLOCK REFERENCE TAG field is enabled (see table 60 in 5.11), then the EXPECTED
INITIAL LOGICAL BLOCK REFERENCE TAG field contains the value of the LOGICAL BLOCK REFERENCE TAG field

Working Draft SCSI Block Commands 4 (SBC-4)

145

T10/BSR INCITS 506 Revision 3

27 August 2014

expected in the protection information of the first logical block accessed by the command instead of a value
based on the LBA (see 4.22.3).
If the ATO bit is set to one in the Control mode page (see SPC-4), and checking of the LOGICAL BLOCK
APPLICATION TAG field is enabled (see table 60 in 5.11), then the LOGICAL BLOCK APPLICATION TAG MASK field
contains a value that is a bit mask for enabling the checking of the LOGICAL BLOCK APPLICATION TAG field in
every instance of protection information for each logical block accessed by the command. A LOGICAL BLOCK
APPLICATION TAG MASK field bit set to one enables the checking of the corresponding bit of the EXPECTED
LOGICAL BLOCK APPLICATION TAG field with the corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in
every instance of protection information. A LOGICAL BLOCK APPLICATION TAG MASK field bit set to zero disables
the checking of the corresponding bit of the EXPECTED LOGICAL BLOCK APPLICATION TAG field with the
corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in every instance of protection information.
If the ATO bit is set:
a) to zero; or
b) to one in the Control mode page (see SPC-4), and checking of the LOGICAL BLOCK APPLICATION TAG
field is disabled (see table 60),
then the LOGICAL BLOCK APPLICATION TAG MASK field and the EXPECTED LOGICAL BLOCK APPLICATION TAG field
shall be ignored

5.15 READ CAPACITY (10) command


5.15.1 READ CAPACITY (10) overview

The READ CAPACITY (10) command (see table 64) requests that the device server transfer eight bytes of
parameter data describing the capacity and medium format of the direct access block device to the Data-In
Buffer. This command may be processed as if it has a HEAD OF QUEUE task attribute (see 4.16). If the
logical unit supports protection information (see 4.22) or logical block provisioning management (see 4.7),
then the application client should use the READ CAPACITY (16) command (see 5.16) instead of the READ
CAPACITY (10) command.
NOTE 12 - Migration from the READ CAPACITY (10) command to the READ CAPACITY (16) command is
recommended for all implementations.

Table 64 READ CAPACITY (10) command


Bit
Byte

OPERATION CODE

Reserved

5
6
7
8
9

146

(25h)
Obsolete

Obsolete

Reserved
Reserved

Obsolete

CONTROL

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 64 for the READ
CAPACITY (10) command.
The CONTROL byte is defined in SAM-5.
5.15.2 READ CAPACITY (10) parameter data

The READ CAPACITY (10) parameter data is defined in table 65. Any time the READ CAPACITY (10)
parameter data changes, the device server should establish a unit attention condition as described in 4.10.

Table 65 READ CAPACITY (10) parameter data


Bit
Byte

(MSB)

(MSB)

RETURNED LOGICAL BLOCK ADDRESS

(LSB)
LOGICAL BLOCK LENGTH IN BYTES

(LSB)

The device server shall set the RETURNED LOGICAL BLOCK ADDRESS field to the lower of:
a) the LBA of the last logical block on the direct access block device; or
b) FFFF_FFFFh, if the LBA of the last logical block on the direct access block device is greater than the
maximum value that is able to be specified in the RETURNED LOGICAL BLOCK ADDRESS field.
If the RETURNED LOGICAL BLOCK ADDRESS field is set to FFFF_FFFFh, then the application client should issue a
READ CAPACITY (16) command (see 5.16) to request that the device server transfer the READ
CAPACITY (16) parameter data to the Data-In Buffer.
The LOGICAL BLOCK LENGTH IN BYTES field contains the number of bytes of user data in a logical block.

5.16 READ CAPACITY (16) command


5.16.1 READ CAPACITY (16) command overview

The READ CAPACITY (16) command (see table 66) requests that the device server transfer parameter data
describing the capacity and medium format of the direct access block device to the Data-In Buffer. This
command is mandatory if the logical unit supports protection information (see 4.22) or logical block
provisioning management (see 4.7) and is optional otherwise. This command may be processed as if it has a
HEAD OF QUEUE task attribute (see 4.16).

Working Draft SCSI Block Commands 4 (SBC-4)

147

T10/BSR INCITS 506 Revision 3

27 August 2014

This command uses the SERVICE ACTION IN (16) CDB format (see A.2).

Table 66 READ CAPACITY (16) command


Bit
Byte

4
OPERATION CODE

Reserved

1
2

9
10

13

(9Eh)
SERVICE ACTION

(10h)

Obsolete
(MSB)

14
15

ALLOCATION LENGTH

(LSB)
Reserved

Obsolete

CONTROL

The OPERATION CODE field and SERVICE ACTION field are defined in SPC-4 and shall be set to the values shown
in table 66 for the READ CAPACITY (16) command.
The ALLOCATION LENGTH field is defined in SPC-4.
The CONTROL byte is defined in SAM-5.

148

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.16.2 READ CAPACITY (16) parameter data

The READ CAPACITY (16) parameter data is defined in table 67. Any time the READ CAPACITY (16)
parameter data changes, the device server should establish a unit attention condition as described in 4.10.

Table 67 READ CAPACITY (16) parameter data


Bit
Byte

(MSB)

11

(MSB)

RETURNED LOGICAL BLOCK ADDRESS

(LSB)
LOGICAL BLOCK LENGTH IN BYTES

(LSB)

12

Reserved

13

P_I_EXPONENT

14

LBPME

LBPRZ

(MSB)

15

P_TYPE

PROT_EN

LOGICAL BLOCKS PER PHYSICAL BLOCK


EXPONENT
LOWEST ALIGNED LOGICAL BLOCK ADDRESS

16

31

(LSB)

Reserved

The RETURNED LOGICAL BLOCK ADDRESS field and LOGICAL BLOCK LENGTH IN BYTES field of the READ
CAPACITY (16) parameter data are defined in the READ CAPACITY (10) parameter data (see 5.15). The
maximum value that shall be returned in the RETURNED LOGICAL BLOCK ADDRESS field is
FFFF_FFFF_FFFF_FFFEh.
The protection type (P_TYPE) field and the protection enable (PROT_EN) bit (see table 68) indicate the logical
units current type of protection.

Table 68 P_TYPE field and PROT_EN bit


P_TYPE

PROT_EN

n/a

000b
001b
010b
011b to 111b

Description

The logical unit is formatted to type 0 protection (see 4.22.2.2).


The logical unit is formatted to type 1 protection (see 4.22.2.3).

The logical unit is formatted to type 2 protection (see 4.22.2.4).


The logical unit is formatted to type 3 protection (see 4.22.2.5).
Reserved

The P_I_EXPONENT field may be used to determine the number of protection information intervals placed within
each logical block (see 5.3.2).

Working Draft SCSI Block Commands 4 (SBC-4)

149

T10/BSR INCITS 506 Revision 3

27 August 2014

The number of protection information intervals is calculated as follows:


number of protection information intervals = 2(p_i exponent)
where:
p_i exponent

is the contents of the P_I EXPONENT field.

The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is defined in table 69.

Table 69 LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field


Code

0
n>0
a

Description

One or more physical blocks per logical block a


2n logical blocks per physical block

The number of physical blocks per logical block is not reported.

A logical block provisioning management enabled (LBPME) bit set to one indicates that the logical unit
implements logical block provisioning management (i.e., is resource provisioned or thin provisioned)
(see 4.7.3). An LBPME bit set to zero indicates that the logical unit does not implement logical block
provisioning management (e.g., is fully provisioned (see 4.7.2)).
A logical block provisioning read zeros (LBPRZ) bit set to one indicates that, for read commands specifying an
unmapped LBA (see 4.7.4.5), the device server returns user data set to zero and protection information, if
any, set to FFFF_FFFF_FFFF_FFFFh. An LBPRZ bit set to zero indicates that, for read commands specifying
an unmapped LBA, the device server returns user data set to vendor specific data and protection information,
if any, set to FFFF_FFFF_FFFF_FFFFh.
The LOWEST ALIGNED LOGICAL BLOCK ADDRESS field indicates the LBA of the first logical block that is located at
the beginning of a physical block (see 4.6).
5.17 READ DEFECT DATA (10) command
5.17.1 READ DEFECT DATA (10) command overview

The READ DEFECT DATA (10) command (see table 70) requests that the device server transfer parameter
data (see 5.17.2) containing a four-byte header, the PLIST, and/or the GLIST to the Data-In Buffer.
If the device server is unable to access a specified defect list due to a medium error, then the device server
shall terminate the command with CHECK CONDITION status with the sense key set to MEDIUM ERROR
and the additional sense code set to DEFECT LIST NOT FOUND.
If the device server is unable to access a specified defect list due to an error other than a medium error or
because a specified defect list does not exist, then the device server shall either:
1) terminate the command with CHECK CONDITION status with the sense key set to NO SENSE and
the additional sense code set to DEFECT LIST NOT FOUND; or
2) return only the READ DEFECT DATA parameter data header, with the DEFECT LIST LENGTH field set to
zero.
Device servers may or may not return a defect list until after a successful completion of a FORMAT UNIT
command (see 5.2).
NOTE 13 - Migration from the READ DEFECT DATA (10) command to the READ DEFECT DATA (12)
command is recommended for all implementations.

150

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 70 READ DEFECT DATA (10) command


Bit
Byte

OPERATION CODE

Reserved
Reserved

(37h)

REQ_PLIST REQ_GLIST

DEFECT LIST FORMAT

Reserved
(MSB)

ALLOCATION LENGTH

8
9

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 70 for the READ
DEFECT DATA (10) command.
Table 71 defines the request PLIST (REQ_PLIST) bit and the request GLIST (REQ_GLIST) bit.

Table 71 REQ_PLIST bit and REQ_GLIST bit


REQ_PLIST

REQ_GLIST

Description

The device server shall return only the first four bytes of the READ DEFECT
DATA parameter data (i.e., the parameter data header), with the DEFECT LIST
LENGTH field set to zero.

The device server shall return the READ DEFECT DATA parameter data header
and include the GLIST, if any, in the defect list.

The device server shall return the READ DEFECT DATA parameter
data header and include the PLIST, if any, in the defect list.

The device server shall return the READ DEFECT DATA parameter data header
and include the both the PLIST, if any, and the GLIST, if any, in the defect list.
Whether the PLIST and GLIST are merged or not is vendor specific.

The DEFECT LIST FORMAT field specifies the address descriptor format type (see 6.2) that the device server
should use for the defect list. A device server unable to return the requested address descriptor format shall
return the address descriptors in their default format and indicate that format type in the DEFECT LIST FORMAT
field in the READ DEFECT DATA parameter data header (see 5.17.2 and 5.18.2).
If the requested defect list format and the returned defect list format are not the same, then the device server
shall transfer the defect data and then terminate the command with CHECK CONDITION status with the
sense key set to RECOVERED ERROR and the additional sense code set to DEFECT LIST NOT FOUND.
The ALLOCATION LENGTH field is defined in SPC-4. If the length of the address descriptors that the device
server has to report is greater than the maximum value that is able to be specified by the ALLOCATION LENGTH
field, then the device server shall transfer no data and shall terminate the command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN
CDB.
The CONTROL byte is defined in SAM-5.
Working Draft SCSI Block Commands 4 (SBC-4)

151

T10/BSR INCITS 506 Revision 3

27 August 2014

5.17.2 READ DEFECT DATA (10) parameter data

The READ DEFECT DATA (10) parameter data (see table 72) contains a four-byte header, followed by zero or
more address descriptors.

Table 72 READ DEFECT DATA (10) parameter data


Bit
Byte

Parameter data header


Reserved

Reserved

1
2
3

(MSB)

PLISTV

GLISTV

DEFECT LIST LENGTH

(n - 3)

DEFECT LIST FORMAT

(LSB)

Defect list (if any)


4

Address descriptor(s) (if any)

A PLIST valid (PLISTV) bit set to zero indicates that the defect list does not contain the PLIST. A PLISTV bit set
to one indicates that the defect list contains the PLIST.
A GLIST valid (GLISTV) bit set to zero indicates that the defect list does not contain the GLIST. A GLISTV bit set
to one indicates that the defect list contains the GLIST.
The DEFECT LIST FORMAT field indicates the format of the address descriptors returned in the defect list. This
field is defined in 6.2.
If the device server returns short block format address descriptors (see 6.2.2) or long block format address
descriptors (see 6.2.5), then the address descriptors contain vendor-specific values.
The DEFECT LIST LENGTH field indicates the length in bytes of the defect list. The DEFECT LIST LENGTH is equal to
four or eight times the number of the address descriptors, depending on the format of the returned address
descriptors (see 6.2).
The defect list contains address descriptors (see 6.2).

5.18 READ DEFECT DATA (12) command


5.18.1 READ DEFECT DATA (12) command overview

The READ DEFECT DATA (12) command (see table 73) requests that the device server transfer parameter
data (see 5.18.2) containing a four-byte header, the PLIST, and/or the GLIST to the Data-In Buffer.

152

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

An application client determines the length of the defect list by sending a READ DEFECT DATA (12)
command with an allocation length field set to eight and the address descriptor index field set to 0000_0000h.
The device server returns the defect list header that contains the length of the defect list.

Table 73 READ DEFECT DATA (12) command


Bit
Byte

OPERATION CODE

Reserved

1
2

(MSB)

(MSB)

(B7h)

REQ_PLIST REQ_GLIST

DEFECT LIST FORMAT

ADDRESS DESCRIPTOR INDEX

(LSB)
ALLOCATION LENGTH

(LSB)

10

Reserved

11

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 73 for the READ
DEFECT DATA (12) command.
See the READ DEFECT DATA (10) command (see 5.17) for the definitions of the REQ_PLIST bit, the
bit, and the DEFECT LIST FORMAT field.

REQ_GLIST

The ADDRESS DESCRIPTOR INDEX field specifies the index of the first address descriptor (see 6.2) in the defect
list that the device server shall return. If the ADDRESS DESCRIPTOR INDEX field is set to:
a) a value less than the number of available address descriptors, then the device server shall transfer a
defect list beginning with the address descriptor that is at the ADDRESS DESCRIPTOR INDEX field value
multiplied by the size of the address descriptor; or
b) a value greater than or equal to the number of available address descriptors, then the device server
shall return a zero length defect list.
The ALLOCATION LENGTH field is defined in SPC-4, however if the length of all the address descriptors that are
available is greater than FFFF_FFFFh, then the device server shall transfer the length of address descriptors
specified by the allocation length or the DEFECT LIST LENGTH field value plus eight, whichever is less, and
complete the command with GOOD status.
The CONTROL byte is defined in SAM-5.

Working Draft SCSI Block Commands 4 (SBC-4)

153

T10/BSR INCITS 506 Revision 3

27 August 2014

5.18.2 READ DEFECT DATA (12) parameter data

The READ DEFECT DATA (12) parameter data (see table 74) contains an eight-byte header, followed by zero
or more address descriptors.

Table 74 READ DEFECT DATA (12) parameter data


Bit
Byte

Parameter data header


Reserved

Reserved

1
2

(MSB)

3
4

PLISTV

GLISTV

GENERATION CODE

DEFECT LIST FORMAT

(LSB)

(MSB)
DEFECT LIST LENGTH

(n - 7)
(LSB)

Defect list (if any)


8

Address descriptor(s) (if any)

The GENERATION CODE field is a two-byte counter that shall be incremented by one by the device server every
time the defect list is changed. A GENERATION CODE field set to 0000h indicates the generation code is not
supported. If the GENERATION CODE field is supported, then the GENERATION CODE field shall be initialized to at
least 0001h at power on and the device server shall wrap this field to 0001h as the next increment after
reaching its maximum value (i.e., FFFFh).
Application clients that use the GENERATION CODE field should read this field often enough to ensure that the
contents of this field do not increment a multiple of 65 535 times between readings.
The DEFECT LIST LENGTH field indicates the length in bytes of address descriptors from the beginning address
descriptor specified by the ADDRESS DESCRIPTOR INDEX field to the last address descriptor available to be
returned. A value of FFFF_FFFFh in the DEFECT LIST LENGTH field indicates that more than FFFF_FFFEh
bytes are available.
See the READ DEFECT DATA (10) command (see 5.17) for the definitions of the other fields in the READ
DEFECT DATA (12) parameter data.

154

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.19 READ LONG (10) command


The READ LONG (10) command (see table 75) requests that the device server transfer data from a single
logical block or physical block to the Data-In Buffer. The data transferred during the READ LONG (10)
command is vendor specific, but shall include the following items recorded on the medium:
a) if a logical block is being transferred, then:
A) user data or transformed user data for the logical block;
B) protection information or transformed protection information, if any, for the logical block; and
C) any additional information (e.g., ECC bytes) for all the physical blocks in the logical block;
or
b) if a physical block is being transferred, then:
A) user data or transformed user data for all the logical blocks in the physical block;
B) protection information or transformed protection information, if any, for all the logical blocks in the
physical block; and
C) any additional information (e.g., ECC bytes).
If the additional information contain an ECC, then any other additional bytes that are correctable by ECC
should be included (e.g., a data synchronization mark within the area covered by ECC). It is not required for
the ECC bytes to be at the end of the logical block data. The ECC bytes should be in the same order as they
are on the medium.
If a cache contains a more recent version of the specified logical block or physical block, then the device
server shall write the logical block or physical block to the medium before reading it. The values in the
Read-Write Error Recovery mode page (see 6.5.8) do not apply to this command. The device server may
perform retries while processing this command.
This command uses the SERVICE ACTION IN (16) CDB format (see A.2).
NOTE 14 - Migration from the READ LONG (10) command to the READ LONG (16) command is
recommended for all implementations.

Table 75 READ LONG (10) command


Bit
Byte

PBLOCK

CORRCT

Obsolete

(3Eh)

Reserved
(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

OPERATION CODE

1
2

(MSB)

BYTE TRANSFER LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 75 for the READ
LONG (10) command.
If there is more than one logical block per physical block (i.e., the LOGICAL BLOCKS PER PHYSICAL BLOCK
field in the READ CAPACITY (16) parameter data (see 5.16.2) is set to a non-zero value), then:

EXPONENT

a) the device server shall support the physical block (PBLOCK) bit;
Working Draft SCSI Block Commands 4 (SBC-4)

155

T10/BSR INCITS 506 Revision 3

27 August 2014

b) a PBLOCK bit set to one specifies that the device server shall return the entire physical block containing
the specified logical block; and
c) a PBLOCK bit set to zero specifies that the device server shall return bytes representing only the
specified logical block.
If there are one or more physical blocks per logical block (i.e., the LOGICAL BLOCKS PER PHYSICAL BLOCK
field in the READ CAPACITY (16) parameter data (see 5.16.2) is set to zero), and the PBLOCK bit is
set to one, then the device server shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
EXPONENT

A correct (CORRCT) bit set to zero specifies that a logical block be read without any correction made by the
device server. A CORRCT bit set to zero should result in the device server completing the command with
GOOD status unless data is not transferred for some reason other than that the data is non-correctable. In this
case the device server shall complete or terminate the command with the appropriate status and sense data.
A CORRCT bit set to one specifies that the data be corrected by ECC before being transferred to the Data-In
Buffer.
The LOGICAL BLOCK ADDRESS field specifies an LBA (see 4.5). If the specified LBA exceeds the capacity of the
medium (see 4.5), then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS
OUT OF RANGE.
The BYTE TRANSFER LENGTH field specifies the number of bytes of data that shall be read from the specified
logical block or physical block and transferred to the Data-In Buffer. If the BYTE TRANSFER LENGTH field is not
set to zero and does not match the available data length, then the device server shall terminate the command
with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code
set to INVALID FIELD IN CDB. In the sense data (see 4.18 and SPC-4), the VALID bit shall be set to one and
the ILI bit shall each be set to one, and the INFORMATION field shall be set to the difference (i.e., residue) of the
requested byte transfer length minus the actual available data length in bytes. Negative values shall be
indicated by two's complement notation.
A BYTE TRANSFER LENGTH field set to zero specifies that no bytes shall be read. This condition shall not be
considered an error.
The CONTROL byte is defined in SAM-5.

156

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.20 READ LONG (16) command


The READ LONG (16) command (see table 76) requests that the device server perform the actions defined
for the READ LONG (10) command (see 5.19).

Table 76 READ LONG (16) command


Bit
Byte

OPERATION CODE

Reserved

1
2

(9Eh)
SERVICE ACTION

(11h)

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)

10

Reserved

11
12

(MSB)

BYTE TRANSFER LENGTH

13
14

Reserved

15

(LSB)
PBLOCK

CORRCT

CONTROL

The OPERATION CODE field and SERVICE ACTION field are defined in SPC-4 and shall be set to the values shown
in table 76 for the READ LONG (16) command.
The CONTROL byte is defined in SAM-5.
See the READ LONG (10) command (see 5.19) for the definitions of the other fields in this command.

5.21 REASSIGN BLOCKS command


5.21.1 REASSIGN BLOCKS command overview

The REASSIGN BLOCKS command (see table 77) requests that the device server perform a reassign
operation on one or more LBAs (e.g., LBAs referencing logical blocks on which unrecovered read errors
occurred) to another area on the medium set aside for this purpose and to add the physical blocks containing
those logical blocks to the GLIST. This command shall not alter the contents of the PLIST (see 4.13).
The parameter list provided in the Data-Out Buffer contains a reassign LBA list that contains the LBAs of the
logical blocks to be reassigned. The device server shall reassign the parts of the medium used for each logical
block referenced by an LBA in the reassign LBA list. More than one physical block may be reassigned by each
LBA. If the device server recovers logical block data from the original logical block, then the device server
shall perform a write medium operation to that LBA using the recovered logical block data, which writes to the
logical block referenced by the reassigned LBA.
The device server shall invalidate any of the specified LBAs that are in cache.
If the device server does not recover logical block data in a fully provisioned logical unit (see 4.7.2), then the
device server shall:
a) write vendor specific data as the user data; and

Working Draft SCSI Block Commands 4 (SBC-4)

157

T10/BSR INCITS 506 Revision 3

27 August 2014

b) write a default value of FFFF_FFFF_FFFF_FFFFh as the protection information, if enabled


(see 4.22.2).
If the device server does not recover logical block data in a resource provisioned logical unit (see 4.7.3.2) or a
thin provisioned logical unit (see 4.7.3.3), then the device server shall, for each specified LBA, either:
a) unmap the specified LBA; or
b) perform the following operations:
A) write vendor-specific data as the user data; and
B) write a default value of FFFF_FFFF_FFFF_FFFFh as the protection information, if enabled.
The vendor-specific data written as user data may contain remnants of the original logical block (e.g., partially
or fully recovered user data).
The data in all other logical blocks on the medium shall be preserved.
Specifying an LBA to be reassigned that previously has been reassigned causes the device server to reassign
that LBA again.
If the device server terminates the REASSIGN BLOCKS command with CHECK CONDITION status, and the
sense data COMMAND-SPECIFIC INFORMATION field contains a valid LBA, then the application client should
remove all LBAs from the reassign LBA list prior to the one returned in the COMMAND-SPECIFIC INFORMATION
field. If the sense key is set to MEDIUM ERROR and the INFORMATION field contains the valid LBA, then the
application client should insert that LBA into the reassign LBA list and reissue the REASSIGN BLOCKS
command with the new reassign LBA list. Otherwise, the application client should perform any corrective
action indicated by the sense data and then reissue the REASSIGN BLOCKS command with the new
reassign LBA list.

Table 77 REASSIGN BLOCKS command


Bit
Byte

0
1

OPERATION CODE

Reserved

Reserved

CONTROL

LONGLBA

LONGLIST

(07h)

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 77 for the
REASSIGN BLOCKS command.
A long LBA (LONGLBA) bit set to zero specifies that the reassign LBA list in the REASSIGN BLOCKS
parameter list (see 5.21.2) contains four-byte LBAs. A LONGLBA bit set to one specifies that the reassign LBA
list in the REASSIGN BLOCKS parameter list contains eight-byte LBAs.
A long list (LONGLIST) bit set to zero specifies the REASSIGN BLOCKS short parameter list header
(see table 79) is used. A LONGLIST bit set to one specifies the REASSIGN BLOCKS long parameter list header
(see table 80) is used.
The CONTROL byte is defined in SAM-5.

158

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.21.2 REASSIGN BLOCKS parameter list

The REASSIGN BLOCKS parameter list (see table 78) contains a four-byte parameter list header followed by
a reassign LBA list containing one or more LBAs.

Table 78 REASSIGN BLOCKS parameter list


Bit
Byte

Parameter list header (see table 79 or table 80)


Reassign LBA list (if any)

7 or 11

Reassign LBA [first] (see table 81 or table 82)

n-4 or n-7

Reassign LBA [last] (see table 81 or table 82)

The REASSSIGN BLOCKS short parameter list header is defined in table 79.

Table 79 REASSIGN BLOCKS short parameter list header


Bit
Byte

Reserved

(MSB)

REASSIGN LBA LENGTH

(LSB)

The REASSSIGN BLOCKS long parameter list header is defined in table 80.

Table 80 REASSIGN BLOCKS long parameter list header


Bit
Byte
0

(MSB)
REASSIGN LBA LENGTH

(LSB)

The REASSIGN LBA LENGTH field specifies the total length in bytes of the reassign LBA list. The REASSIGN LBA
LENGTH field does not include the parameter list header length and is equal to:
a) four times the number of LBAs, if the LONGLBA bit in the REASSIGN BLOCKS command CDB bit is set
to zero; or

Working Draft SCSI Block Commands 4 (SBC-4)

159

T10/BSR INCITS 506 Revision 3

27 August 2014

b) eight times the number of LBAs, if the LONGLBA bit is set to one.
The REASSIGN LBA LIST field contains a list of LBAs to be reassigned. The LBAs shall be sorted in ascending
order.
If the LONGLBA bit is set to zero, then table 81 defines the format of the reassigned LBA.

Table 81 Reassign LBA if the LONGLBA bit is set to zero


Bit
Byte

(MSB)

REASSIGN LOGICAL BLOCK ADDRESS

(LSB)

The REASSIGN LOGICAL BLOCK ADDRESS field specifies an LBA to be reassigned.


If the LONGLBA bit is set to one, then table 82 defines the reassign LBA.

Table 82 Reassign LBA if the LONGLBA bit is set to one


Bit
Byte
0

(MSB)
REASSIGN LOGICAL BLOCK ADDRESS

(LSB)

The REASSIGN LOGICAL BLOCK ADDRESS field specifies an LBA to be reassigned.


If a specified LBA exceeds the capacity of the medium (see 4.5), then the device server shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code should be set to LOGICAL BLOCK ADDRESS OUT OF RANGE or may be set to INVALID FIELD
IN PARAMETER LIST.
If the direct access block device has insufficient capacity to reassign all of the specified LBAs, then the device
server shall terminate the command with CHECK CONDITION status with the sense key set to HARDWARE
ERROR and the additional sense code set to NO DEFECT SPARE LOCATION AVAILABLE.
If the direct access block device is unable to complete a REASSIGN BLOCKS command without error, then
the device server shall terminate the command with CHECK CONDITION status with the appropriate sense
data (see 4.18 and SPC-4).
If one or more LBAs are not reassigned, then the device server shall report the first LBA not reassigned in the
COMMAND-SPECIFIC INFORMATION field of the sense data (see SPC-4). If:
a) information about the first LBA not reassigned is not available;
b) all the LBAs have been reassigned; or
c) the first LBA not reassigned does not fit in the COMMAND-SPECIFIC INFORMATION field, then the device
server shall report the following value in the COMMAND-SPECIFIC INFORMATION field of the sense data
(see SPC-4):
A) FFFF_FFFFh if fixed format sense data is being used; or
B) FFFF_FFFF_FFFF_FFFFh if descriptor format sense data is being used.
If the REASSIGN BLOCKS command failed due to an unexpected unrecovered read error that would cause
the loss of data in a logical block not specified in the reassign LBA list, then the LBA of the logical block with
the unrecovered read error is reported in the INFORMATION field of the sense data(see 4.18.1).

160

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.22 RECEIVE ROD TOKEN INFORMATION


5.22.1 RECEIVE ROD TOKEN INFORMATION overview

The RECEIVE ROD TOKEN INFORMATION command (see SPC-4) provides a method for an application
client to receive information about the results of a previous or current block device ROD token operation.
Table 83 shows the operations and a reference to the subclause where each topic is described.

Table 83 RECEIVE ROD TOKEN INFORMATION reference


Command originating
the operation

Command
reference

RECEIVE ROD TOKEN INFORMATION


returned parameter data reference

POPULATE TOKEN

5.7

5.22.2

WRITE USING TOKEN

5.48

5.22.3

5.22.2 RECEIVE ROD TOKEN INFORMATION parameter data for POPULATE TOKEN command

If a RECEIVE ROD TOKEN INFORMATION command (see SPC-4) specifies a list identifier that matches the
list identifier specified in a previous POPULATE TOKEN command (see 5.7) received on the same I_T nexus,
then table 84 shows the parameter data returned by the copy manager.

Working Draft SCSI Block Commands 4 (SBC-4)

161

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 84 RECEIVE ROD TOKEN INFORMATION parameter data for POPULATE TOKEN
Bit
Byte
0

Reserved

(MSB)

(n - 3)

RESPONSE TO SERVICE ACTION

(10h)

COPY OPERATION STATUS


OPERATION COUNTER

(LSB)

ESTIMATED STATUS UPDATE DELAY

(LSB)
EXTENDED COPY COMPLETION STATUS

13

LENGTH OF THE SENSE DATA FIELD

14

(m - 31)

SENSE DATA LENGTH

15

TRANSFER COUNT UNITS

16

23

(MSB)

24

(MSB)

(F1h)

TRANSFER COUNT

(LSB)

25
26

31

SEGMENTS PROCESSED

(0000h)

(LSB)

Reserved

32

m+7

(MSB)

12

m+6

(LSB)
Reserved

m+5

AVAILABLE DATA

m+1

m+4

(MSB)

11

SENSE DATA

(if any)

(MSB)
ROD TOKEN DESCRIPTOR LENGTH

(n - (m + 4))
(LSB)

Restricted (see SPC-4)

ROD TOKEN

(if any)

The AVAILABLE DATA field, the COPY OPERATION STATUS field, the OPERATION COUNTER field, the ESTIMATED
STATUS UPDATE DELAY field, the EXTENDED COPY COMPLETION STATUS field, the LENGTH OF THE SENSE DATA FIELD
field, SENSE DATA LENGTH field, the SENSE DATA field, and the ROD TOKEN field are defined in SPC-4.

162

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The RESPONSE TO SERVICE ACTION field is defined in SPC-4 and shall be set to the value shown in table 84 in
response to a RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER field specifies a
POPULATE TOKEN command.
The TRANSFER COUNT UNITS field is defined in SPC-4 and shall be set to the value shown in table 84 in
response to a RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER field specifies a
POPULATE TOKEN command.
The TRANSFER COUNT field indicates the number of contiguous logical blocks represented by the ROD token
that were read without error starting at the LBA specified in the first block device range descriptor and
including the LBAs described in all complete block device range descriptors of the POPULATE TOKEN
command to which this response applies.
If the value in the TRANSFER COUNT field is not equal to the sum of the contents of the NUMBER OF LOGICAL
fields in all of the complete block device range descriptors of the POPULATE TOKEN command to
which this response applies, then the COPY OPERATION STATUS field shall be set to 3h. Other values in the
COPY OPERATION STATUS field are defined in SPC-4.
BLOCKS

The SEGMENTS PROCESSED field is defined in SPC-4 and shall be set to the value shown in table 84 in
response to a RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER field specifies a
POPULATE TOKEN command.
The ROD TOKEN DESCRIPTOR LENGTH field is defined in SPC-4 and shall be set to the size of the ROD TOKEN
field plus two in response to a RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER
field specifies a POPULATE TOKEN command.

Working Draft SCSI Block Commands 4 (SBC-4)

163

T10/BSR INCITS 506 Revision 3

27 August 2014

5.22.3 RECEIVE ROD TOKEN INFORMATION parameter data for WRITE USING TOKEN command

If a RECEIVE ROD TOKEN INFORMATION command (see SPC-4) specifies a list identifier that matches the
list identifier specified in a previous WRITE USING TOKEN command (see 5.48) received on the same I_T
nexus, then table 85 shows the parameter data returned by the copy manager.

Table 85 RECEIVE ROD TOKEN INFORMATION parameter data for WRITE USING TOKEN
Bit
Byte
0

(MSB)
Reserved

Reserved

(MSB)

7
8

11

AVAILABLE DATA

3
4

(n - 3)

RESPONSE TO SERVICE ACTION

OPERATION COUNTER

EXTENDED COPY COMPLETION STATUS

SENSE DATA LENGTH

15

TRANSFER COUNT UNITS

16

23

(MSB)

24

(MSB)

(LSB)

(LSB)

14

n-3

(11h)

ESTIMATED STATUS UPDATE DELAY

LENGTH OF THE SENSE DATA FIELD

32

n-4

(LSB)

COPY OPERATION STATUS

13

26

31

(MSB)

12

25

((n - 4) - 31)

(F1h)

TRANSFER COUNT

(LSB)
SEGMENTS PROCESSED

(0000h)

(LSB)

Reserved

SENSE DATA

(if any)

Restricted (see SPC-4)

The AVAILABLE DATA field, the COPY OPERATION STATUS field, the OPERATION COUNTER field, the ESTIMATED
STATUS UPDATE DELAY field, the EXTENDED COPY COMPLETION STATUS field, the LENGTH OF THE SENSE DATA FIELD
field, the SENSE DATA LENGTH field, and the SENSE DATA field are defined in SPC-4.
The RESPONSE TO SERVICE ACTION field is defined in SPC-4 and shall be set to the value shown in table 85 in
response to a RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER field specifies a
WRITE USING TOKEN command.

164

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The TRANSFER COUNT UNITS field is defined in SPC-4 and shall be set to the value shown in table 85 in
response to a RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER field specifies a
WRITE USING TOKEN command.
The TRANSFER COUNT field indicates the number of contiguous logical blocks that were written without error
starting with the LBA specified in the first block device range descriptor and including the LBAs specified in all
block device range descriptors of the WRITE USING TOKEN command to which this response applies.
If the value in the TRANSFER COUNT field is not equal to the sum of the contents of the NUMBER OF LOGICAL
fields in all of the complete block device range descriptors of the WRITE USING TOKEN command to
which this response applies, then the COPY OPERATION STATUS field shall be set to 3h. Other values in the
COPY OPERATION STATUS field are defined in SPC-4.
BLOCKS

The SEGMENTS PROCESSED field is defined in SPC-4 and shall be set to the value shown in table 85 in
response to a RECEIVE ROD TOKEN INFORMATION command in which the LIST IDENTIFIER field specifies a
POPULATE TOKEN command.

5.23 REPORT REFERRALS command


5.23.1 REPORT REFERRALS command overview

The REPORT REFERRALS command (see table 86) requests that the device server transfer parameter data
indicating the user data segment(s) on the logical unit and the SCSI target ports through which those user
data segments may be accessed (see 4.28) to the Data-In Buffer. This command shall be supported by a
logical unit that reports in the Extended INQUIRY Data VPD page (see SPC-4) that it supports referrals (i.e.,
the R_SUP bit set to one).
This command uses the SERVICE ACTION IN (16) CDB format (see A.2).

Table 86 REPORT REFERRALS command


Bit
Byte

OPERATION CODE

Reserved

1
2

(MSB)

10

13

(MSB)

14

(9Eh)
SERVICE ACTION

(13h)

LOGICAL BLOCK ADDRESS

(LSB)
ALLOCATION LENGTH

LSB)
Reserved

15

ONE_SEG

CONTROL

The OPERATION CODE field and SERVICE ACTION field are defined in SPC-4 and shall be set to the values shown
in table 86 for the REPORT REFERRALS command.
The LOGICAL BLOCK ADDRESS field specifies an LBA in the first user data segment that the device server shall
report in the REPORT REFERRALS parameter data. If the specified LBA exceeds the capacity of the medium
(see 4.5), then the device server shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS
OUT OF RANGE.

Working Draft SCSI Block Commands 4 (SBC-4)

165

T10/BSR INCITS 506 Revision 3

27 August 2014

The ALLOCATION LENGTH field is defined in SPC-4.


A one segment (ONE_SEG) bit set to zero specifics that the device server shall return information on all user
data segments starting with the user data segment that contains the LBA specified in the LOGICAL BLOCK
ADDRESS field and ending with the user data segment that contains the last LBA of the logical unit. A ONE_SEG
bit set to one specifies the device server shall only return information on the user data segment that contains
the LBA specified in the LOGICAL BLOCK ADDRESS field.
The CONTROL byte is defined in SAM-5.
5.23.2 REPORT REFERRALS parameter data

The REPORT REFERRALS parameter data (see table 87) contains information indicating the user data
segment(s) on the logical unit and the SCSI target port groups though which those user data segments may
be accessed (see 4.28).

Table 87 REPORT REFERRALS parameter data


Bit
Byte

Reserved

1
2

(MSB)

USER DATA SEGMENT REFERRAL DESCRIPTOR LENGTH

(y - 3)

(LSB)

User data segment referral descriptor list


4

4+n

User data segment referral descriptor [first] (if any)

y-m

User data segment referral descriptor [last] (if any)

The USER DATA SEGMENT REFERRAL DESCRIPTOR LENGTH field indicates the number of bytes that follow in the
REPORT REFERRALS parameter data.
The user data segment referral descriptor (see table 17) is defined in the user data segment referral sense
data descriptor (see 4.18.4).

166

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.24 SANITIZE command


5.24.1 SANITIZE command overview

The SANITIZE command (see table 88) requests that the device server perform a sanitize operation
(see 4.11). This device server shall process this command as if it has a HEAD OF QUEUE task attribute
(see 4.16).

Table 88 SANITIZE command


Bit
Byte

0
1

4
OPERATION CODE

IMMED

Reserved

AUSE

(48h)
SERVICE ACTION

6
7

Reserved
(MSB)

PARAMETER LIST LENGTH

LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 88 for the
SANITIZE command.
If the immediate (IMMED) bit is set to zero, then the device server shall return status after the sanitize operation
is completed. If the IMMED bit set to one, then the device server shall return status as soon as the CDB and
parameter data, if any, have been validated. The REQUEST SENSE command may be used to poll for
progress of the sanitize operation regardless of the value of the IMMED bit.
If the allow unrestricted sanitize exit (AUSE) bit is set to one, and the specified sanitize operation fails, then the
device server shall process a subsequent EXIT FAILURE MODE service action as if the previous sanitize
operation had completed without error (see 4.11.3)
If:
a) the AUSE bit is set to zero in the SANITIZE command that requested a sanitize operation;
b) the specified sanitize operation completes with an error; and
c) a subsequent SANITIZE command with the EXIT FAILURE MODE service action is received,
then the device sever shall terminate that subsequent SANITIZE command with CHECK CONDITION status
with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
The SERVICE ACTION field is defined in 5.24.2.
The PARAMETER LIST LENGTH field specifies the length in bytes of the parameter data that is available to be
transferred from the Data-Out Buffer. A PARAMETER LIST LENGTH field set to zero specifies that no data shall be
transferred.
The CONTROL byte is defined in SAM-5.

Working Draft SCSI Block Commands 4 (SBC-4)

167

T10/BSR INCITS 506 Revision 3

27 August 2014

5.24.2 SANITIZE command service actions


5.24.2.1 SANITIZE command service actions overview

The SANITIZE command service actions are defined in table 89. At least one service action shall be
supported if the SANITIZE command is supported. If the service action specified in the CDB is not supported,
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If deferred microcode has been saved and not activated (see SPC-4), then the device sever shall terminate
this command with CHECK CONDITION status with the sense key set to NOT READY and the additional
sense code set to LOGICAL UNIT NOT READY, MICROCODE ACTIVATION REQUIRED.

Table 89 SANITIZE service action codes


Code

Reference

Set to > 0004h and


< (logical block length + 5)

5.24.2.2

Perform a sanitize block


erase operation

Set to 0000h

5.24.2.3

CRYPTOGRAPHIC
ERASE

Perform a sanitize
cryptographic erase
operation

Set to 0000h

5.24.2.4

EXIT FAILURE
MODE

Exit the sanitize failure


mode

Set to 0000h

5.24.2.5

Description

01h

OVERWRITE

Perform a sanitize
overwrite operation

02h

BLOCK ERASE

03h
1Fh
all others
a

PARAMETER LIST LENGTH


a

Name

requirement

Reserved

If the requirement is not met, then the SANITIZE command is terminated with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID
FIELD IN CDB.

5.24.2.2 OVERWRITE service action

The OVERWRITE service action (see table 89) requests that the device server perform a sanitize overwrite
operation (see 4.11).
While performing a sanitize overwrite operation, the device server shall remove all Background Scan Results
log parameters (see 6.4.2.3) from the Background Scan Results log page, if supported, and remove all
Pending Defect log parameters (see 6.4.6.3) from the Pending Defects log page, if supported.

168

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The parameter list format for the OVERWRITE service action is defined in table 90.

Table 90 OVERWRITE service action parameter list


Bit

Byte
0

INVERT

TEST

OVERWRITE COUNT

Reserved

(MSB)

2
3
4

INITIALIZATION PATTERN LENGTH

(n - 3)

LSB)

INITIALIZATION PATTERN

If the INVERT bit is set to zero, then on each overwrite pass:


a) the user data shall be written as specified in the INITIALIZATION PATTERN field; and
b) the protection information, if any, shall be set to FFFF_FFFF_FFFF_FFFFh.
If the INVERT bit is set to one, then the user data and protection information bytes, if any, shall be inverted (i.e.,
each bit XORed with one) between consecutive overwrite passes.
The TEST field is defined in table 91.

Table 91 TEST field


Code

00b
01b to 11b
a

Description

Shall not cause any changes in the defined behavior of the SANITIZE command.
Vendor specific a

Setting the TEST field to one of these values may adversely affect security properties of the
OVERWRITE service action.

The OVERWRITE COUNT field specifies the number of overwrite passes to be performed. The value of 00h is
reserved.
The INITIALIZATION PATTERN LENGTH field specifies the length in bytes of the INITIALIZATION PATTERN field. If the
INITIALIZATION PATTERN LENGTH field is set to zero or a value greater than the logical block length, then the
device server shall terminate the command with CHECK CONDITION status with the sense key set to
ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
The INITIALIZATION PATTERN field specifies the data pattern to be used to write the user data. This data pattern
is repeated as necessary to fill each logical block. For each logical block, the first byte of the user data shall
begin with the first byte of the initialization pattern.
If the INVERT bit is set to one and:
a) the OVERWRITE COUNT field is set to an even number, then the pattern used for the first write pass shall
consist of:
A) the user data set to the inversion of the INITIALIZATION PATTERN data; and
B) the protection information, if any, set to 0000_0000_0000_0000h;
or

Working Draft SCSI Block Commands 4 (SBC-4)

169

T10/BSR INCITS 506 Revision 3

27 August 2014

b) the OVERWRITE COUNT field is set to an odd number, then the pattern used for the first write pass shall
consist of:
A) the user data set to the INITIALIZATION PATTERN data; and
B) the protection information, if any, set to FFFF_FFFF_FFFF_FFFFh.
After a sanitize overwrite operation completes without error:
a) the device server completes read commands for which no other error occurs during processing with
GOOD status and read medium operations return the data written by the sanitize overwrite operation;
and
b) protection information, if any, shall be set to FFFF_FFFF_FFFF_FFFFh in all logical blocks on the
medium.
5.24.2.3 BLOCK ERASE service action

The BLOCK ERASE service action (see table 89) requests that the device server perform a sanitize block
erase operation (see 4.11).
After a sanitize block erase operation completes without error:
a) the device server may terminate commands that request read operations specifying mapped LBAs
(see 4.7.1) based on the setting of the WABEREQ field in the Block Device Characteristics VPD page
(see 6.6.2); and
b) if the logical unit is formatted with protection information, then:
A) the protection information for each mapped LBA may be indeterminate; and
B) if the device server terminates a command that requests read operations specifying mapped
LBAs as a result of a protection information error, then the device server shall terminate that
command with CHECK CONDITION status with the sense key set to ABORTED COMMAND and
the appropriate additional sense code for the condition (e.g., for READ commands, the additional
sense code defined in table 60).
5.24.2.4 CRYPTOGRAPHIC ERASE service action

The CRYPTOGRAPHIC ERASE service action (see table 89) requests that the device server perform a
sanitize cryptographic erase operation (see 4.11).
After a sanitize cryptographic erase operation completes without error:
a) the device server may terminate commands that request read operations specifying mapped LBAs
(see 4.7.1) based on the setting of the WABEREQ field in the Block Device Characteristics VPD page
(see 6.6.2); and
b) if the logical unit is formatted with protection information, then:
A) the protection information for each mapped LBA may be indeterminate; and
B) if the device server terminates a command that requests read operations specifying mapped
LBAs as a result of a protection information error, then the device server shall terminate that
command with CHECK CONDITION status with the sense key set to ABORTED COMMAND and
the appropriate additional sense code for the condition (e.g., for READ commands, the additional
sense code defined in table 60).
5.24.2.5 EXIT FAILURE MODE service action

The EXIT FAILURE MODE service action (see table 89) requests that the device server complete a sanitize
operation which completed with an error as if the sanitize operation completed without an error (see 4.11). If
the most recent sanitize operation, if any, has completed without error, then the EXIT FAILURE MODE service
action completes without error.
After successful completion of a SANITIZE command with the EXIT FAILURE MODE service action:
a) if any LBA is mapped (see 4.7.1), and the logical unit is formatted with protection information, then:
A) the protection information for each mapped LBA may be indeterminate; and

170

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

B) if the device server terminates a command that requests read operations specifying mapped
LBAs as a result of a protection information error, then the device server shall terminate that
command with CHECK CONDITION status with the sense key set to ABORTED COMMAND and
the appropriate additional sense code for the condition (e.g., for READ commands, the additional
sense code defined in table 60).
and
b) the device server should complete reads to unmapped LBAs without error (see 4.7.4.7.1 and
4.7.4.8.1).

5.25 START STOP UNIT command


The START STOP UNIT command (see table 92) requests that the device server change the power condition
of the logical unit (see 4.21) or load or eject the medium. This includes specifying that the device server
enable or disable the direct access block device for medium access operations by controlling power
conditions and timers.
The device server shall handle any deferred microcode as specified in 4.26.

Table 92 START STOP UNIT command


Bit
Byte

OPERATION CODE

Reserved

(1Bh)
IMMED

Reserved

2
3

Reserved

POWER CONDITION

POWER CONDITION MODIFIER

Reserved

NO_FLUSH

LOEJ

START

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 92 for the START
STOP UNIT command.
If the immediate (IMMED) bit is set to zero, then the device server shall return status after the operation is
completed. If the IMMED bit is set to one, then the device server shall return status as soon as the CDB has
been validated.

Working Draft SCSI Block Commands 4 (SBC-4)

171

T10/BSR INCITS 506 Revision 3

27 August 2014

The combinations of values in the POWER CONDITION field and the POWER CONDITION MODIFIER field are defined
in table 93. If the POWER CONDITION field is supported and is set to a value other than 0h, then the device
server shall ignore the START bit and the LOEJ bit.

Table 93 POWER CONDITION and POWER CONDITION MODIFIER field (part 1 of 2)


POWER

POWER

POWER

CONDITION

CONDITION

value

name

0h

START_
VALID

0h

Process the START bit and the LOEJ bit.

1h

ACTIVE

0h

Cause the logical unit to transition to the active power condition. a

0h

Cause the logical unit to transition to the idle_a power condition. a b

1h

Cause the logical unit to transition to the idle_b power condition. a b c

2h

Cause the logical unit to transition to the idle_c power condition. a b d

0h

Cause the logical unit to transition to the standby_z power


condition. a b

1h

Cause the logical unit to transition to the standby_y power


condition. a b

2h

3h

c
d

172

IDLE

CONDITION
MODIFIER

Device server action

value

STANDBY

5h

Obsolete

0h to Fh

7h

LU_
CONTROL

0h

Obsolete
Initialize and start all of the idle condition timers that are enabled
(see SPC-4), and initialize and start all of the standby condition
timers that are enabled (see SPC-4).

Process the following actions:


1) The device server shall comply with any SCSI transport protocol specific power condition transition
restrictions (e.g., the NOTIFY (ENABLE SPINUP) requirement (see SPL-2));
2) the logical unit shall transition to the specified power condition; and
3) the device server shall disable all of the idle condition timers that are enabled (see SPC-4) and
disable all of the standby condition timers that are enabled (see SPC-4) until another START STOP
UNIT command is processed that returns control of the power condition to the logical unit or a logical
unit reset occurs.
If a timer for a background scan operation expires, or a device specific event occurs, then the logical unit
shall not leave this power condition to perform the background function associated with the timer or
event.
The device server shall cause the direct access block device to increase its tolerance of external physical
forces (e.g., causes a device that has movable read/write heads to move those heads to a safe position).
The device server shall cause the direct access block device to increase its tolerance of external physical
forces and reduce its power consumption to use less power than when the logical unit is in the idle_b
power condition (e.g., cause a device that has rotating medium to rotate the medium at a lower
revolutions per minute).
If the specified timer is supported and enabled, then the device server shall:
1) force the specified timer to expire, which may cause the logical unit to transition to the specified
power condition;
2) initialize and start all of the idle condition timers that are enabled (see SPC-4); and
3) initialize and start all of the standby condition timers that are enabled (see SPC-4),
otherwise the device server shall terminate the START STOP UNIT command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID
FIELD IN CDB.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 93 POWER CONDITION and POWER CONDITION MODIFIER field (part 2 of 2)


POWER

POWER

CONDITION

CONDITION

value

name

Ah

Bh

POWER
CONDITION
MODIFIER

value

FORCE_
IDLE_0
FORCE_
STANDBY_0
All other combinations

c
d

Device server action

0h

Force the idle_a condition timer to be initialized to zero. e

1h

Force the idle_b condition timer to be initialized to zero. e

2h

Force the idle_c condition timer to be initialized to zero. e

0h

Force the standby_z condition timer to be initialized to zero. e

1h

Force the standby_y condition timer to be initialized to zero. e


Reserved

Process the following actions:


1) The device server shall comply with any SCSI transport protocol specific power condition transition
restrictions (e.g., the NOTIFY (ENABLE SPINUP) requirement (see SPL-2));
2) the logical unit shall transition to the specified power condition; and
3) the device server shall disable all of the idle condition timers that are enabled (see SPC-4) and
disable all of the standby condition timers that are enabled (see SPC-4) until another START STOP
UNIT command is processed that returns control of the power condition to the logical unit or a logical
unit reset occurs.
If a timer for a background scan operation expires, or a device specific event occurs, then the logical unit
shall not leave this power condition to perform the background function associated with the timer or
event.
The device server shall cause the direct access block device to increase its tolerance of external physical
forces (e.g., causes a device that has movable read/write heads to move those heads to a safe position).
The device server shall cause the direct access block device to increase its tolerance of external physical
forces and reduce its power consumption to use less power than when the logical unit is in the idle_b
power condition (e.g., cause a device that has rotating medium to rotate the medium at a lower
revolutions per minute).
If the specified timer is supported and enabled, then the device server shall:
1) force the specified timer to expire, which may cause the logical unit to transition to the specified
power condition;
2) initialize and start all of the idle condition timers that are enabled (see SPC-4); and
3) initialize and start all of the standby condition timers that are enabled (see SPC-4),
otherwise the device server shall terminate the START STOP UNIT command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID
FIELD IN CDB.

If the START STOP UNIT command specifies a power condition that conflicts with an operation in progress
then, after the START STOP UNIT command completes with GOOD status, the logical unit may not be in the
power condition that was requested by the command.
It is not an error to specify that the logical unit transition to its current power condition.
If no START STOP UNIT command is being processed by the device server, then the device server shall
process any received START STOP UNIT command.
If a START STOP UNIT command is being processed by the device server and a subsequent START STOP
UNIT command for which the CDB is validated requests that the logical unit change to the same power
condition that was specified by the START STOP UNIT command being processed, then the device server
shall process the subsequent command.
If the NO_FLUSH bit is set to zero, then the device server shall write all logical block data in cache that is newer
than logical block data on the medium to the medium (e.g., as if in response to a SYNCHRONIZE CACHE
command (see 5.26 and 5.27) with the LOGICAL BLOCK ADDRESS field set to zero and the NUMBER OF LOGICAL
Working Draft SCSI Block Commands 4 (SBC-4)

173

T10/BSR INCITS 506 Revision 3

27 August 2014

BLOCKS field set to zero) prior to entering into any power condition that prevents accessing the medium (e.g.,
before the rotating medium spindle motor is stopped during transition to the stopped power condition). If the
NO_FLUSH bit is set to one, then the device server should not write any cached logical blocks to the medium
prior to entering into any power condition that prevents accessing the medium.

If the load eject (LOEJ) bit is set to zero and the POWER CONDITION field is set to zero, then the logical unit shall
take no action regarding loading or ejecting the medium. If the LOEJ bit is set to one and the POWER CONDITION
field is set to zero, then the logical unit shall unload the medium if the START bit is set to zero. If the LOEJ bit is
set to one, the POWER CONDITION field is set to zero, and the START bit is set to one, then the logical unit shall
load the medium.
If the START bit is set to zero and the POWER CONDITION field is set to zero, then the device server shall:
a) cause the logical unit to transition to the stopped power condition;
b) stop any idle condition timer that is enabled (see SPC-4); and
c) stop any standby condition timer that is enabled (see SPC-4).
If the START bit set to one and the POWER CONDITION field is set to zero, then the device server shall:
1) comply with requirements defined in SCSI transport protocol standards (e.g., the NOTIFY (ENABLE
SPINUP) requirement (see SPL-2));
2) cause the logical unit to transition to the active power condition;
3) initialize and start any idle condition timer that is enabled; and
4) initialize and start any standby condition timer that is enabled.
The CONTROL byte is defined in SAM-5.

5.26 SYNCHRONIZE CACHE (10) command


The SYNCHRONIZE CACHE (10) command (see table 94) requests that, for each logical block whose logical
block data is in the volatile cache and has not already been written to the non-volatile cache, if any, or the
medium, the device server either:
a) perform a write medium operation to the LBA using the logical block data in volatile cache; or
b) write the logical block to the non-volatile cache, if any.
NOTE 15 - Migration from the SYNCHRONIZE CACHE (10) command to the SYNCHRONIZE CACHE (16)
command is recommended for all implementations.

Table 94 SYNCHRONIZE CACHE (10) command


Bit
Byte

OPERATION CODE

8
9

174

Obsolete

IMMED

Obsolete

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

(35h)

Reserved

1
2

(MSB)

GROUP NUMBER
NUMBER OF LOGICAL BLOCKS

(LSB)

CONTROL

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 94 for the
SYNCHRONIZE CACHE (10) command.
See the PRE-FETCH (10) command (see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field.
See the PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER field.
An immediate (IMMED) bit set to zero specifies that the device server shall not return status until the
synchronize cache operation has been completed. An IMMED bit set to one specifies that the device server
shall return status as soon as the CDB has been validated. If the IMMED bit is set to one, and the device server
does not support the IMMED bit, then the device server shall terminate the command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN
CDB.
If the IMMED bit is set to one and the synchronize cache operation has not completed, then the SYNC_PROG
field in the Caching mode page (see 6.5.5) defines the device server behavior while the synchronize cache
command is being processed.
A NUMBER OF LOGICAL BLOCKS field set to a non-zero value specifies the number of logical blocks that shall be
synchronized, starting with the logical block referenced by the LBA specified by the LOGICAL BLOCK ADDRESS
field. A NUMBER OF LOGICAL BLOCKS field set to zero specifies that all logical blocks starting with the one
referenced by the LBA specified in the LOGICAL BLOCK ADDRESS field to the last logical block on the medium
shall be synchronized. If the specified LBA and the specified number of logical blocks exceed the capacity of
the medium (see 4.5), then the device server shall terminate the command with CHECK CONDITION status
with the sense key set to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK
ADDRESS OUT OF RANGE.
A logical block within the range that is not in cache is not considered an error.
The CONTROL byte is defined in SAM-5.

5.27 SYNCHRONIZE CACHE (16) command


The SYNCHRONIZE CACHE (16) command (see table 95) requests that the device server perform the
actions defined for the SYNCHRONIZE CACHE (10) command (see 5.26).

Table 95 SYNCHRONIZE CACHE (16) command


Bit
Byte

OPERATION CODE

(MSB)

10

13

(MSB)

Obsolete

IMMED

Reserved

(91h)

Reserved

14

LOGICAL BLOCK ADDRESS

(LSB)
NUMBER OF LOGICAL BLOCKS

(LSB)
Reserved

15

GROUP NUMBER
CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 95 for the
SYNCHRONIZE CACHE (16) command.

Working Draft SCSI Block Commands 4 (SBC-4)

175

T10/BSR INCITS 506 Revision 3

27 August 2014

See the SYNCHRONIZE CACHE (10) command (see 5.26) for the definitions of the other fields in this
command.

5.28 UNMAP command


5.28.1 UNMAP command overview

The UNMAP command (see table 96) requests that the device server cause one or more LBAs to be
unmapped (see 4.7.3).

Table 96 UNMAP command


Bit
Byte

OPERATION CODE

Reserved

(42h)
ANCHOR

Reserved
Reserved

6
7

(MSB)

8
9

GROUP NUMBER
PARAMETER LIST LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 96 for the UNMAP
command.
For a thin provisioned logical unit (see 4.7.3.3):
a) an ANCHOR bit set to zero specifies that any LBA on which an unmap operation (see 4.7.3.4) is
performed shall either become deallocated or anchored and should become deallocated; and
b) an ANCHOR bit set to one specifies that any LBA on which an unmap operation is performed shall
become anchored.
For a resource provisioned logical unit (see 4.7.3.2), any LBA on which an unmap operation is performed shall
become anchored (i.e., the command is processed as if the ANCHOR bit is set to one).
If the ANCHOR bit is set to one, and the ANC_SUP bit in the Logical Block Provisioning VPD page (see 6.6.5) is
set to zero, then the device server shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
See the PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER field.
The PARAMETER LIST LENGTH field specifies the length in bytes of the UNMAP parameter list that is available to
be transferred from the Data-Out Buffer. If the parameter list length is greater than zero and less than eight,
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to PARAMETER LIST LENGTH ERROR. A
PARAMETER LIST LENGTH set to zero specifies that no data shall be transferred.
The CONTROL byte is defined in SAM-5.

176

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.28.2 UNMAP parameter list

The UNMAP parameter list (see table 97) contains an UNMAP parameter list header and block descriptors for
LBA extents for which unmap requests (see 4.7.3.4.1) are to be processed by the device server. The LBAs
specified in the block descriptors may contain overlapping LBA extents, and may be in any order.
If the ANCHOR bit in the CDB is set to zero and the logical unit is thin provisioned (see 4.7.3.3), then the logical
block provisioning state for each specified LBA:
a) should become deallocated;
b) may become anchored; or
c) may remain unchanged.
If:
a) the ANCHOR bit in the CDB is set to one and the ANC_SUP bit in the Logical Block Provisioning VPD
page (see 6.6.5) is set to one; or
b) the logical unit is resource provisioned,
then for each specified LBA:
a) if the LBA is mapped, then the LBA shall not become deallocated and:
A) that LBA should become anchored (see 4.7.4.6.3); or
B) the logical block provisioning state of that LBA remains unchanged;
b) if the LBA is deallocated, then that LBA shall become anchored (see 4.7.4.7.3). If a lack of LBA
mapping resources prevents the LBA from becoming anchored, then the device server shall terminate
the command as described in 4.7.3.6; or
c) if the LBA is anchored, then that LBA shall remain anchored.

Table 97 UNMAP parameter list


Bit
Byte
0

(MSB)

1
2
3

(MSB)

UNMAP DATA LENGTH

(n - 1)

UNMAP BLOCK DESCRIPTOR DATA LENGTH

(LSB)
(n - 7)

(LSB)

Reserved
UNMAP block descriptor list (if any)

23

UNMAP block descriptor [first] (see table 98) (if any)

n - 15

UNMAP block descriptor [last] (see table 98) (if any)

The UNMAP DATA LENGTH field specifies the length in bytes of the following data that is available to be
transferred from the Data-Out Buffer. The unmap data length does not include the number of bytes in the
UNMAP DATA LENGTH field.

Working Draft SCSI Block Commands 4 (SBC-4)

177

T10/BSR INCITS 506 Revision 3

27 August 2014

The UNMAP BLOCK DESCRIPTOR DATA LENGTH field specifies the length in bytes of the UNMAP block descriptors
that are available to be transferred from the Data-Out Buffer. The unmap block descriptor data length should
be a multiple of 16. If the unmap block descriptor data length is not a multiple of 16, then the last unmap block
descriptor is incomplete and shall be ignored. If the UNMAP BLOCK DESCRIPTOR DATA LENGTH is set to zero, then
no unmap block descriptors are included in the UNMAP parameter list. This condition shall not be considered
an error.
If any UNMAP block descriptors in the UNMAP block descriptor list are truncated due to the parameter list
length in the CDB, then that UNMAP block descriptor shall be ignored.
Table 98 defines the UNMAP block descriptor.

Table 98 UNMAP block descriptor


Bit
Byte

(MSB)

11

(MSB)

UNMAP LOGICAL BLOCK ADDRESS

(LSB)

12

15

NUMBER OF LOGICAL BLOCKS

(LSB)
Reserved

The UNMAP LOGICAL BLOCK ADDRESS field specifies the first LBA that is requested to be unmapped
(see 4.7.3.4.1) for this UNMAP block descriptor.
The NUMBER OF LOGICAL BLOCKS field specifies the number of LBAs that are requested to be unmapped
beginning with the LBA specified by the UNMAP LOGICAL BLOCK ADDRESS field.
If the NUMBER OF LOGICAL BLOCKS is set to zero, then no LBAs shall be unmapped for this UNMAP block
descriptor. This condition shall not be considered an error.
If the specified LBA and the specified number of logical blocks exceeds the capacity of the medium (see 4.5),
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS OUT OF RANGE.
If the total number of logical blocks specified in the UNMAP block descriptor data exceeds the value indicated
in the MAXIMUM UNMAP LBA COUNT field in the Block Limits VPD page (see 6.6.4) or if the number of UNMAP
block descriptors exceeds the value of the MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT field in the Block Limits
VPD page, then the device server shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER
LIST.

5.29 VERIFY (10) command


The VERIFY (10) command (see table 100) requests that the device server:
1) perform verify operations from the specified LBAs; and
2) if specified, perform a compare operation on:
A) the logical block data transferred from the Data-Out Buffer; and
B) the logical block data from the verify operations.

178

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server may process the LBAs in any order but shall perform this sequence in the specified order
for a given LBA.
The application client uses the BYTCHK field in the CDB to specify the contents of the Data-Out Buffer as
shown in table 99.

Table 99 Data-Out Buffer contents for the VERIFY (10) command


BYTCHK

field

00b

Not used

01b

Logical block data for the number of logical blocks specified in the VERIFICATION LENGTH field

10b

11b
a

Data-Out Buffer contents

Not defined
Logical block data for a single logical block

A BYTCHK field set to 10b is reserved.


NOTE 16 - Migration from the VERIFY (10) command to the VERIFY 16) command is recommended for all
implementations.

Table 100 VERIFY (10) command


Bit
Byte

OPERATION CODE

1
2

VRPROTECT

DPO

(2Fh)

Reserved

BYTCHK

Obsolete

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)

Restricted
for
MMC-6

(MSB)

Reserved

GROUP NUMBER

VERIFICATION LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 100 for the
VERIFY (10) command.
See the READ (10) command (see 5.11) for the definition of the DPO bit. See the PRE-FETCH (10) command
(see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field. See the PRE-FETCH (10) command (see 5.8)
and 4.23 for the definition of the GROUP NUMBER field.
If the byte check (BYTCHK) field is set to 00b, then:
a) no Data-Out Buffer transfer shall occur;
b) for any mapped LBA specified by the command, the device server shall check the protection
information from the verify operation based on the VRPROTECT field as defined in table 101; and
c) for any unmapped LBA specified by the command, the verify operation shall complete without error.

Working Draft SCSI Block Commands 4 (SBC-4)

179

T10/BSR INCITS 506 Revision 3

27 August 2014

If:
a) the BYTCHK field is set to 01b or 11b;
b) the VBULS bit is set to zero in the Block Device Characteristics VPD page (see 6.6.2); and
c) any LBA specified by the command is unmapped (i.e., deallocated or anchored),
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to MISCOMPARE and the additional sense code set to MISCOMPARE VERIFY OF UNMAPPED LBA.
If:
a) the BYTCHK field is set to 01b or 11b; and
b) either:
A) the VBULS bit is set to one in the Block Device Characteristics VPD page; or
B) all LBAs specified by the command are mapped,
then:
a) if the BYTCHK field is set to 01b, then the Data-Out Buffer transfer shall include the number of logical
blocks specified by the VERIFICATION LENGTH field;
b) if the BYTCHK field is set to 11b, then:
A) the Data-Out Buffer transfer shall include one logical block; and
B) the device server shall:
1) duplicate the single logical block, as described in the WRITE SAME command (see 5.45), the
number of times required to satisfy the VERIFICATION LENGTH field; and
2) place the duplicated data in the Data-Out Buffer;
c) the device server shall check the protection information transferred from the Data-Out Buffer based
on the VRPROTECT field as defined in table 103;
d) for any mapped LBA specified by the command, the device server shall perform the verify operation
and check the protection information from the verify operation based on the VRPROTECT field as
defined in table 102;
and
e) the device server shall perform:
A) a compare operation of:
a) user data from the verify operations; and
b) user data from the Data-Out Buffer;
and
B) a compare operation based on the VRPROTECT field as defined in table 104 of:
a) protection information from the verify operations; and
b) protection information from the Data-Out Buffer.
The order of the user data and protection information checks and compare operations is vendor specific.
If a compare operation indicates a miscompare, then the device server shall terminate the command with
CHECK CONDITION status with the sense key set to MISCOMPARE and the additional sense code set to the
appropriate value for the condition.
The VERIFICATION LENGTH field specifies the number of contiguous logical blocks that shall be verified, starting
with the logical block referenced by the LBA specified by the LOGICAL BLOCK ADDRESS field. A VERIFICATION
LENGTH field set to zero specifies that no logical blocks shall be transferred or verified. This condition shall not
be considered an error. If the specified LBA and the specified verification length exceed the capacity of the
medium (see 4.5), then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS
OUT OF RANGE. The VERIFICATION LENGTH field is constrained by the MAXIMUM TRANSFER LENGTH field in the
Block Limits VPD page (see 6.6.4).
If the BYTCHK field is set to 01b, then the VERIFICATION LENGTH field also specifies the number of logical blocks
that the device server shall transfer from the Data-Out Buffer.
The CONTROL byte is defined in SAM-5.

180

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the BYTCHK field is set to 00b, then table 101 defines the checks that the device server shall perform on the
protection information from the verify operations based on the VRPROTECT field. All footnotes for table 101 are
at the end of the table.

Table 101 VRPROTECT field with the BYTCHK field set to 00b checking protection information from
the verify operations (part 1 of 3)

Code

Logical unit
formatted
with
protection
information

Extended
INQUIRY Data
VPD page bit
value f

Field in
protection
information g

LOGICAL
BLOCK GUARD

000b

Yes i

LOGICAL
BLOCK
APPLICATION
TAG

No

Yes

Yes

=0

No check performed

=1c
=0

=1h

REF_CHK

LOGICAL
BLOCK
APPLICATION
TAG

=0

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
No check performed
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED
No check performed

GRD_CHK

=1

LOGICAL BLOCK GUARD CHECK FAILED

GRD_CHK

=0

No check performed

APP_CHK

=1c

APP_CHK
REF_CHK

=0

=1h

REF_CHK

=0

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
No check performed
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED
No check performed

Error condition a
No check performed

LOGICAL
BLOCK
APPLICATION
TAG
LOGICAL
BLOCK
REFERENCE
TAG

No

GRD_CHK

No protection information on the medium to check.

LOGICAL
BLOCK GUARD

010b b

LOGICAL BLOCK GUARD CHECK FAILED

REF_CHK

LOGICAL
BLOCK
REFERENCE
TAG

No

=1

APP_CHK

LOGICAL
BLOCK GUARD

001b
101b b

GRD_CHK

APP_CHK

LOGICAL
BLOCK
REFERENCE
TAG

If check fails d e, additional sense code

APP_CHK

=1c

APP_CHK
REF_CHK

=0

=1h

REF_CHK

=0

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
No check performed
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED
No check performed

Error condition a

Working Draft SCSI Block Commands 4 (SBC-4)

181

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 101 VRPROTECT field with the BYTCHK field set to 00b checking protection information from
the verify operations (part 2 of 3)

Code

011b b

Logical unit
formatted
with
protection
information

Yes

No

Field in
protection
information g

Extended
INQUIRY Data
VPD page bit
value f

LOGICAL
BLOCK GUARD

No check performed

LOGICAL
BLOCK
APPLICATION
TAG

No check performed

LOGICAL
BLOCK
REFERENCE
TAG

No check performed

Error condition a
LOGICAL
BLOCK GUARD

100b b

Yes

No
110b to
111b

182

If check fails d e, additional sense code

GRD_CHK

=1

LOGICAL BLOCK GUARD CHECK FAILED

GRD_CHK

=0

No check performed

LOGICAL
BLOCK
APPLICATION
TAG

No check performed

LOGICAL
BLOCK
REFERENCE
TAG

No check performed

Error condition a

Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 101 VRPROTECT field with the BYTCHK field set to 00b checking protection information from
the verify operations (part 3 of 3)

Code

d
e
f
g

Logical unit
formatted
with
protection
information

Field in
protection
information g

Extended
INQUIRY Data
VPD page bit
value f

If check fails d e, additional sense code

If the logical unit supports protection information (see 4.22) and has not been formatted with protection
information, then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the logical unit does not support protection information, then the device server should terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN CDB.
If the device server has knowledge of the contents of the LOGICAL BLOCK APPLICATION TAG field, then the
device server shall check each logical block application tag. If the ATO bit in the Control mode page (see
SPC-4) is set to one, then this knowledge is acquired from:
a) the EXPECTED LOGICAL BLOCK APPLICATION TAG field and the LOGICAL BLOCK APPLICATION TAG MASK
field in the CDB, if the command is a VERIFY (32) command (see 5.32);
b) the Application Tag mode page (see 6.5.3), if the command is not a VERIFY (32) command and the
ATMPE bit in the Control mode page (see SPC-4) is set to one; or
c) a method not defined by this standard, if the command is not a VERIFY (32) command and the
ATMPE bit is set to zero.
If the device server terminates the command with CHECK CONDITION status, then the device server
shall set the sense key to ABORTED COMMAND.
If multiple errors occur while the device server is processing the command, then the selection by the
device server of which error to report is not defined by this standard.
See the Extended INQUIRY Data VPD page (see SPC-4) for the definitions of the GRD_CHK bit, the
APP_CHK bit, and the REF_CHK bit.
If the device server detects:
a) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh and type 1 protection (see 4.22.2.3) or type 2
protection (see 4.22.2.4) is enabled; or
b) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, LOGICAL BLOCK REFERENCE TAG field set to
FFFF_FFFFh, and type 3 protection (see 4.22.2.5) is enabled,
then the device server shall not check any protection information in the associated protection
information interval.
If type 1 protection is enabled, then the device server shall check each logical block reference tag by
comparing it to the lower four bytes of the LBA associated with the logical block. If type 2 protection or
type 3 protection is enabled, and the device server has knowledge of the contents of the LOGICAL BLOCK
REFERENCE TAG field, then the device server shall check the logical block reference tag. If type 2
protection is enabled, then this knowledge may be acquired through the EXPECTED INITIAL LOGICAL
BLOCK REFERENCE TAG field in a VERIFY (32) command (see 5.32). If type 3 protection is enabled, then
the method for acquiring this knowledge is not defined by this standard.
If the DPICZ bit in the Control mode page (see SPC-4) is set to one, then protection information shall not
be checked.

Working Draft SCSI Block Commands 4 (SBC-4)

183

T10/BSR INCITS 506 Revision 3

27 August 2014

If the BYTCHK field is set to 01b or 11b, then table 102 defines the checks that the device server shall perform
on the protection information from the verify operations based on the VRPROTECT field. All footnotes for
table 102 are at the end of the table.

Table 102 VRPROTECT field with the BYTCHK field set to 01b or 11b checking protection information
from the verify operations (part 1 of 2)

Code

Logical unit
formatted
with
protection
information

Field in
protection
information g

LOGICAL BLOCK
GUARD

000b

Yes i

LOGICAL BLOCK
APPLICATION TAG

LOGICAL BLOCK
REFERENCE TAG

No

001b
010b
011b
100b
101b b

Yes

No
110b
to
111b

184

Extended
INQUIRY Data
VPD page bit
value f

If check fails d e, additional sense code

GRD_CHK

=1

LOGICAL BLOCK GUARD CHECK


FAILED

GRD_CHK

=0

No check performed

APP_CHK

=1cg

APP_CHK
REF_CHK

=0

=1h

REF_CHK

=0

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED
No check performed
LOGICAL BLOCK REFERENCE TAG
CHECK FAILED
No check performed

No protection information available to check


LOGICAL BLOCK
GUARD

No check performed

LOGICAL BLOCK
APPLICATION TAG

No check performed

LOGICAL BLOCK
REFERENCE TAG

No check performed

Error condition a

Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 102 VRPROTECT field with the BYTCHK field set to 01b or 11b checking protection information
from the verify operations (part 2 of 2)

Code

d
e
f
g

Logical unit
formatted
with
protection
information

Field in
protection
information g

Extended
INQUIRY Data
VPD page bit
value f

If check fails d e, additional sense code

If the logical unit supports protection information (see 4.22) and has not been formatted with protection
information, then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the logical unit does not support protection information, then the device server should terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN CDB.
If the device server has knowledge of the contents of the LOGICAL BLOCK APPLICATION TAG field, then the
device server shall check each logical block application tag. If the ATO bit in the Control mode page (see
SPC-4) is set to one, then this knowledge is acquired from:
a) the EXPECTED LOGICAL BLOCK APPLICATION TAG field and the LOGICAL BLOCK APPLICATION TAG MASK
field in the CDB, if the command is a VERIFY (32) command (see 5.32);
b) the Application Tag mode page (see 6.5.3), if the command is not a VERIFY (32) command and the
ATMPE bit in the Control mode page (see SPC-4) is set to one; or
c) a method not defined by this standard, if the command is not a VERIFY (32) command and the
ATMPE bit is set to zero.
If the device server terminates the command with CHECK CONDITION status, then the device server
shall set the sense key to ABORTED COMMAND.
If multiple errors occur while the device server is processing the command, then the selection by the
device server of which error to report is not defined by this standard.
See the Extended INQUIRY Data VPD page (see SPC-4) for the definitions of the GRD_CHK bit, the
APP_CHK bit, and the REF_CHK bit.
If the device server detects:
a) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh and type 1 protection (see 4.22.2.3) or type 2
protection (see 4.22.2.4) is enabled; or
b) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, LOGICAL BLOCK REFERENCE TAG field set to
FFFF_FFFFh, and type 3 protection (see 4.22.2.5) is enabled,
then the device server shall not check any protection information in the associated protection
information interval.
If type 1 protection is enabled, then the device server shall check each logical block reference tag by
comparing it to the lower four bytes of the LBA associated with the logical block. If type 2 protection or
type 3 protection is enabled, and the device server has knowledge of the contents of the LOGICAL BLOCK
REFERENCE TAG field, then the device server shall check the logical block reference tag. If type 2
protection is enabled, then this knowledge may be acquired through the EXPECTED INITIAL LOGICAL BLOCK
REFERENCE TAG field in a VERIFY (32) command (see 5.32). If type 3 protection is enabled, then the
method for acquiring this knowledge is not defined by this standard.
If the DPICZ bit in the Control mode page (see SPC-4) is set to one, then protection information shall not
be checked.

Working Draft SCSI Block Commands 4 (SBC-4)

185

T10/BSR INCITS 506 Revision 3

27 August 2014

If the BYTCHK field is set to 01b or 11b, then table 103 defines the checks that the device server shall perform
on the protection information transferred from the Data-Out Buffer based on the VRPROTECT field. All footnotes
for table 103 are at the end of the table.

Table 103 VRPROTECT field with the BYTCHK field set to 01b or 11b checking protection information
from the Data-Out Buffer (part 1 of 2)

Code

000b

001b

Logical unit
formatted
with
protection
information

010b

No protection information in the Data-Out Buffer to check

No

No protection information in the Data-Out Buffer to check

Yes

Yes

No

011b

Yes

No

100b

Yes

No

186

Device server
If check fails d e, additional sense code
check

Yes

No

Field in
protection
information g

LOGICAL BLOCK
GUARD

Shall

LOGICAL BLOCK GUARD CHECK FAILED

LOGICAL BLOCK
APPLICATION TAG

May c

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG

Shall (except
for type 3) f

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

Error condition a
LOGICAL BLOCK
GUARD

Shall not

LOGICAL BLOCK
APPLICATION TAG

May c

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG

May f

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

No check performed

Error condition a
LOGICAL BLOCK
GUARD

Shall not

No check performed

LOGICAL BLOCK
APPLICATION TAG

Shall not

No check performed

LOGICAL BLOCK
REFERENCE TAG

Shall not

No check performed

Error condition a
LOGICAL BLOCK
GUARD

Shall

LOGICAL BLOCK
APPLICATION TAG

Shall not

No check performed

LOGICAL BLOCK
REFERENCE TAG

Shall not

No check performed

LOGICAL BLOCK GUARD CHECK FAILED

Error condition a

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 103 VRPROTECT field with the BYTCHK field set to 01b or 11b checking protection information
from the Data-Out Buffer (part 2 of 2)

Code

101b

Logical unit
formatted
with
protection
information

Yes

No
110b to
111b
a

d
e
f

Field in
protection
information g

Device server
If check fails d e, additional sense code
check

LOGICAL BLOCK
GUARD

Shall

LOGICAL BLOCK GUARD CHECK FAILED

LOGICAL BLOCK
APPLICATION TAG

May c

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG

May f

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

Error condition a

Reserved

If the logical unit supports protection information (see 4.22) and has not been formatted with protection
information, then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the logical unit does not support protection information, then the device server should terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN CDB.
If the device server has knowledge of the contents of the LOGICAL BLOCK APPLICATION TAG field and the
ATO bit is set to one in the Control mode page (see SPC-4), then the device server may check each
logical block application tag. If the ATO bit is set to one, then this knowledge is acquired from:
a) the EXPECTED LOGICAL BLOCK APPLICATION TAG field and the LOGICAL BLOCK APPLICATION TAG MASK
field in the CDB, if the command is a VERIFY (32) command;
b) the Application Tag mode page (see 6.5.3), if the command is not a VERIFY (32) command and the
ATMPE bit in the Control mode page (see SPC-4) is set to one; or
c) a method not defined by this standard, if the command is not a VERIFY (32) command and the
ATMPE bit is set to zero.
If the device server terminates the command with CHECK CONDITION status, then the device server
shall set the sense key to ABORTED COMMAND.
If multiple errors occur while the device server is processing the command, then the selection by the
device server of which error to report is not defined by this standard.
If type 1 protection is enabled, then the device server shall check the logical block reference tag by
comparing it to the lower four bytes of the LBA associated with the logical block. If type 2 protection is
enabled and the device server has knowledge of the contents of the LOGICAL BLOCK REFERENCE TAG
field, then the device server shall check each logical block reference tag. If type 2 protection is enabled,
then this knowledge may be acquired through the EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG field
in a VERIFY (32) command (see 5.32). If type 3 protection is enabled, the ATO bit is set to one in the
Control mode page (see SPC-4), and the device server has knowledge of the contents of the LOGICAL
BLOCK REFERENCE TAG field, then the device server may check each logical block reference tag. If type 3
protection is enabled, then the method for acquiring this knowledge is not defined by this standard.
If the NO_PI_CHK bit is set to one in the Extended INQUIRY Data VPD page (see SPC-5) and the device
server detects:
a) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh and type 1 protection (see 4.22.2.3) or type 2
protection (see 4.22.2.4) is enabled; or
b) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, LOGICAL BLOCK REFERENCE TAG field set to
FFFF_FFFFh, and type 3 protection (see 4.22.2.5) is enabled,
then the device server shall not check any protection information in the associated protection
information interval.

Working Draft SCSI Block Commands 4 (SBC-4)

187

T10/BSR INCITS 506 Revision 3

27 August 2014

If the BYTCHK field is set to 01b or 11b, then table 104 defines the processing by the device server of the
protection information during the compare operation based on the VRPROTECT field. All footnotes for table 104
are at the end of the table.

Table 104 VRPROTECT field with the BYTCHK field set to 01b or 11b compare operation requirements
(part 1 of 3)

Code

Logical unit
formatted
with
protection
information

Compare
operation

No protection information in the Data-Out Buffer to compare. Only user data is


compared within each logical block.

No

No protection information from the verify operations or in the Data-Out Buffer to


compare. Only user data is compared within each logical block.

Yes

LOGICAL BLOCK GUARD

Shall

LOGICAL BLOCK GUARD CHECK


FAILED

LOGICAL BLOCK
APPLICATION TAG
(ATO = 1) e

Shall

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED

LOGICAL BLOCK
APPLICATION TAG
(ATO = 0) f

Shall not

LOGICAL BLOCK
REFERENCE TAG

No

No compare performed

Shall g

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG
(type 3 and ATO = 1)

Shall h

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG
(type 3 and ATO = 0)

Shall not

(not type 3)

188

If compare fails c d, additional sense


code

Yes
000b

001b b

Field in protection
information

No compare performed

Error condition a

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 104 VRPROTECT field with the BYTCHK field set to 01b or 11b compare operation requirements
(part 2 of 3)

Code

010b b

Logical unit
formatted
with
protection
information

Yes

Field in protection
information

Compare
operation

LOGICAL BLOCK GUARD

Shall not

LOGICAL BLOCK
APPLICATION TAG
(ATO = 1) e

Shall

LOGICAL BLOCK
APPLICATION TAG
(ATO = 0) f

Shall not

LOGICAL BLOCK
REFERENCE TAG

No compare performed
LOGICAL BLOCK APPLICATION TAG
CHECK FAILED
No compare performed

Shall g

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG
(type 3 and ATO = 1)

Shall h

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG
(type 3 and ATO = 0)

Shall not

(not type 3)

No

If compare fails c d, additional sense


code

No compare performed

Error condition a
LOGICAL BLOCK GUARD

Shall

LOGICAL BLOCK GUARD CHECK


FAILED

LOGICAL BLOCK
APPLICATION TAG
(ATO = 1) e

Shall

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED

LOGICAL BLOCK
APPLICATION TAG
(ATO = 0) f

011b
100b b

Yes

LOGICAL BLOCK
REFERENCE TAG

Shall not

Shall g

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG
(type 3 and ATO = 1)

Shall h

LOGICAL BLOCK REFERENCE TAG


CHECK FAILED

LOGICAL BLOCK
REFERENCE TAG
(type 3 and ATO = 0)

Shall not

(not type 3)

No

No compare performed

No compare performed

Error condition a

Working Draft SCSI Block Commands 4 (SBC-4)

189

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 104 VRPROTECT field with the BYTCHK field set to 01b or 11b compare operation requirements
(part 3 of 3)

Code

101b b

Logical unit
formatted
with
protection
information

Yes

No
110b to
111b
a

c
d
e
f
g

190

If compare fails c d, additional sense


code

Field in protection
information

Compare
operation

LOGICAL BLOCK GUARD

Shall

LOGICAL BLOCK GUARD CHECK


FAILED

LOGICAL BLOCK
APPLICATION TAG
(ATO = 1) e

Shall

LOGICAL BLOCK APPLICATION TAG


CHECK FAILED

LOGICAL BLOCK
APPLICATION TAG
(ATO = 0) f

Shall not

No compare performed

LOGICAL BLOCK
REFERENCE TAG

Shall not

No compare performed

Error condition a

Reserved

If the logical unit supports protection information (see 4.22) and has not been formatted with protection
information, then the device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the logical unit does not support protection information, then the device server should terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN CDB.
If the device server terminates the command with CHECK CONDITION status, then the device server
shall set the sense key to MISCOMPARE.
If multiple errors occur while the device server is processing the command, then the selection by the
device server of which error to report is not defined by this standard.
If the ATO bit is set to one in the Control mode page (see SPC-4), then the device server shall not modify
the logical block application tag.
If the ATO bit is set to zero in the Control mode page (see SPC-4), then the device server may modify
any logical block application tag.
If the BYTCHK field is set to 11b, then the device server shall compare the value from each LOGICAL BLOCK
REFERENCE TAG field received in the single logical block data from the Data-Out Buffer with the
corresponding LOGICAL BLOCK REFERENCE TAG field in the first logical block from the verify operations,
and the device server shall compare the value of the previous LOGICAL BLOCK REFERENCE TAG field plus
one with each of the subsequent LOGICAL BLOCK REFERENCE TAG fields (see 4.22.3).
If the BYTCHK field is set to 11b, then the device server shall compare the value from each LOGICAL BLOCK
REFERENCE TAG field received in the single logical block data from the Data-Out Buffer with the
corresponding LOGICAL BLOCK REFERENCE TAG field in each logical block from the verify operations
(see 4.22.3).

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.30 VERIFY (12) command


The VERIFY (12) command (see table 105) requests that the device server perform the actions defined for
the VERIFY (10) command (see 5.29).
NOTE 17 - Migration from the VERIFY (12) command to the VERIFY (16) command is recommended for all
implementations.

Table 105 VERIFY (12) command


Bit
Byte

OPERATION CODE

VRPROTECT

(MSB)

(MSB)

10

DPO

(AFh)

Reserved

BYTCHK

Obsolete

LOGICAL BLOCK ADDRESS

(LSB)
VERIFICATION LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

11

GROUP NUMBER

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 105 for the
VERIFY (12) command.
See the VERIFY (10) command (see 5.29) for the definitions of the other fields in this command.

Working Draft SCSI Block Commands 4 (SBC-4)

191

T10/BSR INCITS 506 Revision 3

27 August 2014

5.31 VERIFY (16) command


The VERIFY (16) command (see table 106) requests that the device server perform the actions defined for
the VERIFY (10) command (see 5.29).

Table 106 VERIFY (16) command


Bit
Byte

0
VRPROTECT

(MSB)

10

13

(MSB)

15

OPERATION CODE

14

DPO

(8Fh)

Reserved

BYTCHK

Reserved

LOGICAL BLOCK ADDRESS

(LSB)
VERIFICATION LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

GROUP NUMBER

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 106 for the
VERIFY (16) command.
See the VERIFY (10) command (see 5.29) for the definitions of the other fields in this command.

192

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.32 VERIFY (32) command


The VERIFY (32) command (see table 107) requests that the device server perform the actions defined for
the VERIFY (10) command (see 5.29).
The device server shall process a VERIFY (32) command only if type 2 protection is enabled (see 4.22.2.4).

Table 107 VERIFY (32) command


Bit
Byte

OPERATION CODE

CONTROL

Reserved

SERVICE ACTION

9
10

VRPROTECT

DPO

12

19

(MSB)

20

23

(MSB)

24

(MSB)

(000Ah)

Reserved

(LSB)
BYTCHK

Reserved

LOGICAL BLOCK ADDRESS

(LSB)
EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG

(LSB)

25

(MSB)

27
28

31

(18h)

Reserved

11

26

GROUP NUMBER
ADDITIONAL CDB LENGTH

(MSB)

(7Fh)

Reserved

6
8

EXPECTED LOGICAL BLOCK APPLICATION TAG

LOGICAL BLOCK APPLICATION TAG MASK

(LSB)
(LSB)

(MSB)
VERIFICATION LENGTH

(LSB)

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 107 for the VERIFY (32) command.
See the VERIFY (10) command (see 5.29) for the definitions of the CONTROL byte, the GROUP NUMBER field,
the VRPROTECT field, the DPO bit, the BYTCHK field, the LOGICAL BLOCK ADDRESS field, and the VERIFICATION
LENGTH field.
If checking of the LOGICAL BLOCK REFERENCE TAG field is enabled (see table 101, table 102, table 103, and
table 104 in 5.29), then the EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG field contains the value of the
LOGICAL BLOCK REFERENCE TAG field expected in the protection information of the first logical block accessed
by the command instead of a value based on the LBA (see 4.22.3).
Working Draft SCSI Block Commands 4 (SBC-4)

193

T10/BSR INCITS 506 Revision 3

27 August 2014

If the ATO bit is set to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK
APPLICATION TAG field is enabled (see table 101, table 102, table 103, and table 104 in 5.29), then the LOGICAL
BLOCK APPLICATION TAG MASK field contains a value that is a bit mask for enabling the checking of the LOGICAL
BLOCK APPLICATION TAG field in every instance of the protection information for each logical block accessed by
the command. A LOGICAL BLOCK APPLICATION TAG MASK bit set to one enables the checking of the
corresponding bit of the EXPECTED LOGICAL BLOCK APPLICATION TAG field with the corresponding bit of the
LOGICAL BLOCK APPLICATION TAG field in every instance of the protection information. A LOGICAL BLOCK
APPLICATION TAG MASK field bit set to zero disables the checking of the corresponding bit of the EXPECTED
LOGICAL BLOCK APPLICATION TAG field with the corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in
every instance of protection information.
The LOGICAL BLOCK APPLICATION TAG MASK field and the EXPECTED LOGICAL BLOCK APPLICATION TAG field shall
be ignored if:
a) the ATO bit is set to zero; or
b) the ATO bit is set to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK
APPLICATION TAG field is disabled (see table 101, table 102, table 103, and table 104 in 5.29).

5.33 WRITE (10) command


The WRITE (10) command (see table 108) requests that the device server:
a) transfer the specified logical block data from the Data-Out Buffer; and
b) perform write operations to the specified LBAs using the transferred logical blocks.
NOTE 18 - Migration from the WRITE (10) command to the WRITE (16) command is recommended for all
implementations.

Table 108 WRITE (10) command


Bit
Byte

0
WRPROTECT

8
9

DPO

Reserved

Obsolete

Obsolete

(2Ah)

FUA

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

4
OPERATION CODE

1
2

(MSB)

GROUP NUMBER
TRANSFER LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 108 for the
WRITE (10) command.

194

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server shall check the protection information, if any, transferred from the Data-Out Buffer based on
the WRPROTECT field as described in table 109. All footnotes for table 109 are at the end of the table.

Table 109 WRPROTECT field (part 1 of 3)

Code

000b

001b

Logical unit
formatted
with
protection
information

010b

011b

No

No protection information received from application client to check

Yes e

Yes e

Yes e

No a

100b

If check fails d i, additional sense code

No protection information received from application client to check

No a

Device
server
check

Yes f g h

No a

Field in
protection
information k

Yes e

No a

LOGICAL BLOCK
GUARD

Shall

LOGICAL BLOCK
APPLICATION TAG

Dependent
on RWWP c

LOGICAL BLOCK
REFERENCE TAG

Shall (except
for type 3) j

LOGICAL BLOCK GUARD CHECK FAILED


LOGICAL BLOCK APPLICATION TAG
CHECK FAILED
LOGICAL BLOCK REFERENCE TAG CHECK
FAILED

No protection information available to check


LOGICAL BLOCK
GUARD

Shall not

LOGICAL BLOCK
APPLICATION TAG

Dependent
on RWWP c

LOGICAL BLOCK
REFERENCE TAG

May j

No check performed
LOGICAL BLOCK APPLICATION TAG
CHECK FAILED
LOGICAL BLOCK REFERENCE TAG CHECK
FAILED

No protection information available to check


LOGICAL BLOCK
GUARD

Shall not

No check performed

LOGICAL BLOCK
APPLICATION TAG

Shall not

No check performed

LOGICAL BLOCK
REFERENCE TAG

Shall not

No check performed

No protection information available to check


LOGICAL BLOCK
GUARD

Shall

LOGICAL BLOCK
APPLICATION TAG

Shall not

No check performed

LOGICAL BLOCK
REFERENCE TAG

Shall not

No check performed

LOGICAL BLOCK GUARD CHECK FAILED

No protection information available to check

Working Draft SCSI Block Commands 4 (SBC-4)

195

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 109 WRPROTECT field (part 2 of 3)

Code

101b

Logical unit
formatted
with
protection
information

Yes e

No a
110b to
111b

196

Field in
protection
information k

Device
server
check

LOGICAL BLOCK
GUARD

Shall

LOGICAL BLOCK
APPLICATION TAG

Dependent
on RWWP c

LOGICAL BLOCK
REFERENCE TAG

May j

If check fails d i, additional sense code

LOGICAL BLOCK GUARD CHECK FAILED


LOGICAL BLOCK APPLICATION TAG
CHECK FAILED
LOGICAL BLOCK REFERENCE TAG CHECK
FAILED

No protection information available to check

Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3


Table 109 WRPROTECT field (part 3 of 3)

Code

d
e
f
g

i
j

Logical unit
formatted
with
protection
information

Field in
protection
information k

Device
server
check

If check fails d i, additional sense code

If a logical unit supports protection information (see 4.22) and has not been formatted with protection information,
then the device server shall terminate the command with CHECK CONDITION status with the sense key set to
ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
If the logical unit does not support protection information, then the device server should terminate the requested
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense
code set to INVALID FIELD IN CDB.
If the device server has knowledge of the contents of the LOGICAL BLOCK APPLICATION TAG field and the ATO bit is set
to one in the Control mode page (see SPC-4), then the device server:
a) may check each logical block application tag if the RWWP bit is set to zero in the Control mode page (see
SPC-4); and
b) shall check each logical block application tag if the RWWP bit is set to one in the Control mode page.
If the ATO bit in the Control mode page (see SPC-4) is set to one, then this knowledge is acquired from:
a) the EXPECTED LOGICAL BLOCK APPLICATION TAG field and the LOGICAL BLOCK APPLICATION TAG MASK field in the
CDB, if a WRITE (32) command (see 5.36) is received by the device server;
b) the Application Tag mode page (see 6.5.3), if a command other than WRITE (32) is received by the device
server and the ATMPE bit in the Control mode page (see SPC-4) is set to one; or
c) a method not defined by this standard, if a command other than WRITE (32) is received by the device server,
and the ATMPE bit is set to zero.
If the device server terminates the command with CHECK CONDITION status, then the device server shall set the
sense key to ABORTED COMMAND.
The device server shall preserve the contents of protection information (e.g., write it to the medium or store it in
non-volatile memory).
The device server shall write a generated CRC (see 4.22.4.2) into each LOGICAL BLOCK GUARD field.
If the RWWP bit in the Control mode page (see SPC-4) is set to one, then the device server shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense
code set to INVALID FIELD IN CDB. If the RWWP bit is set to zero and:
a) type 1 protection is enabled, then the device server shall write the least significant four bytes of each LBA into
the LOGICAL BLOCK REFERENCE TAG field of each of the written logical blocks; or
b) type 2 protection or type 3 protection is enabled, then the device server shall write a value of FFFF_FFFFh into
the LOGICAL BLOCK REFERENCE TAG field of each of the written logical blocks.
If the ATO bit is set to one in the Control mode page (see SPC-4), then the device server shall write FFFFh into each
LOGICAL BLOCK APPLICATION TAG field. If the ATO bit is set to zero, then the device server may write any value into
each LOGICAL BLOCK APPLICATION TAG field.
If multiple errors occur while the device server is processing the command, then the selection by the device server
of which error to report is not defined by this standard.
If type 1 protection is enabled, then the device server shall check the logical block reference tag by comparing it to
the lower four bytes of the LBA associated with the logical block. If type 2 protection is enabled and the device
server has knowledge of the contents of the LOGICAL BLOCK REFERENCE TAG field, then the device server shall check
each logical block reference tag. If type 2 protection is enabled, then this knowledge may be acquired through the
EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG field in a WRITE (32) command (see 5.36). If type 3 protection is
enabled, the ATO bit is set to one in the Control mode page (see SPC-4), and the device server has knowledge of
the contents of the LOGICAL BLOCK REFERENCE TAG field, then the device server may check each logical block
reference tag. If type 3 protection is enabled, then the method for acquiring this knowledge is not defined by this
standard.
If the NO_PI_CHK bit is set to one in the Extended INQUIRY Data VPD page (see SPC-5) and the device server
detects:
a) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh and type 1 protection (see 4.22.2.3) or type 2 protection
(see 4.22.2.4) is enabled; or
b) a LOGICAL BLOCK APPLICATION TAG field set to FFFFh, LOGICAL BLOCK REFERENCE TAG field set to FFFF_FFFFh,
and type 3 protection (see 4.22.2.5) is enabled,
then the device server shall not check any protection information in the associated protection information interval.

See the READ (10) command (see 5.11) for the definition of the DPO bit.
Working Draft SCSI Block Commands 4 (SBC-4)

197

T10/BSR INCITS 506 Revision 3

27 August 2014

A force unit access (FUA) bit set to one specifies that the device server shall write the logical blocks to:
a) the non-volatile cache, if any; or
b) the medium.
An FUA bit set to zero specifies that the device server shall write the logical blocks to:
a) volatile cache, if any;
b) non-volatile cache, if any; or
c) the medium.
See the PRE-FETCH (10) command (see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field.
See the PRE-FETCH (10) command and 4.23 for the definition of the GROUP NUMBER field.
The TRANSFER LENGTH field specifies the number of contiguous logical blocks of data that shall be transferred
from the Data-Out Buffer and written, starting with the logical block referenced by the LBA specified by the
LOGICAL BLOCK ADDRESS field. A TRANSFER LENGTH field set to zero specifies that no logical blocks shall be
transferred or written. This condition shall not be considered an error. Any other value specifies the number of
logical blocks that shall be transferred and written. If the specified LBA and the specified transfer length
exceed the capacity of the medium (see 4.5), then the device server shall terminate the command with
CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set
to LOGICAL BLOCK ADDRESS OUT OF RANGE. The TRANSFER LENGTH field is constrained by the MAXIMUM
TRANSFER LENGTH field in the Block Limits VPD page (see 6.6.4).
The CONTROL byte is defined in SAM-5.

5.34 WRITE (12) command


The WRITE (12) command (see table 110) requests that the device server perform the actions defined for the
WRITE (10) command (see 5.33).
NOTE 19 - Migration from the WRITE (12) command to the WRITE 16) command is recommended for all
implementations.

Table 110 WRITE (12) command


Bit
Byte

198

WRPROTECT

(MSB)

(MSB)

11

OPERATION CODE

10

DPO

Reserved

Obsolete

Obsolete

(AAh)

FUA

LOGICAL BLOCK ADDRESS

(LSB)
TRANSFER LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

GROUP NUMBER

CONTROL

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 110 for the
WRITE (12) command.
See the WRITE (10) command (see 5.33) for the definitions of the other fields in this command.

5.35 WRITE (16) command


The WRITE (16) command (see table 111) requests that the device server perform the actions defined for the
WRITE (10) command (see 5.33).

Table 111 WRITE (16) command


Bit
Byte

OPERATION CODE

WRPROTECT

(MSB)

10

13

(MSB)

14

DPO

Reserved

Obsolete

Reserved

(8Ah)

FUA

LOGICAL BLOCK ADDRESS

(LSB)
TRANSFER LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

15

GROUP NUMBER

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 111 for the
WRITE (16) command.
See the WRITE (10) command (see 5.33) for the definitions of the other fields in this command.

Working Draft SCSI Block Commands 4 (SBC-4)

199

T10/BSR INCITS 506 Revision 3

27 August 2014

5.36 WRITE (32) command


The WRITE (32) command (see table 112) requests that the device server perform the actions defined for the
WRITE (10) command (see 5.33).
The device server shall process a WRITE (32) command only if type 2 protection is enabled (see 4.22.2.4).

Table 112 WRITE (32) command


Bit
Byte

OPERATION CODE

CONTROL

Reserved

7
8

SERVICE ACTION

9
10

WRPROTECT

12

19

(MSB)

20

23

(MSB)

24

(MSB)

(000Bh)
FUA

(LSB)
Reserved

Obsolete

Reserved

LOGICAL BLOCK ADDRESS

(LSB)
EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG

(LSB)

25

(MSB)

27
28

31

DPO

(18h)

Reserved

11

26

GROUP NUMBER
ADDITIONAL CDB LENGTH

(MSB)

(7Fh)

Reserved

EXPECTED LOGICAL BLOCK APPLICATION TAG

LOGICAL BLOCK APPLICATION TAG MASK

(LSB)
(LSB)

(MSB)
TRANSFER LENGTH

(LSB)

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 112 for the WRITE (32) command.
See the WRITE (10) command (see 5.33) for the definitions of the CONTROL byte, the GROUP NUMBER field, the
WRPROTECT field, the DPO bit, the FUA bit, the LOGICAL BLOCK ADDRESS field, and the TRANSFER LENGTH field.
If checking of the LOGICAL BLOCK REFERENCE TAG field is enabled (see table 109), then the EXPECTED INITIAL
LOGICAL BLOCK REFERENCE TAG field contains the value of the LOGICAL BLOCK REFERENCE TAG field expected in
the protection information of the first logical block accessed by the command instead of a value based on the
LBA (see 4.22.3).

200

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the ATO bit is set to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK
APPLICATION TAG field is enabled (see table 109), then the LOGICAL BLOCK APPLICATION TAG MASK field contains
a value that is a bit mask for enabling the checking of the LOGICAL BLOCK APPLICATION TAG field in every
instance of protection information for each logical block accessed by the command. A LOGICAL BLOCK
APPLICATION TAG MASK bit set to one enables the checking of the corresponding bit of the EXPECTED LOGICAL
BLOCK APPLICATION TAG field with the corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in every
instance of protection information. A LOGICAL BLOCK APPLICATION TAG MASK field bit set to zero disables the
checking of the corresponding bit of the EXPECTED LOGICAL BLOCK APPLICATION TAG field with the
corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in every instance of protection information.
If the ATO bit is set to:
a) to zero; or
b) to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK APPLICATION TAG
field is disabled (see table 109),
then the LOGICAL BLOCK APPLICATION TAG MASK field and the EXPECTED LOGICAL BLOCK APPLICATION TAG field
shall be ignored

5.37 WRITE AND VERIFY (10) command


The WRITE AND VERIFY (10) command (see table 113) requests that the device server:
1)
2)
3)
4)

transfer the specified the logical block data for the command from the Data-Out Buffer;
perform write medium operations to the specified LBAs;
perform verify operations from the specified LBAs; and
if specified, perform a compare operation on:
A) the logical block data transferred from the Data-Out Buffer; and
B) the logical block data from the verify operations.

The device server may process the LBAs in any order but shall perform this sequence in the specified order
for a given LBA.
NOTE 20 - Migration from the WRITE AND VERIFY (10) command to the WRITE AND VERIFY (16)
command is recommended for all implementations.

Table 113 WRITE AND VERIFY (10) command


Bit
Byte

0
WRPROTECT

DPO

(2Eh)

Reserved

BYTCHK

Obsolete

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

4
OPERATION CODE

1
2

(MSB)

GROUP NUMBER
TRANSFER LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 113 for the
WRITE AND VERIFY (10) command.
Working Draft SCSI Block Commands 4 (SBC-4)

201

T10/BSR INCITS 506 Revision 3

27 August 2014

See the PRE-FETCH (10) command (see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field. See the
PRE-FETCH (10) command and 4.23 for the definition of the GROUP NUMBER field. See the WRITE (10)
command (see 5.33) for the definitions of the CONTROL byte, the TRANSFER LENGTH field and the WRPROTECT
field. See the READ (10) command (see 5.11) for the definition of the DPO bit.
See the VERIFY (10) command (see 5.29) for definition of the byte check (BYTCHK) field when set to 00b, 01b,
and 10b. For a WRITE AND VERIFY (10) command, a BYTCHK field set to 11b is reserved.

5.38 WRITE AND VERIFY (12) command


The WRITE AND VERIFY (12) command (see table 114) requests that the device server perform the actions
defined for the WRITE AND VERIFY (10) command (see 5.37).
NOTE 21 - Migration from the WRITE AND VERIFY (12) command to the WRITE AND VERIFY (16)
command is recommended for all implementations.

Table 114 WRITE AND VERIFY (12) command


Bit
Byte

0
WRPROTECT

(MSB)

(MSB)

11

OPERATION CODE

10

DPO

(AEh)

Reserved

BYTCHK

Obsolete

LOGICAL BLOCK ADDRESS

(LSB)
TRANSFER LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

GROUP NUMBER

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 114 for the
WRITE AND VERIFY (12) command.
See the WRITE AND VERIFY (10) command (see 5.37) for the definitions of the other fields in this command.

202

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

5.39 WRITE AND VERIFY (16) command


The WRITE AND VERIFY (16) command (see table 115) requests that the device server perform the actions
defined for the WRITE AND VERIFY (10) command (see 5.37).

Table 115 WRITE AND VERIFY (16) command


Bit
Byte

OPERATION CODE

WRPROTECT

(MSB)

10

13

(MSB)

14

DPO

(8Eh)

Reserved

BYTCHK

Reserved

LOGICAL BLOCK ADDRESS

(LSB)
TRANSFER LENGTH

(LSB)
Restricted
for
MMC-6

Reserved

15

GROUP NUMBER

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 115 for the
WRITE AND VERIFY (16) command.
See the WRITE AND VERIFY (10) command (see 5.37) for the definitions of the other fields in this command.

Working Draft SCSI Block Commands 4 (SBC-4)

203

T10/BSR INCITS 506 Revision 3

27 August 2014

5.40 WRITE AND VERIFY (32) command


The WRITE AND VERIFY (32) command (see table 116) requests that the device server perform the actions
defined for the WRITE AND VERIFY (10) command (see 5.37).
The device server shall process a WRITE AND VERIFY (32) command only if type 2 protection is enabled
(see 4.22.2.4).

Table 116 WRITE AND VERIFY (32) command


Bit
Byte

OPERATION CODE

CONTROL

Reserved

7
8

SERVICE ACTION

9
10

WRPROTECT

12

19

(MSB)

20

23

(MSB)

24

(MSB)

(000Ch)

Reserved

(LSB)
BYTCHK

Reserved

LOGICAL BLOCK ADDRESS

(LSB)
EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG

(LSB)

25

(MSB)

27
28

31

DPO

(18h)

Reserved

11

26

GROUP NUMBER
ADDITIONAL CDB LENGTH

(MSB)

(7Fh)

Reserved

EXPECTED LOGICAL BLOCK APPLICATION TAG

LOGICAL BLOCK APPLICATION TAG MASK

(LSB)
(LSB)

(MSB)
TRANSFER LENGTH

(LSB)

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 116 for the WRITE AND VERIFY (32) command.
See the WRITE AND VERIFY (10) command (see 5.37) for the definitions of the CONTROL byte, the GROUP
NUMBER field, the WRPROTECT field, the DPO bit, the BYTCHK field, the LOGICAL BLOCK ADDRESS field, and the
TRANSFER LENGTH field.
If checking of the LOGICAL BLOCK REFERENCE TAG field is enabled (see table 109), then the EXPECTED INITIAL
LOGICAL BLOCK REFERENCE TAG field contains the value of the LOGICAL BLOCK REFERENCE TAG field expected in

204

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

the protection information of the first logical block accessed by the command instead of a value based on the
LBA (see 4.22.3).
If the ATO bit is set to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK
APPLICATION TAG field is enabled (see table 109 in 5.33), then the LOGICAL BLOCK APPLICATION TAG MASK field
contains a value that is a bit mask for enabling the checking of the LOGICAL BLOCK APPLICATION TAG field in
every instance of protection information for each logical block accessed by the command. A LOGICAL BLOCK
APPLICATION TAG MASK bit set to one enables the checking of the corresponding bit of the EXPECTED LOGICAL
BLOCK APPLICATION TAG field with the corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in every
instance of protection information. A LOGICAL BLOCK APPLICATION TAG MASK field bit set to zero disables the
checking of the corresponding bit of the EXPECTED LOGICAL BLOCK APPLICATION TAG field with the
corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in every instance of protection information.
If the ATO bit is set to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK
APPLICATION TAG field is disabled (see table 109), or if the ATO bit is set to zero, then the LOGICAL BLOCK
application tag mask field and the expected logical block application tag field shall be ignored.
5.41 WRITE ATOMIC (16) command
The WRITE ATOMIC (16) command (see table 117) requests that the device server:
a) transfer logical block data from the Data-Out Buffer; and
b) perform an atomic write operation (see 4.31) of the LBAs specified by this command.
Table 117 WRITE ATOMIC (16) command
Bit
Byte

WRPROTECT

DPO

(9Ch)
Reserved

FUA

LOGICAL BLOCK ADDRESS

(LSB)
Reserved

11

(MSB)

TRANSFER LENGTH

13
14

(MSB)

10
12

OPERATION CODE

1
2

Reserved

15

(LSB)
GROUP NUMBER

CONTROL

The operation code field is defined in SPC-5 and shall be set to the value shown in table 117 for the WRITE
ATOMIC (16) command.
See the WRITE (10) command (see 5.33) for the definitions of the other fields in this command.
5.42 WRITE ATOMIC (32) command
The WRITE ATOMIC (32) command (see table 118) requests that the device server perform the actions
defined for the WRITE ATOMIC (16) command (see 5.41).

Working Draft SCSI Block Commands 4 (SBC-4)

205

T10/BSR INCITS 506 Revision 3

27 August 2014

The device server shall process a WRITE ATOMIC (32) command only if type 2 protection is enabled
(see 4.22.2.4).
Table 118 WRITE ATOMIC (32) command
Bit
Byte

OPERATION CODE

CONTROL

Reserved

ADDITIONAL CDB LENGTH

(MSB)

SERVICE ACTION

9
10

WRPROTECT

DPO

12

19

(MSB)

20

23

(MSB)

24

(MSB)

(000Fh)
FUA

(LSB)
Reserved

Obsolete

Reserved

LOGICAL BLOCK ADDRESS

(LSB)
EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG

(LSB)

25

(MSB)

27
28

31

(18h)

Reserved

11

26

GROUP NUMBER

7
8

(7Fh)

Reserved

EXPECTED LOGICAL BLOCK APPLICATION TAG

LOGICAL BLOCK APPLICATION TAG MASK

(LSB)
(LSB)

(MSB)
TRANSFER LENGTH

(LSB)

The operation code field, the additional cdb length field, and the service action field are defined in SPC-4 and
shall be set to the values shown in table 118 for the WRITE ATOMIC (32) command.
See the WRITE (32) command (see 5.36) for the definitions of the other fields in this command.

5.43 WRITE LONG (10) command


The WRITE LONG (10) command (see table 119) requests that the device server mark a logical block or
physical block as containing a pseudo unrecovered error, or transfer data for a single logical block or physical
block from the Data-Out Buffer and write it to the medium. The data written shall be the same length and shall
be in the same order as the data returned by the READ LONG (10) command (see 5.19). The device server
shall write the logical block or physical block to the medium and shall not complete the command with GOOD
status until the logical block has been written on the medium without error. If a cache contains the specified

206

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

logical block or physical block, then the device server shall invalidate that logical block or physical block in the
cache.
NOTE 22 - Migration from the WRITE LONG (10) command to the WRITE LONG (16) command is
recommended for all implementations.

Table 119 WRITE LONG (10) command


Bit
Byte

4
OPERATION CODE

COR_DIS

(MSB)

WR_UNCOR

(3Fh)
Reserved

PBLOCK

Obsolete

LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

(MSB)

BYTE TRANSFER LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 119 for the
WRITE LONG (10) command.

Working Draft SCSI Block Commands 4 (SBC-4)

207

T10/BSR INCITS 506 Revision 3

27 August 2014

The correction disabled (COR_DIS) bit, the write uncorrectable error (WR_UNCOR) bit, and the physical block
(PBLOCK) bit are defined in table 120. If there is more than one logical block per physical block (i.e., the
LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field in the READ CAPACITY (16) parameter data (see 5.16.2)
is set to a non-zero value), then the device server shall support the WR_UNCOR bit and the PBLOCK bit.

Table 120 COR_DIS bit, WR_UNCOR bit, and PBLOCK bit (part 1 of 2)

COR_DIS

WR_UNCOR

PBLOCK

More than
one logical
block per
physical
block

yes or no

Write only the specified logical block using the value in the
field.

BYTE TRANSFER LENGTH

no

Terminate the WRITE LONG command with CHECK


CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID
FIELD IN CDB.

yes

Write the entire physical block containing the specified


logical block using the value in the BYTE TRANSFER LENGTH
field.

Description

yes or no

Mark only the specified logical block as containing a


pseudo unrecovered error with correction enabled
(see 4.18.2) in a manner that causes the device server to
perform the maximum error recovery as defined by the
Read-Write Error Recovery mode page (see 6.5.8).
Ignore the BYTE TRANSFER LENGTH field, and transfer no
data.

no

1
yes

Terminate the WRITE LONG command with CHECK


CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID
FIELD IN CDB.
Mark the entire physical block containing the specified
logical block as containing a pseudo unrecovered error
with correction enabled (i.e., mark all of the logical blocks
in the same physical block that contains the specified
logical block as containing a pseudo unrecovered error
with correction enabled) (see 4.18.2).
Ignore the BYTE TRANSFER LENGTH field, and transfer no
data.

Key:
yes
no

208

= The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is set to a non-zero value in the READ
CAPACITY (16) parameter data (see 5.16.2).
= The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is set to zero in the READ
CAPACITY (16) parameter data.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3


Table 120 COR_DIS bit, WR_UNCOR bit, and PBLOCK bit (part 2 of 2)

COR_DIS

WR_UNCOR

PBLOCK

More than
one logical
block per
physical
block

yes or no

Description

Mark only the specified logical block as containing a


pseudo unrecovered error with correction disabled
(see 4.18.2).
Write only the specified logical block using the value in the
field.

BYTE TRANSFER LENGTH

no
1

1
yes

Terminate the WRITE LONG command with CHECK


CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID
FIELD IN CDB.
Mark the entire physical block containing the specified
logical block as containing a pseudo unrecovered error
with correction disabled (i.e., mark all of the logical blocks
in the same physical block that contains the specified
logical block as containing a pseudo unrecovered error
with correction disabled) (see 4.18.2).
Write the entire physical block containing the specified
logical block using the value in the BYTE TRANSFER LENGTH
field.

yes or no

Mark only the specified logical block as containing a


pseudo unrecovered error with correction disabled
(see 4.18.2).
Ignore the BYTE TRANSFER LENGTH field, and transfer no
data.

no
1

1
yes

Terminate the WRITE LONG command with CHECK


CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID
FIELD IN CDB.
Mark the entire physical block containing the specified
logical block as containing a pseudo unrecovered error
with correction disabled (i.e., mark all of the logical blocks
in the same physical block that contains the specified
logical block as containing a pseudo unrecovered error
with correction disabled) (see 4.18.2).
Ignore the BYTE TRANSFER LENGTH field, and transfer no
data.

Key:
yes
no

= The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is set to a non-zero value in the READ
CAPACITY (16) parameter data (see 5.16.2).
= The LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field is set to zero in the READ
CAPACITY (16) parameter data.

Working Draft SCSI Block Commands 4 (SBC-4)

209

T10/BSR INCITS 506 Revision 3

27 August 2014

The setting of the CD_SUP bit in the Extended INQUIRY Data VPD page (see SPC-4) indicates whether or not
the logical unit supports the COR_DIS bit being set to one, and the setting of the WU_SUP bit indicates whether
or not the logical unit supports the WR_UNCOR bit being set to one.
The LOGICAL BLOCK ADDRESS field specifies an LBA. If the specified LBA exceeds the capacity of the medium
(see 4.5), then the device server shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS
OUT OF RANGE.
If table 120 defines that the value in the BYTE TRANSFER LENGTH field is used, then the BYTE TRANSFER LENGTH
field specifies the number of bytes of data that the device server shall transfer from the Data-Out Buffer and
write to the specified logical block or physical block. If the BYTE TRANSFER LENGTH field is not set to zero and
does not match the data length that the device server returns for a READ LONG command (see 5.19 and
see 5.20), then the device server shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB. In the
sense data (see 4.18 and SPC-4), the ILI bit shall be set to one, and the difference (i.e., residue) of the
requested length minus the actual length in bytes shall be reported in the INFORMATION field (see SPC-4).
Negative values shall be indicated by two's complement notation. If the BYTE TRANSFER LENGTH field is set to
zero, then no bytes shall be written. This condition shall not be considered an error.
The CONTROL byte is defined in SAM-5.

5.44 WRITE LONG (16) command


The WRITE LONG (16) command (see table 121) requests that the device server mark a logical block or
physical block as containing an error, or transfer data for a single logical block or physical block from the
Data-Out Buffer and write it to the medium. The data written shall be the same length and shall be in the same
order as the data returned by the READ LONG (16) command (see 5.20). The device server shall write the
logical block or physical block to the medium and shall not complete the command with GOOD status until the
logical block has been written on the medium without error. If a cache contains the specified logical block or
physical block, then the device server shall invalidate that logical block or physical block in the cache.
This command uses the SERVICE ACTION OUT (16) CDB format (see A.2).

Table 121 WRITE LONG (16) command


Bit
Byte

0
COR_DIS

(MSB)

PBLOCK

(9Fh)
SERVICE ACTION

(11h)

(LSB)
Reserved

11

210

WR_UNCOR

LOGICAL BLOCK ADDRESS

10

13

OPERATION CODE

12

(MSB)

BYTE TRANSFER LENGTH

14

Reserved

15

CONTROL

(LSB)

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The OPERATION CODE field and SERVICE ACTION field are defined in SPC-4 and shall be set to the values shown
in table 121 for the WRITE LONG (16) command.
See the WRITE LONG (10) command (see 5.43) for the definitions of the fields in this command.

5.45 WRITE SAME (10) command


The WRITE SAME (10) command (see table 122) requests that the device server transfer a single logical
block from the Data-Out Buffer and for each LBA in the specified range of LBAs:
a) perform a write operation using the contents of that logical block; or
b) perform an unmap operation.
The device server writes (i.e., subsequent read operations behave as if the device server wrote the single
block of user data received from the Data-Out Buffer to each logical block without modification
(see 4.7.3.4.3)).
If the medium is formatted with protection information and the WRPROTECT field is set to 000b, then the device
server shall write the LOGICAL BLOCK GUARD field, APPLICATION TAG field, and LOGICAL BLOCK REFERENCE TAG
field (see 4.22) for each logical block as required in the WRPROTECT field equals 000b row of table 109.
If:
a) the medium is formatted with protection information;
b) the WRPROTECT field is not set to 000b or a reserved value (see table 109); and
c) the protection information from the Data-Out Buffer is set to FFFF_FFFF_FFFF_FFFFh,
then the device server shall write FFFF_FFFF_FFFF_FFFFh to the protection information for each logical
block.
If:
a) the medium is formatted with type 1 or type 2 protection information;
b) the WRPROTECT field is not set to 000b or a reserved value (see table 109); and
c) the protection information from the Data-Out Buffer is not set to FFFF_FFFF_FFFF_FFFFh,
then:
a) the device server shall write the value from the LOGICAL BLOCK REFERENCE TAG field (see 4.22)
received in the logical block from the Data-Out Buffer into the corresponding LOGICAL BLOCK
REFERENCE TAG field of the first logical block written. The device sever shall write the value of the
previous LOGICAL BLOCK REFERENCE TAG field plus one into each of the subsequent LOGICAL BLOCK
REFERENCE TAG fields;
b) if the ATO bit is set to one in the Control mode page (see SPC-4) and the and the ATMPE bit is set to
zero in the Control mode page, then the device server shall write the logical block application tag
received in the logical block from the Data-Out Buffer into the corresponding LOGICAL BLOCK
APPLICATION TAG field (see 4.22) of each logical block;
c) if the ATO bit is set to one in the Control mode page and the and the ATMPE bit is set to zero in the
Control mode page, then the device server shall write the value defined in the Application Tag mode
page (see 6.5.3) into the corresponding LOGICAL BLOCK APPLICATION TAG field of each logical block;
d) if the ATO bit is set to zero in the Control mode page, then the device server may write any value into
the LOGICAL BLOCK APPLICATION TAG field of each logical block; and
e) the device server shall write the value from the LOGICAL BLOCK GUARD field (see 4.22) received in the
logical block from the Data-Out Buffer into the corresponding LOGICAL BLOCK GUARD field of each
logical block.
If:
a) the medium is formatted with type 3 protection information;
b) the WRPROTECT field is not set to 000b or a reserved value (see table 109); and
c) the protection information from the Data-Out Buffer is not set to FFFF_FFFF_FFFF_FFFFh,

Working Draft SCSI Block Commands 4 (SBC-4)

211

T10/BSR INCITS 506 Revision 3

27 August 2014

then:
a) if the ATO bit is set to one in the Control mode page (see SPC-4), then the device server shall write the
value from the LOGICAL BLOCK REFERENCE TAG field and the LOGICAL BLOCK APPLICATION TAG field
received in the logical block from the Data-Out Buffer into the corresponding LOGICAL BLOCK
REFERENCE TAG field of each logical block;
b) if the ATO bit is set to zero in the Control mode page, then the device server may write any value into
the LOGICAL BLOCK REFERENCE TAG field of each logical block; and
c) the device server shall write the value from the LOGICAL BLOCK GUARD field and the LOGICAL BLOCK
APPLICATION TAG field received in the logical block from the Data-Out Buffer into the corresponding
LOGICAL BLOCK GUARD field of each logical block.
NOTE 23 - Migration from the WRITE SAME (10) command to the WRITE SAME (16) command is
recommended for all implementations.

Table 122 WRITE SAME (10) command


Bit
Byte

0
WRPROTECT

8
9

ANCHOR

(41h)
Obsolete

UNMAP

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

4
OPERATION CODE

1
2

(MSB)

GROUP NUMBER
NUMBER OF LOGICAL BLOCKS

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 122 for the
WRITE SAME (10) command.
See the WRITE (10) command (see 5.33) for the definition of the WRPROTECT field.

212

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the logical unit supports logical block provisioning management (see 4.7.3), then the ANCHOR bit in the CDB,
the UNMAP bit in the CDB, and the ANC_SUP bit in the Logical Block Provisioning VPD page (see 6.6.5)
determine how the device server processes the command as described in table 123.

Table 123 UNMAP bit, ANCHOR bit, and ANC_SUP bit relationships
UNMAP

bit a

ANCHOR

bit

Action

0 or 1

Write c

0 or 1

Error d

0 or 1

Deallocate request
(see 4.7.3.4.3)

Error d

Anchor request
(see 4.7.3.4.3)

b
c
d

bit b

ANC_SUP

The device server in a logical unit that supports logical block provisioning management (see 4.7.3) may
implement the UNMAP bit.
See the Logical Block Provisioning VPD page (see 6.6.5).
The device server shall perform the specified write operation to each LBA specified by the command.
The device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.

The device server shall ignore the UNMAP bit and the ANCHOR bit, or the device server shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to INVALID FIELD IN CDB if:
a) the logical unit is fully provisioned (i.e., the LBPME bit is set to zero in the READ CAPACITY (16)
parameter data (see 5.16.2)); and
b) the UNMAP bit is set to one or the ANCHOR bit is set to one.
See the PRE-FETCH (10) command (see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field.
See the PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER field.
If the WSNZ bit is set to zero in the Block Limits VPD page (see 6.6.4), then a NUMBER OF LOGICAL BLOCKS field
set to a non-zero value specifies the number of contiguous logical blocks that are requested be unmapped or
written, starting with the logical block referenced by the LBA specified by the LOGICAL BLOCK ADDRESS field.
If the WSNZ bit is set to zero, then a NUMBER OF LOGICAL BLOCKS field set to zero specifies that the number of
contiguous logical blocks that are requested to be unmapped or written includes all of the logical blocks
starting with the LBA specified in the LOGICAL BLOCK ADDRESS field to the last logical block on the medium. If
the WSNZ bit is set to one and the NUMBER OF LOGICAL BLOCKS field is set to zero, then the device server shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN CDB.
If the number of logical blocks specified to be unmapped or written exceeds the value indicated in the
MAXIMUM WRITE SAME LENGTH field in the Block Limits VPD page (see 6.6.4), then the device server shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN CDB.
See the WRITE (10) command (see 5.33) for the definition of the CONTROL byte.

Working Draft SCSI Block Commands 4 (SBC-4)

213

T10/BSR INCITS 506 Revision 3

27 August 2014

5.46 WRITE SAME (16) command


The WRITE SAME (16) command (see table 124) requests that the device server perform the actions defined
for the WRITE SAME (10) command (see 5.45).

Table 124 WRITE SAME (16) command


Bit
Byte

OPERATION CODE

WRPROTECT

(MSB)

10

13

(MSB)

ANCHOR

(93h)
Obsolete

UNMAP

NDOB

LOGICAL BLOCK ADDRESS

(LSB)
NUMBER OF LOGICAL BLOCKS

(LSB)
Reserved

14
15

GROUP NUMBER
CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 124 for the
WRITE SAME (16) command.
The no Data-Out Buffer (NDOB) bit specifies if data is transferred from the Data-Out Buffer. Table 125 defines
the interactions between the NDOB bit and the UNMAP bit.

Table 125 NDOB bit and UNMAP bit interactions


NDOB

UNMAP

Description

0 or 1

The device server shall process the command using logical block data from the
Data-Out Buffer.

The device server shall terminate the command with CHECK CONDITION status with
the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID
FIELD IN CDB.

The device server shall not transfer data from the Data-Out Buffer and shall process the
command as if the Data-Out Buffer contained user data set to all zeroes and protection
information, if any, containing:
a) the LOGICAL BLOCK GUARD field set to FFFFh;
b) the LOGICAL BLOCK REFERENCE TAG field set to FFFF_FFFFh; and
c) the LOGICAL BLOCK APPLICATION TAG field set to FFFFh.

A NDOB bit set to zero specifies that the device server shall process the command using logical block data
from the Data-Out Buffer. A NDOB bit set to one specifies that the device server shall not transfer data from the
Data-Out Buffer and shall process the command as if the Data-Out Buffer contained user data set to all zeroes
and protection information, if any, containing:
a) the logical block guard field set to FFFFh;
b) the logical block reference tag field set to FFFF_FFFFh; and
c) the logical block application tag field set to FFFFh.
214

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

See the WRITE SAME (10) command (see 5.45) for the definitions of the other fields in this command.

5.47 WRITE SAME (32) command


The WRITE SAME (32) command (see table 126) requests that the device server perform the actions defined
for the WRITE SAME (10) command (see 5.45).
The device server shall process a WRITE SAME (32) command only if type 2 protection is enabled
(see 4.22.2.4).

Table 126 WRITE SAME (32) command


Bit
Byte

OPERATION CODE

CONTROL

Reserved

7
8

SERVICE ACTION

9
10

WRPROTECT

ANCHOR

12

19

(MSB)

20

23

(MSB)

24

(MSB)

(000Dh)

UNMAP

(LSB)
Obsolete

NDOB

LOGICAL BLOCK ADDRESS

(LSB)
EXPECTED INITIAL LOGICAL BLOCK REFERENCE TAG

(LSB)

25

(MSB)

27
28

31

(18h)

Reserved

11

26

GROUP NUMBER
ADDITIONAL CDB LENGTH

(MSB)

(7Fh)

Reserved

EXPECTED LOGICAL BLOCK APPLICATION TAG

LOGICAL BLOCK APPLICATION TAG MASK

(LSB)
(LSB)

(MSB)
NUMBER OF LOGICAL BLOCKS

(LSB)

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 126 for the WRITE SAME (32) command.
See the WRITE SAME (10) command (see 5.45) for the definitions of the CONTROL byte, the GROUP NUMBER
field, the WRPROTECT field, the LOGICAL BLOCK ADDRESS field, the NUMBER OF LOGICAL BLOCKS field, the UNMAP
bit, and the ANCHOR bit.
Working Draft SCSI Block Commands 4 (SBC-4)

215

T10/BSR INCITS 506 Revision 3

27 August 2014

See the WRITE SAME (16) command (see 5.46) for the definition of the NDOB bit.
If checking of the LOGICAL BLOCK REFERENCE TAG field is enabled (see table 109 in 5.33), then the EXPECTED
INITIAL LOGICAL BLOCK REFERENCE TAG field contains the value of the LOGICAL BLOCK REFERENCE TAG field
expected in the protection information of the first logical block accessed by the command instead of a value
based on the LBA (see 4.22.3).
If the ATO bit is set to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK
APPLICATION TAG field is enabled (see table 109 in 5.33), then the LOGICAL BLOCK APPLICATION TAG MASK field
contains a value that is a bit mask for enabling the checking of the LOGICAL BLOCK APPLICATION TAG field in
every instance of protection information for each logical block accessed by the command. A LOGICAL BLOCK
APPLICATION TAG MASK bit set to one enables the checking of the corresponding bit of the EXPECTED LOGICAL
BLOCK APPLICATION TAG field with the corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in every
instance of protection information. A LOGICAL BLOCK APPLICATION TAG MASK field bit set to zero disables the
checking of the corresponding bit of the EXPECTED LOGICAL BLOCK APPLICATION TAG field with the
corresponding bit of the LOGICAL BLOCK APPLICATION TAG field in every instance of protection information.
If the ATO bit is set to one in the Control mode page (see SPC-4) and checking of the LOGICAL BLOCK
APPLICATION TAG field is disabled (see table 109 in 5.33), or if the ATO bit is set to zero, then the LOGICAL BLOCK
APPLICATION TAG MASK field and the EXPECTED LOGICAL BLOCK APPLICATION TAG field shall be ignored.

5.48 WRITE USING TOKEN command


5.48.1 WRITE USING TOKEN command overview

The WRITE USING TOKEN command (see table 127) requests that the copy manager (see SPC-4) write
logical block data represented by the specified ROD token to the specified LBAs.

Table 127 WRITE USING TOKEN command


Bit
Byte

(83h)

Reserved

SERVICE ACTION

(11h)

Reserved

(MSB)

10

13

(MSB)

15

4
OPERATION CODE

14

LIST IDENTIFIER

(LSB)
PARAMETER LIST LENGTH

(LSB)
Reserved

GROUP NUMBER
CONTROL

The OPERATION CODE field and the SERVICE ACTION field are defined in SPC-4 and shall be set to the values
shown in table 127 for the WRITE USING TOKEN command.
The LIST IDENTIFIER field is defined in SPC-4. The list identifier shall be processed as if the LIST ID USAGE field
is set to 00b in the parameter data for an EXTENDED COPY(LID4) command (see SPC-4).
216

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The PARAMETER LIST LENGTH field specifies the length in bytes of the parameter data that is available to be
transferred from the Data-Out Buffer. A PARAMETER LIST LENGTH set to zero specifies that no data shall be
transferred. This shall not be considered an error.
See the PRE-FETCH (10)FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER
field.
The CONTROL byte is defined in SAM-5.
5.48.2 WRITE USING TOKEN parameter list

The parameter list for the WRITE USING TOKEN command is defined in table 128.

Table 128 WRITE USING TOKEN parameter list


Bit
Byte
0

(MSB)

WRITE USING TOKEN DATA LENGTH

(n - 1)

(LSB)
IMMED

Reserved
(MSB)
OFFSET INTO ROD

(LSB)
ROD TOKEN

528

533

Reserved

535

DEL_TKN

16

527

534

Reserved

15

BLOCK DEVICE RANGE DESCRIPTOR LENGTH

(n - 535)

Block device range descriptor list (if any)


536

551

Block device range descriptor [first] (see 5.7.3)

n - 15

Block device range descriptor [last] (see 5.7.3)

The WRITE USING TOKEN DATA LENGTH field specifies the length in bytes of the data that is available to be
transferred from the Data-Out Buffer. The write using token data length does not include the number of bytes
in the WRITE USING TOKEN DATA LENGTH field.

Working Draft SCSI Block Commands 4 (SBC-4)

217

T10/BSR INCITS 506 Revision 3

27 August 2014

If the WRITE USING TOKEN DATA LENGTH field is less than 0226h (i.e., 550), then the copy manager shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the contents of the WRITE USING TOKEN DATA LENGTH field is not equal to the contents of the BLOCK DEVICE
RANGE DESCRIPTOR LENGTH field plus 534 then the device server should terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
INVALID FIELD IN PARAMETER LIST.
The immediate (IMMED) bit specifies when the copy manager shall return status for the WRITE USING TOKEN
command. If the IMMED bit is set to zero, then the copy manager shall process the WRITE USING TOKEN
command until all specified operations are complete or an error is detected. If the IMMED bit is set to one, then
the copy manager:
1)
2)
3)
4)
5)

shall validate the CDB (i.e., detect and report all errors in the CDB);
shall transfer all the parameter data to the copy manager;
may validate the parameter data;
shall complete the WRITE USING TOKEN command with GOOD status; and
shall complete processing of all specified operations as a background operation (see SPC-4).

If the operations specified by a WRITE USING TOKEN command are processed as a background operation
(i.e., the IMMED bit is set to one) (see SPC-4), then the copy manager shall not generate deferred errors (see
SAM-5) to report the errors encountered, if any, during this processing. The copy manager shall make error
information available to an application client using a RECEIVE ROD TOKEN INFORMATION command
(see 5.22).
A delete token (DEL_TKN) bit set to one specifies that the ROD token specified in the ROD TOKEN field should be
deleted when processing of the WRITE USING TOKEN command is complete. A DEL_TKN bit set to zero
specifies that the ROD token lifetime for the ROD token specified in the ROD TOKEN field shall be as described
in SPC-4.
The OFFSET INTO ROD field specifies the offset into the data represented by the ROD token from the first byte
represented by the ROD token to the first byte to be transferred. The offset is specified in number of blocks
based on the logical block length of the logical unit to which the WRITE USING TOKEN command is to write
data. The copy manager that processes the WRITE USING TOKEN command shall compute the byte offset
into the ROD by multiplying the contents of the OFFSET INTO ROD field by the logical block length of the logical
unit to which the WRITE USING TOKEN command is to write data.
EXAMPLE - To calculate an offset, a ROD token is created from LBAs 15 to 20 followed by LBAs 40 to 100 by a copy
manager associated with a logical unit with a logical block length of 512 bytes per logical block. That ROD token is
specified in a WRITE USING TOKEN command that transfers one logical block to a logical unit with a logical block length
of 4 096 bytes per logical block. The subsequent RECEIVE ROD TOKEN INFORMATION command indicates the
successful transfer of 4 096 bytes by setting the TRANSFER COUNT field to one. To create a WRITE USING TOKEN
command that transfers bytes from the ROD token starting at the point where the previous WRITE USING TOKEN
command stopped, the OFFSET INTO ROD field is set to one (i.e., the contents of the TRANSFER COUNT field) plus the value in
the OFFSET INTO ROD field in the previous WRITE USING TOKEN command (i.e., zero). The copy manager multiplies one
(i.e., the value in the OFFSET INTO ROD field) by 4 096 (i.e., the logical block length for the logical unit to which the data is
being written) and the result is 4 096. As a result, the ROD token logical block that is the start of the transfer is LBA 8 (i.e.,
LBA 42 from the logical unit whose logical block length is 512 bytes per logical block that was used to create the ROD
token).

If the computed byte offset into the ROD is greater than or equal to the number of bytes represented by the
ROD token, then the copy manager shall terminate the command with CHECK CONDITION status with the
sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER
LIST.
If the ROD TOKEN LENGTH field (see SPC-4) in the ROD TOKEN field is not set to 01F8h, then the copy manager
shall terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST
and the additional sense key set to INVALID TOKEN OPERATION, INVALID TOKEN LENGTH.

218

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The ROD TOKEN field specifies the ROD token that represents the data from which logical block data is written.
The ROD token is defined as follows:
a) a ROD token returned by a RECEIVE ROD TOKEN INFORMATION command; or
b) a block device zero ROD token (see 4.30.4).
If the ROD token does not match any known to the copy manager, then the copy manager shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to INVALID TOKEN OPERATION, TOKEN UNKNOWN.
The BLOCK DEVICE RANGE DESCRIPTOR LENGTH field specifies the length in bytes of the block device range
descriptor list. The block device range descriptor list length should be a multiple of 16. If the block device
range descriptor list length is not a multiple of 16, then the last block device range (see 5.7.3) descriptor is
incomplete and shall be ignored. If the block device range descriptor list length is less than 16, then the copy
manager shall terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the number of complete block device range descriptors is larger than the MAXIMUM RANGE DESCRIPTORS field
in the Block Device ROD Token Limits descriptor (see 6.6.7.3), then the copy manager shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to TOO MANY SEGMENT DESCRIPTORS.
If the same LBA is included in more than one block device range descriptor, then the copy manager shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the number of bytes of user data represented by the sum of the contents of the NUMBER OF LOGICAL BLOCKS
fields in all of the complete block device range descriptors is larger than:
a) the MAXIMUM BYTES IN BLOCK ROD field in the block ROD device type specific features descriptor in the
ROD token features third-party copy descriptor in the Third-party Copy VPD page (see SPC-4) and
that field is set to a nonzero value; or
b) the MAXIMUM TOKEN TRANSFER SIZE field in the Block Device ROD Token Limits descriptor
(see 6.6.7.3) and that field is set to a nonzero value,
then the copy manager shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
If the number of bytes of user data represented by the sum of the contents of the NUMBER OF LOGICAL BLOCKS
fields in all of the complete block device range descriptors is larger than the number of bytes in the data
represented by the ROD token minus the computed byte offset into the ROD (i.e., the total requested length of
the transfer exceeds the length of the data available in the data represented by the ROD token), then the copy
manager shall:
a) transfer as many whole logical blocks as possible; and
b) if any portion of a logical block that is written by the copy manager corresponds to offsets into the
ROD at or beyond the length of the data represented by the ROD token, then write that portion of the
logical block with user data with all bits set to zero.
The copy manager may perform this check during the processing of each block device range descriptor.

5.49 XDWRITEREAD (10) command


The XDWRITEREAD (10) command (see table 129) requests that the device server perform the following as
an uninterrupted sequence of actions (see 4.27):
1) perform read operations from the specified LBAs;
2) transfer the specified number of logical blocks from the Data-Out Buffer;
3) perform an XOR operation on:
A) the user data contained in the logical blocks from the read operations; and

Working Draft SCSI Block Commands 4 (SBC-4)

219

T10/BSR INCITS 506 Revision 3

27 August 2014

B) the user data contained in the logical blocks transferred from the Data-Out Buffer;
4) store the results of the XOR operation (i.e., the XOR data) in a buffer;
5) if the DISABLE WRITE bit is set to zero, then perform write operations to the specified LBAs using the
logical block data transferred from the Data-Out Buffer; and
6) transfer the results of the XOR operation to the Data-In Buffer.
The device server may process the LBAs in any order but shall perform this sequence in the specified order
for a given LBA.
Logical block data for this command may include protection information, based on the WRPROTECT field, the
bit, and the medium format. This command is only available on transport protocols supporting
bidirectional commands.

XORPINFO

Table 129 XDWRITEREAD (10) command


Bit
Byte

0
WRPROTECT

DPO

DISABLE
WRITE

Obsolete

XORPINFO

(53h)

FUA

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

4
OPERATION CODE

1
2

(MSB)

GROUP NUMBER
TRANSFER LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 129 for the
XDWRITEREAD (10) command.
See the WRITE (10) command (see 5.33) for the definitions of the WRPROTECT field and the FUA bit.
See the READ (10) command (see 5.11) for the definition of the DPO bit.
A DISABLE WRITE bit set to zero specifies that the device server shall perform a write operation using data
transferred from the Data-Out Buffer after the XOR operation is complete. A DISABLE WRITE bit set to one
specifies that the device server shall not perform a write operation.
If the XOR protection information (XORPINFO) bit is set to zero, then the device server shall not check or
transmit protection information.
If the XORPINFO bit is set to one, the device server supports protection information, and the medium has been
formatted with protection information, then the device server shall transmit protection information but shall not
check any of the protection information fields.
If the XORPINFO bit is set to one and the device server:
a) supports protection information and the medium has not been formatted with protection information or
b) does not support protection information,
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
See the PRE-FETCH (10) command (see 5.8) for the definition of the LOGICAL BLOCK ADDRESS field.
See the PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of the GROUP NUMBER field.

220

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The TRANSFER LENGTH field specifies the number of contiguous logical blocks of data that the device server
shall read, transfer from the Data-Out Buffer, and XOR into a buffer, starting with the logical block referenced
by the LBA specified by the LOGICAL BLOCK ADDRESS field. If the specified LBA and the specified transfer
length exceed the capacity of the medium (see 4.5), then the device server shall terminate the command with
CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set
to LOGICAL BLOCK ADDRESS OUT OF RANGE. The TRANSFER LENGTH field is constrained by the MAXIMUM
TRANSFER LENGTH field in the Block Limits VPD page (see 6.6.5).
The CONTROL byte is defined in SAM-5.

5.50 XDWRITEREAD (32) command


The XDWRITEREAD (32) command (see table 130) requests that the device server perform the actions
defined for the XDWRITEREAD (10) command (see 5.49).

Table 130 XDWRITEREAD (32) command


Bit
Byte

OPERATION CODE

CONTROL

Reserved

7
8

SERVICE ACTION

9
10

WRPROTECT

DPO

(0007h)
FUA

(LSB)
DISABLE
WRITE

Obsolete

XORPINFO

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)

20

27
28

31

(18h)

Reserved

11
12

19

GROUP NUMBER
ADDITIONAL CDB LENGTH

(MSB)

(7Fh)

Reserved

Reserved
(MSB)
TRANSFER LENGTH

(LSB)

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 130 for the XDWRITEREAD (32) command.
See the XDWRITEREAD (10) command (see 5.49) for the definitions of the other fields in this command.

Working Draft SCSI Block Commands 4 (SBC-4)

221

T10/BSR INCITS 506 Revision 3

27 August 2014

5.51 XPWRITE (10) command


The XPWRITE (10) command (see table 131) requests that the device server perform the following as an
uninterrupted sequence of actions (see 4.27):
1) perform read operations from the specified LBAs;
2) transfer the specified number of logical blocks from the Data-Out Buffer;
3) perform an XOR operation on:
A) the user data contained in the logical block data from the read operations; and
B) the user data contained in the logical block data transferred from the Data-Out Buffer;
and
4) perform write operations to the specified LBAs using the results of the XOR operation (i.e., the XOR
data).
The device server may process the LBAs in any order but shall perform this sequence in the specified order
for a given LBA.
Logical block data for this command may include protection information, based on the XORPINFO bit and the
medium format.

Table 131 XPWRITE (10) command


Bit
Byte

Reserved

8
9

DPO

Reserved

Obsolete

XORPINFO

(51h)

FUA

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)
Reserved

6
7

4
OPERATION CODE

1
2

(MSB)

GROUP NUMBER
TRANSFER LENGTH

(LSB)

CONTROL

The OPERATION CODE field is defined in SPC-4 and shall be set to the value shown in table 131 for the
XPWRITE (10) command.
See the READ (10) command (see 5.11) for the definition of the DPO bit. See the WRITE (10) command
(see 5.33) for the definition of the FUA bit. See the PRE-FETCH (10) command (see 5.8) for the definition of
the LOGICAL BLOCK ADDRESS field. See the PRE-FETCH (10) command (see 5.8) and 4.23 for the definition of
the GROUP NUMBER field.
If the XOR protection information (XORPINFO) bit is set to zero, the device server supports protection
information, and the medium has been formatted with protection information, then the device server shall
terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN CDB.
If the XORPINFO bit is set to one, the device server supports protection information, and the medium has been
formatted with protection information, then the device server shall XOR the logical block data transferred from
the Data-Out Buffer with the logical block data read, and then write the resulting XOR data. The device server
shall not check any of the protection information fields.

222

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the XORPINFO bit is set to one and the device server:


a) supports protection information and the medium has not been formatted with protection information;
or
b) does not support protection information,
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.
The TRANSFER LENGTH field specifies the number of contiguous logical blocks that shall be read, XORed with
logical blocks transferred from the Data-Out Buffer, and written, starting with the logical block referenced by
the LBA specified by the LOGICAL BLOCK ADDRESS field. If the specified LBA and the specified transfer length
exceed the capacity of the medium (see 4.5), then the device server shall terminate the command with
CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set
to LOGICAL BLOCK ADDRESS OUT OF RANGE. The TRANSFER LENGTH field is constrained by the MAXIMUM
TRANSFER LENGTH field in the Block Limits VPD page (see 6.6.4).
The CONTROL byte is defined in SAM-5.

5.52 XPWRITE (32) command


The XPWRITE (32) command (see table 132) requests that the device server perform the actions defined for
the XPWRITE (10) command (see 5.51).

Table 132 XPWRITE (32) command


Bit
Byte

OPERATION CODE

CONTROL

Reserved

7
8

SERVICE ACTION

Reserved

10

DPO

(0006h)
FUA

(LSB)
Reserved

Obsolete

XORPINFO

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)

20

27
28

31

(18h)

Reserved

11
12

19

GROUP NUMBER
ADDITIONAL CDB LENGTH

(MSB)

(7Fh)

Reserved

Reserved
(MSB)
TRANSFER LENGTH

Working Draft SCSI Block Commands 4 (SBC-4)

(LSB)

223

T10/BSR INCITS 506 Revision 3

27 August 2014

The OPERATION CODE field, the ADDITIONAL CDB LENGTH field, and the SERVICE ACTION field are defined in SPC-4
and shall be set to the values shown in table 132 for the XPWRITE (32) command.
See the XPWRITE (10) command (see 5.51) for the definitions of the other fields in this command.

224

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6 Parameters for direct access block devices


6.1 Parameters for direct access block devices introduction
Table 133 shows the parameters for direct access block devices defined in clause 6 and a reference to the
subclause where each parameter type is defined.

Table 133 Parameters for direct access block devices


Parameter type

Reference

Address descriptors

6.2

Diagnostic parameters

6.3

Log parameters

6.4

Mode parameters

6.5

Vital product data (VPD) parameters

6.6

Copy manager parameters

6.7

6.2 Address descriptors


6.2.1 Address descriptor overview

This subclause describes the address descriptors (see table 134) used for:
a) the FORMAT UNIT command (see 5.3);
b) the READ DEFECT DATA commands (see 5.17 and 5.18);
c) the Translate Address Input diagnostic page (see 6.3.4) for the SEND DIAGNOSTIC command (see
SPC-4); and
d) the Translate Address Output diagnostic page (see 6.3.5) for the RECEIVE DIAGNOSTIC RESULTS
command (see SPC-4).
The format type of an address descriptor is:
a) specified in the DEFECT LIST FORMAT field in the CDB for the FORMAT UNIT command (see 5.3.1);
b) indicated in the DEFECT LIST FORMAT field in the READ DEFECT DATA parameter data (see 5.17.2 and
5.18.2);
c) specified in the SUPPLIED FORMAT field and the TRANSLATE FORMAT field for the Translate Address
Output diagnostic page; or
d) indicated in the SUPPLIED FORMAT field and the TRANSLATE FORMAT field for the Translate Address Input
diagnostic page.

Working Draft SCSI Block Commands 4 (SBC-4)

225

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 134 defines the types of address descriptors.

Table 134 Address descriptors

Type

Description

Reference

000b

Short block format address descriptor

6.2.2
a

001b

Extended bytes from index format address descriptor

010b

Extended physical sector format address descriptor a

6.2.4

011b

Long block format address descriptor

6.2.5

100b

Bytes from index format address descriptor a

101b

Physical sector format address descriptor

110b

Vendor specific

111b

Reserved

6.2.3

6.2.6

6.2.7

This address descriptor format type is defined for direct access block devices using
rotating media (see 4.3.2).

6.2.2 Short block format address descriptor

A format type of 000b specifies the short block format address descriptor (see table 135).

Table 135 Short block format address descriptor (000b)


Bit
Byte
0

(MSB)
SHORT BLOCK ADDRESS

(LSB)

For the FORMAT UNIT parameter list, the SHORT BLOCK ADDRESS field specifies a four-byte LBA. If the
physical block containing the logical block referenced by the specified LBA contains additional logical blocks,
then the device server may consider the LBAs of those additional logical blocks to also have been specified.
For the READ DEFECT DATA parameter data, the SHORT BLOCK ADDRESS field indicates a vendor specific
four-byte value.
For the Translate Address diagnostic pages, the SHORT BLOCK ADDRESS field contains:
a) a four-byte LBA, if the value is less than or equal to the capacity of the medium; or
b) a vendor specific four-byte value, if the value is greater than the capacity of the medium.
6.2.3 Extended bytes from index address descriptor

A format type of 001b specifies the extended bytes from index format address descriptor (see table 136). For
the FORMAT UNIT parameter list and the READ DEFECT DATA parameter data, this address descriptor
contains the location of a defect that:
a) is the length of one track (see 4.3.2);
b) is less than the length of a physical block; or
c) starts from one address descriptor and extends to the next address descriptor.

226

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

For the Translate Address diagnostic pages, this address descriptor contains the location of an LBA. For the
Translate Address Output diagnostic page (see 6.2.5), if the SUPPLIED FORMAT field is set to 001b and the
MADS bit in the ADDRESS TO TRANSLATE field is set to one, then the device server shall terminate the SEND
DIAGNOSTIC command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN PARAMETER LIST.

Table 136 Extended bytes from index format address descriptor (001b)
Bit

Byte

(MSB)

CYLINDER NUMBER

(LSB)

HEAD NUMBER

Reserved

MADS

(MSB)
BYTES FROM INDEX

(LSB)

The CYLINDER NUMBER field contains the cylinder number (see 4.3.2).
The HEAD NUMBER field contains the head number (see 4.3.2).
A multi-address descriptor start (MADS) bit set to one specifies that this address descriptor defines the
beginning of a defect that spans multiple addresses. The defect may be a number of sequential physical
blocks on the same cylinder and head (i.e., a track) or may span a number of sequential tracks on the same
head. A MADS bit set to zero specifies that:
a) this address descriptor defines the end of a defect if the previous address descriptor has the MADS bit
set to one; or
b) this address descriptor defines a single track that contains one or more defects (i.e., the BYTES FROM
INDEX field contains FFF_FFFFh) or a single defect (i.e., the BYTES FROM INDEX field does not contain
FFF_FFFFh).
See 4.13.2 for valid combinations of two address descriptors that describe a defect.
The BYTES FROM INDEX field:
a) if not set to FFF_FFFFh, contains the number of bytes from the index (e.g., from the start of the track)
to the location being described; or
b) if set to FFF_FFFFh, specifies or indicates that the entire track is being described.
More than one logical block may be described by this address descriptor.
Table 137 defines the order of the fields used for sorting extended bytes from index format address
descriptors if the command using the address descriptors specifies sorting.

Table 137 Sorting order for extended bytes from index format address descriptors
Bit:

(MSB)
59

36 35

CYLINDER NUMBER

field

28 27

HEAD NUMBER

Working Draft SCSI Block Commands 4 (SBC-4)

field

BYTES FROM INDEX

(LSB)
0

field

227

T10/BSR INCITS 506 Revision 3

27 August 2014

6.2.4 Extended physical sector format address descriptor

A format type of 010b specifies the extended physical sector format address descriptor (see table 138). For
the FORMAT UNIT parameter list and the READ DEFECT DATA parameter data, this address descriptor
contains the location of a defect that:
a) is the length of one track (see 4.3.2);
b) is less than the length of a physical block; or
c) starts from one address descriptor and extends to the next address descriptor.
For the Translate Address diagnostic pages, this address descriptor specifies the location of an LBA. For the
Translate Address Output diagnostic page (see 6.2.5), if the SUPPLIED FORMAT field is set to 010b and the
MADS bit in the ADDRESS TO TRANSLATE field is set to one, then the device server shall terminate the SEND
DIAGNOSTIC command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and
the additional sense code set to INVALID FIELD IN PARAMETER LIST.

Table 138 Extended physical sector format address descriptor (010b)


Bit
Byte
0

(MSB)
CYLINDER NUMBER

(LSB)

3
4

HEAD NUMBER
MADS

Reserved

(MSB)
SECTOR NUMBER

(LSB)

The CYLINDER NUMBER field contains the cylinder number (see 4.3.2).
The HEAD NUMBER field contains the head number (see 4.3.2).
A multi-address descriptor start (MADS) bit set to one specifies that this address descriptor defines the
beginning of a defect that spans multiple addresses. The defect may span a number of sequential physical
blocks on the same cylinder and head (i.e., a track) or may span a number of sequential tracks on the same
head. A MADS bit set to zero specifies that:
a) this address descriptor defines the end of a defect if the previous address descriptor has the MADS bit
set to one; or
b) this address descriptor defines a single track that contains one or more defects (i.e., the SECTOR
NUMBER field contains FFF_FFFFh) or a single defect (i.e., the SECTOR NUMBER field does not contain
FFF_FFFFh).
See 4.13.2 for valid combinations of two address descriptors that describe a defect.
The SECTOR NUMBER field:
a) if not set to FFF_FFFFh, contains the sector number (see 4.3.2) of the location being described; or
b) if set to FFF_FFFFh, specifies or indicates that the entire track is being described.
More than one logical block may be described by this address descriptor.

228

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 139 defines the order of the fields used for sorting extended physical sector format address descriptors
if the command using the address descriptors specifies sorting.

Table 139 Sorting order for extended physical sector format address descriptors
(MSB)
59

Bit:

36 35

CYLINDER NUMBER

field

28 27

HEAD NUMBER

(LSB)
0

field

SECTOR NUMBER

field

6.2.5 Long block format address descriptor

A format type of 011b specifies the long block format address descriptor (see table 140).

Table 140 Long block format address descriptor (011b)


Bit
Byte

(MSB)

LONG BLOCK ADDRESS

(LSB)

For the FORMAT UNIT parameter list, the LONG BLOCK ADDRESS field specifies an eight-byte LBA. If the
physical block containing the logical block referenced by the specified LBA contains additional logical blocks,
then the device server may consider the LBAs of those additional logical blocks to also have been specified.
For the READ DEFECT DATA parameter data, the LONG BLOCK ADDRESS field indicates a vendor specific
eight-byte value.
For the Translate Address diagnostic pages, the LONG BLOCK ADDRESS field contains:
a) an eight-byte LBA, if the value is less than or equal to the capacity of the medium; or
b) a vendor specific eight-byte, if the value is greater than the capacity of the medium.
6.2.6 Bytes from index format address descriptor

A format type of 100b specifies the bytes from index format address descriptor (see table 141). This address
descriptor contains the location of a track or an offset from the start of a track.

Table 141 Bytes from index format address descriptor (100b)


Bit
Byte
0

(MSB)
CYLINDER NUMBER

(LSB)

3
4

HEAD NUMBER

(MSB)
BYTES FROM INDEX

Working Draft SCSI Block Commands 4 (SBC-4)

(LSB)

229

T10/BSR INCITS 506 Revision 3

27 August 2014

The CYLINDER NUMBER field contains the cylinder number (see 4.3.2).
The HEAD NUMBER field contains the head number (see 4.3.2).
The BYTES FROM INDEX field contains the number of bytes from the index (e.g., from the start of the track) to
the location being described. A BYTES FROM INDEX field set to FFFF_FFFFh specifies or indicates that the
entire track is being described.
More than one logical block may be described by this address descriptor.
Table 142 defines the order of the fields used for sorting bytes from index format address descriptors if the
command using the address descriptors specifies sorting.

Table 142 Sorting order for bytes from index format address descriptors
(MSB)
63

Bit:

40 39

CYLINDER NUMBER

field

32 31

HEAD NUMBER

(LSB)
0

field

BYTES FROM INDEX

field

6.2.7 Physical sector format address descriptor

A format type of 101b specifies the physical sector format address descriptor (see table 143). This address
descriptor contains the location of a track or a sector (see 4.3.2).
Table 143 Physical sector format address descriptor (101b)
Bit

Byte

(MSB)

CYLINDER NUMBER

HEAD NUMBER

(LSB)

(MSB)

SECTOR NUMBER

(LSB)

The CYLINDER NUMBER field contains the cylinder number (see 4.3.2).
The HEAD NUMBER field contains the head number (see 4.3.2).
The SECTOR NUMBER field contains the sector number (see 4.3.2). A SECTOR NUMBER field set to FFFF_FFFFh
specifies or indicates that the entire track is being described.
More than one logical block may be described by this address descriptor.
Table 144 defines the order of the fields used for sorting physical sector format address descriptors if the
command using the address descriptors specifies sorting.

Table 144 Sorting order for physical sector format address descriptors
Bit:

(MSB)
63

CYLINDER NUMBER

230

40 39

field

32 31

HEAD NUMBER

field

(LSB)
0

SECTOR NUMBER

field

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.3 Diagnostic parameters


6.3.1 Diagnostic parameters overview

See table 145 for references to the pages and descriptors for diagnostic parameters used by direct access
block devices.
The diagnostic pages and their corresponding page codes for direct access block devices are defined in
table 145.

Table 145 Diagnostic page codes for direct access block devices
Diagnostic page name

Page code

Reference

Diagnostic pages assigned by SPC-4

30h to 3Fh

SPC-4

Rebuild Assist Input diagnostic page


Rebuild Assist Output diagnostic page
SCSI enclosure services diagnostic pages
Supported Diagnostic Page diagnostic page
Translate Address Input diagnostic page
Translate Address Output diagnostic page
Obsolete

42h

6.3.3

01h to 2Fh

SES-3

00h

SPC-4

40h

6.3.4
6.3.5

41h

Vendor specific diagnostic pages

80h to FFh

Reserved for this standard

43h to 7Fh

Working Draft SCSI Block Commands 4 (SBC-4)

6.3.2

231

T10/BSR INCITS 506 Revision 3

27 August 2014

6.3.2 Rebuild Assist Input diagnostic page

An application client sends a RECEIVE DIAGNOSTIC RESULTS command to retrieve a Rebuild Assist Input
diagnostic page (see table 146), which provides information about whether the rebuild assist mode (see 4.20)
is enabled or not and a device servers rebuild assist mode capabilities.

Table 146 Rebuild Assist Input diagnostic page


Bit
Byte

3
4
5
6
7

PAGE CODE

(42h)

Reserved

1
2

(MSB)

PAGE LENGTH

(4 + (2 n))

(LSB)

Reserved

ENABLED

Reserved
PHYSICAL ELEMENT LENGTH

(n)

7+n

DISABLED PHYSICAL ELEMENT MASK

8+n

7 + (2 n)

DISABLED PHYSICAL ELEMENT

(if any)

(if any)

The PAGE CODE field and the PAGE LENGTH field are defined in SPC-4 and shall be set to the values defined in
table 146.
An ENABLED bit set to one indicates that the rebuild assist mode is enabled. An ENABLED bit set to zero
indicates that the rebuild assist mode is disabled.
The PHYSICAL ELEMENT LENGTH field indicates the length in bytes of the DISABLED PHYSICAL ELEMENT MASK field
and the length in bytes of the DISABLED PHYSICAL ELEMENT field.
The bits in the DISABLED PHYSICAL ELEMENT MASK field indicate the bits in the DISABLED PHYSICAL ELEMENT field
that are supported. Each bit set to one in the DISABLED PHYSICAL ELEMENT MASK field indicates that the
corresponding bit in the DISABLED PHYSICAL ELEMENT field is supported and may be set to one in a Rebuild
Assist Output diagnostic page sent with a SEND DIAGNOSTIC command.
The bits in the DISABLED PHYSICAL ELEMENT field indicate the physical elements that are disabled in this logical
unit. Each bit set to one indicates that a physical element is disabled, and the device server shall report
predicted read errors and predicted write errors for the associated group of LBAs.

232

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.3.3 Rebuild Assist Output diagnostic page

An application client sends a SEND DIAGNOSTIC command to send a Rebuild Assist Output diagnostic page
(see table 147) that:
a) enables or disables rebuild assist mode (see 4.20.2); and/or
b) puts the logical unit in a simulated failure mode by disabling physical elements in conjunction with
rebuild assist mode (see 4.20.5).

Table 147 Rebuild Assist Output diagnostic page


Bit
Byte

4
PAGE CODE

(42h)

Reserved

1
2

(MSB)

3
4

PAGE LENGTH

(LSB)

Reserved

ENABLE

Reserved

6
7

(4 + (2 n))

PHYSICAL ELEMENT LENGTH

(n)

7+n

DISABLED PHYSICAL ELEMENT MASK

8+n

7 + (2 n)

DISABLE PHYSICAL ELEMENT

(if any)

(if any)

The PAGE CODE field and the PAGE LENGTH field are defined in SPC-4 and shall be set to the values defined in
table 147.
An ENABLE bit set to one specifies that, after all fields in this diagnostic page have been validated:
a) a self-test of the physical elements in the logical unit may be performed; and
b) rebuild assist mode is enabled.
An ENABLE bit set to zero specifies that:
a) rebuild assist mode shall be disabled;
b) the other fields in this page shall be ignored; and
c) all physical elements shall be enabled.
The PHYSICAL ELEMENT LENGTH field shall be set to the same
LENGTH field in the Rebuild Assist Input diagnostic page.

value that is returned in the PHYSICAL ELEMENT

If the PHYSICAL ELEMENT LENGTH field is not set to the same value that is returned in the PHYSICAL ELEMENT
LENGTH field in the Rebuild Assist Input diagnostic page, then the device server shall terminate the command
with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code
set to INVALID FIELD IN PARAMETER LIST.
The device server shall ignore the DISABLED PHYSICAL ELEMENT MASK field.
Each bit in the DISABLE PHYSICAL ELEMENT field specifies a physical element that shall be disabled. A bit set to
one in the DISABLE PHYSICAL ELEMENT field specifies that the device server shall respond to read commands
Working Draft SCSI Block Commands 4 (SBC-4)

233

T10/BSR INCITS 506 Revision 3

27 August 2014

and write commands specifying LBAs associated with that physical element as if the associated LBAs have
predicted errors. A bit set to zero in the DISABLE PHYSICAL ELEMENT field specifies that the device server shall
respond to read commands and write commands specifying LBAs associated with that physical element as if
the associated LBAs do not have predicted errors. If the ENABLE bit is set to one, and the DISABLE PHYSICAL
ELEMENT field specifies:
a) any bits set to one that are not supported by the logical unit;
b) all bits that are supported by the logical unit are set to one; or
c) setting to zero any bits that are set to one,
then the device server shall terminate the command with CHECK CONDITION status with the sense key set
to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
6.3.4 Translate Address Input diagnostic page

Table 148 defines the Translate Address Input diagnostic page sent by a device server in response to a
RECEIVE DIAGNOSTIC RESULTS command after a Translate Address Output diagnostic page (see 6.3.4)
has been sent by an application client with the SEND DIAGNOSTIC command. If a Translate Address Output
diagnostic page has not yet been processed by the device server, the results of a RECEIVE DIAGNOSTIC
RESULTS command requesting this diagnostic page are vendor specific.

Table 148 Translate Address Input diagnostic page


Bit
Byte

PAGE CODE

(MSB)

(40h)

PAGE LENGTH

(n - 3)

Reserved

4
5

Reserved

1
2

RAREA

ALTSEC

ALTTRK

(LSB)
SUPPLIED FORMAT

Reserved

TRANSLATED FORMAT

Translated address list


6

13

(MSB)
TRANSLATED ADDRESS

1 (if any)
(LSB)

n-7

(MSB)
TRANSLATED ADDRESS

x (if any)
(LSB)

The PAGE CODE field is defined in SPC-4 and shall be set to the value shown in table 148 for the Translate
Address Input diagnostic page.
The PAGE LENGTH field is defined in SPC-4.
The SUPPLIED FORMAT field contains the value from the SUPPLIED FORMAT field in the previous Translate
Address Output diagnostic page (see 6.3.5).
A reserved area (RAREA) bit set to zero indicates that no part of the translated address falls within a reserved
area of the medium (e.g., speed tolerance gap, alternate sector, or vendor reserved area). A RAREA bit set to
one indicates that all or part of the translated address falls within a reserved area of the medium. If the entire
translated address falls within a reserved area, then the device server may not return a translated address.
234

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

An alternate sector (ALTSEC) bit set to zero indicates that no part of the translated address is located in an
alternate sector of the medium or that the device server is unable to determine this information. An ALTSEC bit
set to one indicates that the translated address is located in an alternate sector of the medium. If the device
server is unable to determine if all or part of the translated address is located in an alternate sector, then the
device server shall set this bit to zero.
An alternate track (ALTTRK) bit set to zero indicates that no part of the translated address is located on an
alternate track of the medium. An ALTTRK bit set to one indicates that part or all of the translated address is
located on an alternate track of the medium or the device server is unable to determine if all or part of the
translated address is located on an alternate track.
The TRANSLATED FORMAT field contains the value from the TRANSLATE FORMAT field in the previous Translate
Address Output diagnostic page (see 6.3.4).
The TRANSLATED ADDRESS field(s) contains the address descriptor (see 6.2) that the device server translated
from the address descriptor supplied by the application client in the previous Translate Address Output
diagnostic page (see 6.3.5). Each field shall be in the format (see 6.2) specified in the TRANSLATED FORMAT
field. If the short block format address descriptor (see 6.2.2) is specified, then the first four bytes of the
TRANSLATED ADDRESS field shall contain the short block format address descriptor and the last four bytes shall
contain 0000_0000h.
If the returned data is in short block format (see 6.2.2), long block format (see 6.2.5), or physical sector format
(see 6.2.7) and the ADDRESS TO TRANSLATE field in the previous Translate Address Output diagnostic page
covers more than one address after it has been translated (e.g., because of multiple physical sectors within a
single logical block or multiple logical blocks within a single physical sector), then the device server shall
return all possible addresses that are contained in the area specified by the address to be translated. If the
returned data is in bytes from index format (see 6.2.6), the device server shall return a pair of translated
values for each of the possible addresses that are contained in the area specified by the ADDRESS TO
TRANSLATE field in the previous Translate Address Output diagnostic page. Of the pair of translated values
returned, the first indicates the starting location and the second the ending location of the area.

Working Draft SCSI Block Commands 4 (SBC-4)

235

T10/BSR INCITS 506 Revision 3

27 August 2014

6.3.5 Translate Address Output diagnostic page

The Translate Address diagnostic pages provides a method for an application client to have a device server
translate an address descriptor (see 6.2) from one format to another. The address descriptor to be translated
is sent to the device server in the Translate Address Output diagnostic page with a SEND DIAGNOSTIC
command and the results are returned by the device server in the Translate Address Input diagnostic page
sent in response to a RECEIVE DIAGNOSTIC RESULTS command.
Table 149 defines the format of the Translate Address Output diagnostic page sent with the SEND
DIAGNOSTIC command. The translated address returned in the Translate Address Input diagnostic page is
defined in 6.3.4.

Table 149 Translate Address Output diagnostic page


Bit
Byte

PAGE CODE

(40h)

Reserved

1
2

(MSB)

PAGE LENGTH

(000Ah)

(LSB)

Reserved

SUPPLIED FORMAT

Reserved

TRANSLATE FORMAT

13

(MSB)
ADDRESS TO TRANSLATE

(LSB)

The PAGE CODE field and PAGE LENGTH field are defined in SPC-4 and shall be set to the values shown in
table 149 for the Translate Address Output diagnostic page.
The SUPPLIED FORMAT field specifies the format (see 6.2) of the ADDRESS TO TRANSLATE field. If the device
server does not support the requested format, then the device server shall terminate the SEND DIAGNOSTIC
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to INVALID FIELD IN PARAMETER LIST.
The TRANSLATE FORMAT field specifies the format (see 6.2) the device server shall use for the result of the
address translation. If the device server does not support the specified format, then the device server shall
terminate the SEND DIAGNOSTIC command with CHECK CONDITION status with the sense key set to
ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.
The ADDRESS TO TRANSLATE field contains a single address descriptor that the application client is requesting
the device server to translate. The format of this field depends on the value in the SUPPLIED FORMAT field. The
formats are described in 6.2. If the short block format address descriptor is specified, then the first four bytes
of the ADDRESS TO TRANSLATE field shall contain the short block format address descriptor and the last four
bytes shall contain 0000_0000h.

236

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4 Log parameters


6.4.1 Log parameters overview
6.4.1.1 Summary of log pages

See table 150 for references to the log pages and their corresponding page codes and subpage codes for
direct access block devices. See SPC-4 for a detailed description of logging operations.

Table 150 Log page codes and subpage codes for direct access block devices
Log page name

Page code a Subpage code a Reference

Application Client log page

0Fh

00h

SPC-4

ATA PASS-THROUGH Results

16h

00h

SAT-3

Background Scan Results log page

15h

00h

6.4.2

Buffer Over-Run/Under-Run log page

01h

00h

SPC-4

Format Status log page

08h

00h

6.4.3

Informational Exceptions log page

2Fh

00h

SPC-4

Last n Deferred Errors Or Asynchronous Events log page

0Bh

00h

SPC-4

Last n Error Events log page

07h

00h

SPC-4

Logical Block Provisioning log page

0Ch

00h

6.4.4

Non-Medium Error log page

06h

00h

SPC-4

Non-volatile Cache log page

17h

00h

6.4.5

Pending Defects log page

15h

01h

6.4.6

Protocol-Specific Port log pages

18h

00h to FEh

SPC-4

Read Error Counters log page

03h

00h

SPC-4

Self-Test Results log page

10h

00h

SPC-4

Solid State Media log page

11h

00h

6.4.7

Start-Stop Cycle Counter log page

0Eh

00h

SPC-4

Supported Log Pages log page

00h

FFh

SPC-4

Supported Log Pages and Subpages log page

00h

00h

SPC-4

Supported Subpages

01h to 3Fh

FFh

SPC-4

Temperature log page

0Dh

00h

SPC-4

Verify Error Counters log page

05h

00h

SPC-4

Write Error Counters log page

02h

00h

SPC-4

30h to 3Eh

00h to FEh

n/a

Vendor specific
a

All page code and subpage code combinations not shown in this table are reserved.

Working Draft SCSI Block Commands 4 (SBC-4)

237

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.1.2 Setting and resetting log parameters

In a LOG SELECT command (see SPC-4), an application client may specify that:
a) all the parameters in a log page or pages are to be reset (i.e., the PCR bit set to one and the
PARAMETER LIST LENGTH field is set to zero); or
b) individual parameters in log page are to be changed to specified new values (i.e., the PCR bit is set to
zero and the PARAMETER LIST LENGTH field is not set to zero).
The device server processing of LOG SELECT commands (see SPC-4) that request changes to individual log
parameters or reset all log parameters depend on the log parameter that is being changed or reset, and is
specified in the table that defines the log parameter using the keywords defined in table 151 (also see SPC-4).

Table 151 Keywords for resetting or changing log parameters


Device server processing when:

Keyword
PCR

bit is set to one a

Always

Reset the log parameter.

Reset Only

Reset the log parameter.

Never

a
b

Do not reset the log parameter; see


the LOG SELECT command in
SPC-4 for description of possible
error conditions.

PCR

bit is set to zero b

Change the log parameter.


If any changes are requested in the PARAMETER VALUE
field of the log parameter, then:
a) terminate the command with CHECK CONDITION
status, with the sense key set to ILLEGAL
REQUEST, and the additional sense code set to
INVALID FIELD IN PARAMETER LIST; and
b) do not make any requested changes in any field in
any log parameter in any log page

If the PCR bit is set to one, and the PARAMETER LIST LENGTH field is not set to zero, then the device
server shall terminate the LOG SELECT command (see SPC-4).
If the PCR bit is set to zero, and the PARAMETER LIST LENGTH field is set to zero. then no log parameters
are changed (see SPC-4).

6.4.2 Background Scan log page


6.4.2.1 Background Scan log page overview

Using the format shown in table 153, the Background Scan log page reports information about:
a) background pre-scan operations (see 4.24.2) and background medium scan operations (see 4.24.3);
and
b) any logical blocks where an error was detected during a background scan operation.

238

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The parameter codes for the Background Scan log page are defined in table 152.

Table 152 Background Scan log page parameter codes


Parameter code

Description

Resettable or
Changeable a

Reference

Support
required

0000h

Background Scan Status

Never

6.4.2.2

Mandatory

0001h to 0800h

Background Scan Results

Reset Only

6.4.2.3

Optional b

8000h to AFFFh

Vendor specific

n/a

Optional

All others
a
b

Reserved

The keywords in this column Always, Reset Only, and Never are defined in 6.4.1.2.
If the Background Scan log page is supported, then at least one Background Scan Results log
parameter shall be supported.

The Background Scan log page has the format defined in table 153.

Table 153 Background Scan log page


Bit

Byte
0

DS

(1b)

1
2
3

6
SPF

(0b)

PAGE CODE
SUBPAGE CODE

(MSB)

PAGE LENGTH

(15h)

(00h)

(n - 3)

(LSB)

Background scan parameters


4

Background scan parameter [first] (if any)

Background scan parameter [last] (if any)

The disable save (DS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field, and the
PAGE LENGTH field are described in SPC-4.
The DS bit, the SPF bit, the PAGE CODE field, and the SUBPAGE CODE field shall be set to the values shown in
table 153 for the Background Scan log page.
If the device server processes a LOG SELECT command with the PCR bit set to one (see SPC-4), then the
device server shall:
a) not change the values in the Background Scan Status log parameter; and
b) delete all Background Scan Results log parameters.

Working Draft SCSI Block Commands 4 (SBC-4)

239

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.2.2 Background Scan Status log parameter

The Background Scan Status log parameter for the Background Scan log page has the format defined in
table 154.

Table 154 Background Scan Status log parameter format


Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

(0000h)

DU

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

(LSB)

BACKGROUND SCAN STATUS

(MSB)

11

(MSB)

13
15

FORMAT AND LINKING

ACCUMULATED POWER ON MINUTES

14

(LSB)

(MSB)

Reserved

12

(0Ch)

8
10

Parameter control byte binary format list log parameter (see SPC-4)

3
4

(MSB)

NUMBER OF BACKGROUND SCANS PERFORMED

BACKGROUND SCAN PROGRESS

NUMBER OF BACKGROUND MEDIUM SCANS PERFORMED

(LSB)
(LSB)
(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 154 for the
Background Scan Status log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Background Scan
Status log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 154 for the
Background Scan Status log parameter.
The ACCUMULATED POWER ON MINUTES field indicates the number of minutes the device server has been
powered on since manufacturing.

240

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 155 defines the BACKGROUND SCAN STATUS field.

Table 155 BACKGROUND SCAN STATUS field


Code

Description

00h

No background scan operation is active.

01h

A background medium scan operation is active.

02h

A background pre-scan operation is active.

03h

A background scan operation was halted due to a fatal error.

04h

A background scan operation was halted due to a vendor specific pattern of errors.

05h

A background scan operation was halted due to the medium being formatted without the
PLIST.

06h

A background scan operation was halted due to a vendor specific cause.

07h

A background scan operation was halted due to the temperature being out of the allowed
range.

08h

Background medium scan operations are enabled (i.e., the EN_BMS bit is set to one in the
Background Control mode page (see 6.5.4)), and no background medium scan operation is
active (i.e., the device server is waiting for Background Medium Scan Interval timer expiration
before starting the next background medium scan operation).

09h

A background scan operation was halted due to the S_L_FULL bit being set to one in the
Background Control mode page (see 6.5.4) and the background scan results list being full.

0Ah

A background pre-scan operation was halted due to the Background Pre-scan Time Limit
timer expiring.

0Bh to FFh

Reserved

The NUMBER OF BACKGROUND SCANS PERFORMED field indicates the number of background scan operations
(i.e., the total number of background pre-scan operations plus the number of background medium scan
operations) that have been performed since the SCSI target device was shipped by the manufacturer.
The BACKGROUND SCAN PROGRESS field indicates the percent complete of a background scan operation in
progress. The returned value is a numerator that has 65 536 (i.e., 1_0000h) as its denominator. If there is no
background scan operation in progress (i.e., no background scan operation has been initiated since power on
or the most recent background scan operation has completed), then the device server shall set the
BACKGROUND SCAN PROGRESS field to 0000h.
The NUMBER OF BACKGROUND MEDIUM SCANS PERFORMED field indicates the number of background medium
scan operations that have been performed since the SCSI target device was shipped by the manufacturer. If
the NUMBER OF BACKGROUND MEDIUM SCANS PERFORMED field contains 0000h, then the number of background
medium scan operations is unknown.
The total number of background pre-scan operations that have been performed is the value in the NUMBER OF
BACKGROUND SCANS PERFORMED field minus the value in the NUMBER OF BACKGROUND MEDIUM SCANS
PERFORMED field.

Working Draft SCSI Block Commands 4 (SBC-4)

241

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.2.3 Background Scan Results log parameter

The Background Scan Results log parameter for the Background Scan log page has the format defined in
table 156. If the Background Scan log page is reset, then all Background Scan Results log parameters are
discarded. If no errors have occurred during a background scan or the Background Scan log page has been
reset, then no Background Scan Results log parameters shall be present.

Table 156 Background Scan Results log parameter format


Bit
Byte
0

(MSB)

DU

(0001h to 0800h)

Obsolete

TSD

ETC
PARAMETER LENGTH

(LSB)

TMC

FORMAT AND LINKING

(14h)

(MSB)
ACCUMULATED POWER ON MINUTES

(LSB)

REASSIGN STATUS

SENSE KEY

ADDITIONAL SENSE CODE

10

ADDITIONAL SENSE CODE QUALIFIER

11

15

Vendor specific

16

23

Parameter control byte binary format list log parameter (see SPC-4)

3
4

PARAMETER CODE

1
2

(MSB)
LOGICAL BLOCK ADDRESS

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to a value from 0001h through 0800h in
sequence as errors are discovered during a background scan operation. When all of the supported parameter
code values have been used, and a new error is discovered during a background scan operation, the oldest
Background Scan Results log parameter in the list (i.e., the Background Scan Results log parameter with the
smallest value in the ACCUMULATED POWER ON MINUTES field) shall be discarded, and the PARAMETER CODE field
in the Background Scan Results log parameter for the new defect shall be set to the parameter code value of
the discarded Background Scan Results log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for a Background Scan
Results log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is defined in SPC-4 and shall be set to the value shown in table 156 for the
Background Scan Results log parameter.
The ACCUMULATED POWER ON MINUTES field indicates the number of minutes that the device server has been
powered on since manufacturing at the time the background scan error reported in the Background Scan
Results log parameter occurred.

242

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Table 157 defines the REASSIGN STATUS field.

Table 157 REASSIGN STATUS field (part 1 of 2)


Reason
Code

LOWIR

bit a

Original
error b

Additional conditions

1h

Yes

Yes

Recovered or
unrecovered

2h

Yes

No

Recovered

The device server performed automatic read reassignment for the


LBA (i.e., performed a reassign operation for the LBA and a write
operation with recovered logical block data). d

4h

Yes

Yes

Recovered

The device servers attempt to perform automatic read reassignment


failed. The logical block may or may not now have an uncorrectable
error. c

5h

Yes

No

Recovered

The error was corrected by the device server rewriting the logical
block without performing a reassign operation.

6h

7h

Yes

Yes

Yes

Yes

The LBA has not yet been reassigned. c

Recovered or
unrecovered

Either:
a) an application client caused automatic write reassignment for the
LBA with a command performing a write operation; or
b) the LBPRZ bit is set to one in the Logical Block Provisioning VPD
page (see 6.6.5), and an application client caused an unmap
operation for the LBA. c

Recovered or
unrecovered

Either:
a) an application client caused a reassign operation for the LBA with
a REASSIGN BLOCKS command; or
b) the LBPRZ bit is set to zero in the Logical Block Provisioning VPD
page (see 6.6.5), and an application client caused an unmap
operation for the LBA. c

Key:
Yes
No
a
b

= specifies that a Background Scan Results log parameter shall be generated for the error.
= specifies that a Background Scan Results log parameter shall not be generated for the error
The LOWIR bit in the Background Control mode page (see 6.5.4).
Type of error detected while reading the logical block referenced by the LBA specified by the LOGICAL
BLOCK ADDRESS field in the Background Scan Results log parameter (see 6.4.2.3) during a background
scan operation.
The REASSIGN STATUS field in a given log parameter changes from 1h or 4h to 6h, 7h, or 8h when a
reassign operation, write operation, or unmap operation on the LBA succeeds or when a reassign
operation on the LBA fails. After the LBA is reassigned, any subsequent medium error occurring for the
LBA is reported in a new log parameter with the same value in the LOGICAL BLOCK ADDRESS field as the
value in the LOGICAL BLOCK ADDRESS field in the log parameter for the previous medium error for the
LBA.
The ARRE bit in the Read-Write Error Recovery mode page (see 6.5.8) controls automatic read
reassignment based on errors detected during all read medium operations, including those that are
part of background scan operations.

Working Draft SCSI Block Commands 4 (SBC-4)

243

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 157 REASSIGN STATUS field (part 2 of 2)


Reason
LOWIR

Code

8h

Yes

All
others

bit a
1

Yes

Original
error b

Recovered or
unrecovered

Additional conditions

An application clients request for a reassign operation for the LBA


with a REASSIGN BLOCKS command failed. The logical block
referenced by the LBA may or may not still have an uncorrectable
error.

Reserved

Key:
Yes
No
a
b

= specifies that a Background Scan Results log parameter shall be generated for the error.
= specifies that a Background Scan Results log parameter shall not be generated for the error
The LOWIR bit in the Background Control mode page (see 6.5.4).
Type of error detected while reading the logical block referenced by the LBA specified by the LOGICAL
BLOCK ADDRESS field in the Background Scan Results log parameter (see 6.4.2.3) during a background
scan operation.
The REASSIGN STATUS field in a given log parameter changes from 1h or 4h to 6h, 7h, or 8h when a
reassign operation, write operation, or unmap operation on the LBA succeeds or when a reassign
operation on the LBA fails. After the LBA is reassigned, any subsequent medium error occurring for the
LBA is reported in a new log parameter with the same value in the LOGICAL BLOCK ADDRESS field as the
value in the LOGICAL BLOCK ADDRESS field in the log parameter for the previous medium error for the
LBA.
The ARRE bit in the Read-Write Error Recovery mode page (see 6.5.8) controls automatic read
reassignment based on errors detected during all read medium operations, including those that are
part of background scan operations.

If sense data is available, then the device server shall set the SENSE KEY field, the ADDITIONAL SENSE CODE
field, and the ADDITIONAL SENSE CODE QUALIFIER field to a hierarchy of additional information relating to error
conditions that occurred during the background scan operation. The content of these fields is represented in
the same format used by the sense data (see SPC-4).
The LOGICAL BLOCK ADDRESS field indicates the LBA associated with the medium error.

244

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.3 Format Status log page


6.4.3.1 Format Status log page overview

Using the format shown table 159, the Format Status log page reports information about the most recent
successful format operation and the state of the direct access block device since that operation was
performed. The parameter codes for the Format Status log page are listed in table 158.

Table 158 Format Status log page parameter codes


Parameter code

Description

Reference

Support
Required

0000h

Format Data Out

Never

6.4.3.2

Mandatory

0001h

Grown Defects During Certification

Never

6.4.3.3

Mandatory

0002h

Total Blocks Reassigned During


Format

Never

6.4.3.4

Mandatory

0003h

Total New Blocks Reassigned

Never

6.4.3.5

Mandatory

0004h

Power On Minutes Since Format

Never

6.4.3.6

Mandatory

0005h to 7FFFh

Reserved

8000h to FFFFh

Vendor specific

Resettable or
Changeable a

Optional

The keywords in this column Always, Reset Only, and Never are defined in 6.4.1.2.

The Format Status log page has the format defined in table 159.

Table 159 Format Status log page


Bit

Byte
0

DS

(1b)

1
2
3

6
SPF

(0b)

PAGE CODE
SUBPAGE CODE

(MSB)

PAGE LENGTH

(08h)

(00h)

(n - 3)

(LSB)

Format Status log parameters


4

Format Status log parameter [first]

Format Status log parameter [last]

The disable save (DS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field, and the
PAGE LENGTH field are described in SPC-4.

Working Draft SCSI Block Commands 4 (SBC-4)

245

T10/BSR INCITS 506 Revision 3

27 August 2014

The DS bit, the SPF bit, the PAGE CODE field, and the SUBPAGE CODE field shall be set to the values shown in
table 159 for the Format Status log page.
If a format operation has never been performed by the logical unit, then the log parameter for each Format
Status log parameter listed in table 158 is not defined by this standard. If a device server begins a format
operation, then the device server shall set each byte of the log parameter data (i.e., bytes four to n of the log
parameter), if any, to FFh for each Format Status log parameter (e.g., if the PARAMETER LENGTH field is set to
02h, then the log parameter data is set to FFFFh).
If the most recent format operation failed or the information for a Format Status log parameter is not available,
then the device server shall return FFh in each byte of the log parameter data (i.e., bytes four to n of the log
parameter), if any, for the Format Status log parameter (e.g., if the PARAMETER LENGTH field is set to 04h, then
the log parameter data shall be set to FFFF_FFFFh). The device server shall set each Format Status log
parameter to be a multiple of four bytes.
6.4.3.2 Format Data Out log parameter

The Format Data Out log parameter of the Format Status log page has the format defined in table 160.

Table 160 Format Data Out log parameter format


Bit
Byte
0

(MSB)

(0000h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

PARAMETER CODE

1
2

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(n - 3)

(MSB)
FORMAT DATA OUT

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 160 for the
Format Data Out log parameter.
The DU bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Format Data Out log parameter
shall be set for a binary format list log parameter as described in SPC-4.
The target save disable (TSD) bit (see SPC-4) shall be set to zero for the Format Data Out log parameter,
indicating that the logical unit saves the Format Data Out log parameter at vendor specific intervals without
any request from an application client.
The PARAMETER LENGTH field is described in SPC-4.
After a successful format operation, the FORMAT DATA OUT field contains the FORMAT UNIT parameter list
(see 5.3.2).

246

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.3.3 Grown Defects During Certification log parameter

The Grown Defects During Certification log parameter for the Format Status log page has the format defined
in table 161.

Table 161 Grown Defects During Certification log parameter format


Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

(0001h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

11

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
GROWN DEFECTS DURING CERTIFICATION

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 161 for the
Grown Defects During Certification log parameter.
The DU bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Grown Defects During
Certification log parameter shall be set for a binary format list log parameters as described in SPC-4.
The target save disable (TSD) bit (see SPC-4) shall be set to zero for the Grown Defects During Certification
log parameter, indicating that the logical unit saves the Grown Defects During Certification log parameter at
vendor specific intervals without any request from an application client.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 161 for the
Grown Defects During Certification log parameter.
After a successful format operation during which certification was performed, the GROWN DEFECTS DURING
CERTIFICATION field shall indicate the number of defects detected as a result of performing the certification. The
value in the GROWN DEFECTS DURING CERTIFICATION field count reflects only those defects detected and
replaced during the successful format operation that were not already part of the PLIST or GLIST.
After a successful format operation during which certification was not performed, the GROWN DEFECTS DURING
CERTIFICATION field shall be set to zero.

Working Draft SCSI Block Commands 4 (SBC-4)

247

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.3.4 Total Blocks Reassigned During Format log parameter

The Total Blocks Reassigned During Format log parameter for the Format Status log page has the format
defined in table 162.

Table 162 Total Blocks Reassigned During Format log parameter format
Bit
Byte
0

(MSB)

(0002h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

11

PARAMETER CODE

1
2

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
TOTAL BLOCKS REASSIGNED DURING FORMAT

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 162 for the Total
Blocks Reassigned During Format log parameter.
The DU bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Total Blocks Reassigned During
Format log parameter shall be set for a binary format list log parameters described in SPC-4.
The target save disable (TSD) bit (see SPC-4) shall be set to zero for the Total Blocks Reassigned During
Format log parameter, indicating that the logical unit saves the Total Blocks Reassigned During Format log
parameter at vendor specific intervals without any request from an application client.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 162 for the
Total Blocks Reassigned During Format log parameter.
The TOTAL BLOCKS REASSIGNED DURING FORMAT field contains the count of the total number of logical blocks
that were reassigned during the most recent successful format operation.

248

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.3.5 Total New Blocks Reassigned log parameter

The Total New Blocks Reassigned log parameter for the Format Status log page has the format defined in
table 163.

Table 163 Total New Blocks Reassigned log parameter format


Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

(0003h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

11

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
TOTAL NEW BLOCKS REASSIGNED

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 163 for the Total
New Blocks Reassigned log parameter.
The DU bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Total New Blocks Reassigned
log parameter shall be set for a binary format list log parameters described in SPC-4.
The target save disable (TSD) bit (see SPC-4) shall be set to zero for the Total New Blocks Reassigned log
parameter, indicating that the logical unit saves the Total New Blocks Reassigned log parameter at vendor
specific intervals without any request from an application client.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 163 for the
Total New Blocks Reassigned log parameter.
The TOTAL NEW BLOCKS REASSIGNED field contains a count of the total number of logical blocks that have been
reassigned since the completion of the most recent successful format operation.

Working Draft SCSI Block Commands 4 (SBC-4)

249

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.3.6 Power On Minutes Since Format log parameter

The Power On Minutes Since Format log parameter for the Format Status log page has the format defined in
table 164.

Table 164 Power On Minutes Since Format log parameter format


Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

(0004h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(04h)

(MSB)
POWER ON MINUTES SINCE FORMAT

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 164 for the
Power On Minutes Since Format log parameter.
The DU bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Power On Minutes Since Format
log parameter shall be set for a binary format list log parameter as described in SPC-4.
The target save disable (TSD) bit (see SPC-4) shall be set to zero for the Power On Minutes Since Format log
parameter, indicating that the logical unit saves the Power On Minutes Since Format log parameter at vendor
specific intervals without any request from an application client.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 164 for the
Power On Minutes Since Format log parameter.
The POWER ON MINUTES SINCE FORMAT field contains the unsigned number of usage minutes (i.e., minutes with
power applied regardless of power state) that have elapsed since the most recent successful format
operation.

250

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.4 Logical Block Provisioning log page


6.4.4.1 Logical Block Provisioning log page overview

Using the format defined in table 166, the Logical Block Provisioning log page reports the logical block
provisioning status of the logical unit. The parameter codes for the Logical Block Provisioning log page are
listed in table 165.

Table 165 Logical Block Provisioning log parameters


Parameter
code a

Description

Resettable or
Changeable b

Reference

Support
Required

Resources that are associated with thresholds (0000h to 00FFh)


0000h

Reserved

0001h

Available LBA Mapping Resource Count

Never

6.4.4.2

0002h

Used LBA Mapping Resource Count

Never

6.4.4.3

0003h to 00FFh

Optional c

Reserved

Resources that are not associated with thresholds (0000h to 00FFh)


0100h

De-duplicated LBA Resource Count

Never

6.4.4.4

0101h

Compressed LBA Resource Count

Never

6.4.4.5

0102h

Total Efficiency LBA Resource Count

Never

6.4.4.6

0103h to FFEFh

Reserved

FFF0h to FFFFh

Vendor specific

a
b
c

Optional

Parameter codes 0000h to 00FFh are coordinated with the THRESHOLD RESOURCE field in the threshold
descriptor of the Logical Block Provisioning mode page (see 6.5.7).
The keywords in this column Always, Reset Only, and Never are defined in 6.4.1.2.
If this log page is supported, then at least one parameter shall be supported. A logical block
provisioning log parameter in the range 0001h to 00FFh should be provided to report resource usage
for each threshold resource for which a threshold descriptor in the Logical Block Provisioning mode
page (see 6.5.7) is available.

Working Draft SCSI Block Commands 4 (SBC-4)

251

T10/BSR INCITS 506 Revision 3

27 August 2014

The Logical Block Provisioning log page has the format defined in table 166.

Table 166 Logical Block Provisioning log page


Bit

Byte
0

DS

(1b)

1
2
3

6
SPF

(0b)

PAGE CODE
SUBPAGE CODE

(MSB)

PAGE LENGTH

(0Ch)

(00h)

(n - 3)

(LSB)

Logical block provisioning parameter list


4

Logical block provisioning log parameter [first]

Logical block provisioning log parameter [last]

The disable save (DS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field, and the
PAGE LENGTH field are described in SPC-4.
The DS bit, the SPF bit, the PAGE CODE field, and the SUBPAGE CODE field shall be set to the values shown in
table 166 for the Logical Block Provisioning log page.

252

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.4.2 Available LBA Mapping Resource Count log parameter


6.4.4.2.1 Available LBA Mapping Resource Count log parameter overview

The Available LBA Mapping Resource Count log parameter of the Logical Block Provisioning log page has the
format defined in table 167.

Table 167 Available LBA Mapping Resource Count log parameter format
Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

(0001h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
RESOURCE COUNT

(LSB)
Reserved

8
9

11

SCOPE

Reserved

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 167 for the
Available LBA Mapping Resource Count log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Available LBA
Mapping Resource Count shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 167 for the
Available LBA Mapping Resource Count.
The RESOURCE COUNT field indicates an estimate of the number of available LBA mapping resources and is
defined in 6.4.4.2.2.
The SCOPE field indicates the scope to which the RESOURCE COUNT field applies and is defined in table 168.

Table 168 SCOPE field


Code

Description

00b

The scope of the resource count is not reported.

01b

The RESOURCE COUNT field indicates a resource that is dedicated to the logical unit. Usage of
resources on other logical units does not impact the resource count.

10b

The resource count field indicates resources that may or may not be dedicated to any logical unit
including the addressed logical unit. Usage of resources on other logical units may impact the
resource count.

11b

Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

253

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.4.2.2 RESOURCE COUNT field

The RESOURCE COUNT field indicates an estimate of the number of LBA resources expressed as a number of
threshold sets for the threshold resource indicated by the parameter code value. The nominal number of LBA
resources is calculated as follows:
LBA resources = resource count threshold set size
where:
resource count

is the value in the RESOURCE COUNT field; and


is the number of LBAs in each threshold set (i.e., 2 (threshold exponent) LBAs,
where the threshold exponent is indicated in the Logical Block Provisioning
VPD page (see 6.6.5)).

threshold set size

6.4.4.3 Used LBA Mapping Resource Count log parameter

The Used LBA Mapping Resource Count log parameter of the Logical Block Provisioning log page has the
format defined in table 169.

Table 169 Used LBA Mapping Resource Count log parameter format
Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

8
9

11

(0002h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
RESOURCE COUNT

(LSB)
Reserved

SCOPE

Reserved

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 169 for the Used
LBA Mapping Resource Count log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Used LBA Mapping
Resource Count log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 169 for the
Used LBA Mapping Resource Count log parameter.
The RESOURCE COUNT field indicates an estimate of the number of used LBA mapping resources and is
defined in 6.4.4.2.2.
The SCOPE field indicates the scope to which the RESOURCE COUNT field applies and is defined in table 168.

254

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.4.4 De-duplicated LBA Resource Count log parameter

The De-duplicated LBA Resource Count log parameter of the Logical Block Provisioning log page
(see table 170) contains information about de-duplicated LBA resources.

Table 170 De-duplicated LBA Resource Count log parameter format


Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

(0100h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
RESOURCE COUNT

(LSB)
Reserved

11

SCOPE

Reserved

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 170 for the
De-duplicated LBA Resource Count log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the De-duplicated LBA
Resource Count log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 170 for the
De-duplicated LBA Resource Count log parameter.
The RESOURCE COUNT field indicates an estimate of the number of LBA resources made available as a result
of de-duplication and is defined in 6.4.4.2.2.
The SCOPE field indicates the scope to which the RESOURCE COUNT field applies and is defined in table 168.

Working Draft SCSI Block Commands 4 (SBC-4)

255

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.4.5 Compressed LBA Resource Count log parameter

The Compressed LBA Resource Count log parameter of the Logical Block Provisioning log page
(see table 171) contains information about compressed LBA resources.

Table 171 Compressed LBA Resource Count log parameter format


Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

8
9

11

(0101h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
RESOURCE COUNT

(LSB)
Reserved

SCOPE

Reserved

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 171 for the
Compressed LBA Resource Count log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Compressed LBA
Resource Count log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 171 for the
Compressed LBA Resource Count log parameter.
The RESOURCE COUNT field indicates an estimate of the number of LBA resources made available as a result
of compression and is defined in 6.4.4.2.2.
The SCOPE field indicates the scope to which the RESOURCE COUNT field applies and is defined in table 168.

256

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.4.6 Total Efficiency LBA Resource Count log parameter

The Total Efficiency LBA Resource Count log parameter of the Logical Block Provisioning log page
(see table 172) contains information about the combined effects of all LBA resource efficiencies (e.g., the
result of the combination of de-duplicated LBA resources and compressed LBA resources).

Table 172 Total Efficiency LBA Resource Count log parameter format
Bit
Byte
0

(MSB)

PARAMETER CODE

1
2

(0102h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

3
4

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(08h)

(MSB)
RESOURCE COUNT

(LSB)
Reserved

11

SCOPE

Reserved

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 172 for the Total
Efficiency LBA Resource Count log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Total Efficiency LBA
Resource Count log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 172 for the
Total Efficiency LBA Resource Count log parameter.
The RESOURCE COUNT field indicates an estimate of the number of LBA resources made available by the
combined effects of all LBA resource efficiency methods (e.g., de-duplication and compression) and is defined
in 6.4.4.2.2. The algorithm used to calculate this value is not defined by this standard.
The SCOPE field indicates the scope to which the RESOURCE COUNT field applies and is defined in table 168.

Working Draft SCSI Block Commands 4 (SBC-4)

257

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.5 Non-volatile Cache log page


6.4.5.1 Non-volatile Cache log page overview

Using the format shown in table 174, the Nonvolatile Cache log page reports the status of battery backup for a
nonvolatile cache. The parameter codes for the Nonvolatile Cache log page are listed in table 173.

Table 173 Nonvolatile Cache log parameters


Parameter code

Resettable or
Changeable a

Reference

Support
Required

0000h

Remaining Nonvolatile Time

Never

6.4.5.2

Mandatory

0001h

Maximum Nonvolatile Time

Never

6.4.5.3

Mandatory

All others
a

Description

Reserved

The keywords in this column Always, Reset Only, and Never are defined in 6.4.1.2.

The Nonvolatile Cache log page has the format defined in table 174.

Table 174 Nonvolatile Cache log page


Bit
Byte
0

7
DS

1
2
3

6
SPF

(0b)

PAGE CODE
SUBPAGE CODE

(MSB)

PAGE LENGTH

(17h)

(00h)

(n - 3)

(LSB)

Nonvolatile cache log parameters


4

Non-volatile cache log parameter [first] (see table 173)

Nonvolatile cache log parameter [last] (see table 173)

The disable save (DS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field, and the
PAGE LENGTH field are described in SPC-4.
The SPF bit, the PAGE CODE field, and the SUBPAGE CODE field shall be set to the values shown in table 174 for
the Nonvolatile Cache log page.

258

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.5.2 Remaining Nonvolatile Time log parameter

The Remaining Nonvolatile Time log parameter of the Nonvolatile Cache log page has the format defined in
table 175.

Table 175 Remaining Nonvolatile Time parameter data


Bit
Byte
0

(MSB)

(0000h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(04h)

Obsolete

4
5

PARAMETER CODE

1
2

(MSB)
REMAINING NONVOLATILE TIME

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 175 for the
Remaining Nonvolatile Time log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Remaining
Nonvolatile Time log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 175 for the
Remaining Nonvolatile Time log parameter.
The REMAINING NONVOLATILE TIME field is defined in table 176.

Table 176 REMAINING NONVOLATILE TIME field


Code

Description

00_0000h

Nonvolatile cache is volatile, either permanently or temporarily (e.g., if batteries require


recharging).

00_0001h

Nonvolatile cache is expected to remain nonvolatile for an unknown amount of time (e.g., if
battery status is unknown)

00_0002h to
FF_FFFEh
FF_FFFFh

Nonvolatile cache is expected to remain nonvolatile for the number of minutes indicated
(e.g., for the life of the battery supplying power to random access memory).
Nonvolatile cache is indefinitely nonvolatile.

Working Draft SCSI Block Commands 4 (SBC-4)

259

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.5.3 Maximum Nonvolatile Time log parameter

The Maximum Nonvolatile Time log parameter of the Nonvolatile Cache log page has the format defined in
table 177.

Table 177 Maximum Nonvolatile Time parameter data


Bit
Byte
0

(MSB)

(0001h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(04h)

Obsolete

4
5

PARAMETER CODE

1
2

(MSB)
MAXIMUM NONVOLATILE TIME

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 177 for the
Maximum Nonvolatile Time log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Maximum
Nonvolatile Time log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 177 for the
Maximum Nonvolatile Time log parameter.
The MAXIMUM NONVOLATILE TIME field is defined in table 178.

Table 178 MAXIMUM NONVOLATILE TIME field


Code

Description

00_0000h

Nonvolatile cache is volatile

00_0001h

Reserved

00_0002h to
FF_FFFEh
FF_FFFFh

260

Nonvolatile cache is capable of being nonvolatile for the estimated number of minutes
indicated. If the time is based on batteries, then the time shall be based on the last full
charge capacity rather than the design capacity of the batteries.
Nonvolatile cache is indefinitely nonvolatile.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.4.6 Pending Defects log page


6.4.6.1 Overview

Using the format defined in table 180, the Pending Defects log page reports an unsorted list of logical blocks
for which the device server has detected an unrecovered medium error. The parameter codes for the Pending
Defects log page are listed in table 179.
Table 179 Pending Defects log page parameter codes
Parameter code

Reference

Resettable or
Changeable a

Description

Support
required

0000h

Pending Defect
Count

Never

6.4.6.2

Mandatory

0001h to F000h

Pending Defect

Never

6.4.6.3

Mandatory b

All others

Reserved

a
b

The keywords in this column Always, Reset Only, and Never are defined in 6.4.1.2.
If the Pending Defects log page is supported, then at least one Pending Defect log parameter shall be
supported.

The Pending Defects log page has the format defined in table 180
Table 180 Pending Defects log page
Bit
Byte
0

7
DS

1
2
3

6
SPF

(1b)

PAGE CODE
SUBPAGE CODE

(MSB)

PAGE LENGTH

(15h)

(01h)
(n-3)

(LSB)

Pending defect parameters


4

Pending defect parameter [first] (see table 181)

Pending defect parameter [last] (see table 181)

The disable save (DS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field, and the
PAGE LENGTH field are described in SPC-4 and shall be set to the values defined in table 180 for the Pending
Defects log page.
The contents of each pending defect parameter depends on the value in its PARAMETER CODE field
(see table 179).

Working Draft SCSI Block Commands 4 (SBC-4)

261

T10/BSR INCITS 506 Revision 3

27 August 2014

6.4.6.2 Pending Defect Count log parameter

The Pending Defect Count log parameter has the format defined in table 181 and indicates the number of
Pending Defect log parameters that are available.
Table 181 Pending Defect Count log parameter format
Bit
Byte
0

(MSB)

PARAMETER CODE

(0000h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)

2
DU

Obsolete

3
4

TSD

ETC
PARAMETER LIST LENGTH

TMC

FORMAT AND LINKING

(04h)

(MSB)

PENDING DEFECT COUNT

(LSB)

The PARAMETER CODE field is described in SPC-4 and shall be set as defined in table 181 for the Pending
Defect Count log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Pending Defect
Count log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LIST LENGTH field is described in SPC-4 and shall be set to the value defined in table 181 for
the Pending Defect Count log parameter.
The PENDING DEFECT COUNT field indicates the number of Pending Defect log parameters that are available.
The PENDING DEFECT COUNT field changes whenever the number of Pending Defect log parameters
(see 6.4.6.3) changes.
6.4.6.3 Pending Defect log parameter

A Pending Defect log parameter has the format defined in table 182. If no unrecovered errors have occurred
then no Pending Defect log parameters shall be present. A Pending Defect log parameter shall be added for
each LBA for which the device server has detected an unrecovered medium error that is not:
a) a pseudo unrecovered read error (see 4.18.2);
b) a predicted unrecovered read error (see 4.20.3.3); or
c) a predicted unrecovered write error (see 4.20.3.5).
If all of the supported parameter code values have been used and a new defect is discovered, then the device
server shall not add more Pending Defect log parameters and the PENDING ERROR COUNT field shall not be
changed.
Pending Defect log parameters may be duplicates of Background Scan Results parameters in the Background
Scan log page (see 6.4.2).
A Pending Defect log parameter shall be removed if the indicated LBA:
a) is reassigned without error;
b) is written without error; or
c) is read without error.
A Pending Defect log parameter may be removed if the indicated LBA is unmapped without error.

262

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

A sanitize overwrite operation (see 5.24.2.2) and a format operation (see 5.3.1) shall cause all Pending Defect
log parameters to be removed..
Table 182 Pending Defect log parameter format
Bit
Byte
0

(MSB)

PARAMETER CODE

(0001h) to (1F000h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)

Obsolete

DU

3
4

TSD

ETC

TMC

PARAMETER LIST LENGTH

FORMAT AND LINKING

(14h)

(MSB)

ACCUMULATED POWER ON HOURS

(LSB)

7
8

(MSB)

LOGICAL BLOCK ADDRESS

(LSB)

15

The PARAMETER CODE field is described in SPC-4 and shall be set as defined in table 182 for a Pending Defect
log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for a Pending Defect log
parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LIST LENGTH field is defined in SPC-4 and shall be set to the value defined in table 182 for a
Pending Defect log parameter.
The ACCUMULATED POWER ON HOURS field indicates the number of hours that the device server has been
powered on since manufacturing at the time the Pending Defect log parameter was created. A value of
FFFF_FFFF_FFFF_FFFFh indicates that the accumulated power on hours value is unknown.
6.4.7 The LOGICAL BLOCK ADDRESS field indicates the LBA associated with the unrecovered medium
error.Solid State Media log page
6.4.7.1 Solid State Media log page overview

Using the format shown in table 184, the Solid State media log page reports parameters that are specific to
SCSI target devices that contain solid state media. The parameter codes for the Solid State Media log page
are listed in table 183.

Table 183 Solid State Media log parameters


Parameter code

0001h
All others
a

Description

Percentage Used Endurance


Indicator

Resettable or
Changeable a

Reference

Support
Required

Never

6.4.7.2

Mandatory

Reserved

The keywords in this column Always, Reset Only, and Never are defined in 6.4.1.2.

Working Draft SCSI Block Commands 4 (SBC-4)

263

T10/BSR INCITS 506 Revision 3

27 August 2014

The Solid State Media log page has the format defined in table 184.

Table 184 Solid State Media log page


Bit
Byte
0

7
DS

6
SPF

(0b)

PAGE CODE

SUBPAGE CODE

(MSB)

PAGE LENGTH

(11h)

(00h)

(n - 3)

(LSB)

Solid state media log parameters


4

Solid state media parameter [first]

Solid state media parameter [last]

The disable save (DS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field, and the
PAGE LENGTH field are described in SPC-4.
The SPF bit, the PAGE CODE field, and the SUBPAGE CODE field shall be set to the values shown in table 184 for
the Solid State Media log page.
6.4.7.2 Percentage Used Endurance Indicator log parameter

The Percentage Used Endurance Indicator log parameter of the Solid Sate Media log page has the format
defined in table 185.

Table 185 Percentage Used Endurance Indicator log parameter format


Bit
Byte
0

(MSB)

264

PARAMETER CODE

1
2

(0001h)

(LSB)

Parameter control byte binary format list log parameter (see SPC-4)
DU

Obsolete

TSD

ETC
PARAMETER LENGTH

TMC

FORMAT AND LINKING

(04h)

Reserved

PERCENTAGE USED ENDURANCE INDICATOR

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The PARAMETER CODE field is described in SPC-4 and shall be set to the value shown in table 185 for the
Percentage Used Endurance Indicator log parameter.
The DU bit, the TSD bit, the ETC bit, the TMC field, and the FORMAT AND LINKING field for the Percentage Used
Endurance Indicator log parameter shall be set for a binary format list log parameter as described in SPC-4.
The PARAMETER LENGTH field is described in SPC-4 and shall be set to the value shown in table 185 for the
Percentage Used Endurance Indicator log parameter.
The PERCENTAGE USED ENDURANCE INDICATOR field indicates an estimate of the percentage of a SCSI target
device that contains solid state media life that has been used. The value in the field shall be set to zero at the
time of manufacture. A value of 100 indicates that the estimated endurance of the SCSI target device that
contain solid state media has been consumed, but may not indicate a SCSI target device that contain solid
state media failure (e.g., minimum power-off data retention capability reached for SCSI target devices that
contain solid state media using flash technology). The value is allowed to exceed 100. Values greater than
254 shall be reported as 255. The device server shall update the value at least once per power-on hour.

6.5 Mode parameters


6.5.1 Mode parameters overview

See table 186 for references to defines the mode pages and block descriptors (see 6.5.2) used by direct
access block devices. The mode pages and their corresponding page codes and subpage codes for direct
access block devices are shown in table 186.

Table 186 Mode page codes and subpage codes for direct access block devices (part 1 of 2)
Mode page name

Page code

Subpage code Reference

Application Tag mode page

0Ah

02h

6.5.3

ATA Power Condition

1Ah

F1h

SAT-3

Background Control mode page

1Ch

01h

6.5.4

Caching mode page

08h

00h

6.5.5

Control mode page

0Ah

00h

SPC-4

Control Extension mode page

0Ah

01h

SPC-4

02h

00h

SPC-4

14h

00h

SES-3

Informational Exceptions Control mode page

1Ch

00h

6.5.6

Logical Block Provisioning mode page

1Ch

02h

6.5.7

PATA Control

0Ah

F1h

SAT-3

Power Condition mode page

1Ah

00h

SPC-4

Disconnect-Reconnect mode page


Enclosure Services Management mode page

Note: SPC-4 contains a listing of mode page and subpage codes in numeric order.
a
b
c
d

Valid only if the ENCSERV bit is set to one in the standard INQUIRY data (see SPC-4).
Valid only for the MODE SENSE command.
Subpage code of the following mode page codes are obsolete: 03h, 04h, 05h, 09h, 0Bh, 0Ch, 0Dh, and
10h.
The following mode page code and subpage code combinations are vendor specific and do not require
a page format: mode page code 00h with subpage code 00h and mode page codes 20h to 3Eh with all
subpage codes.

Working Draft SCSI Block Commands 4 (SBC-4)

265

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 186 Mode page codes and subpage codes for direct access block devices (part 2 of 2)
Mode page name

Page code

Subpage code Reference

Power Consumption mode page

1Ah

01h

SPC-4

Protocol-Specific Logical Unit mode page

18h

00h

SPC-4

Protocol-Specific Port mode page

19h

00h

SPC-4

01h

00h

6.5.8

3Fh

FFh

SPC-4

3Fh

00h

SPC-4

00h to 3Eh

FFh

SPC-4

07h

00h

6.5.9

Read-Write Error Recovery mode page


Return all mode pages and subpages

Return all mode pages only (i.e., not including subpages)


Return all subpages for the specified mode page code b

Verify Error Recovery mode page


Obsolete

Vendor specific d
all other page and subpage code
combinations for direct access block
devices

Reserved

Note: SPC-4 contains a listing of mode page and subpage codes in numeric order.
a
b
c
d

Valid only if the ENCSERV bit is set to one in the standard INQUIRY data (see SPC-4).
Valid only for the MODE SENSE command.
Subpage code of the following mode page codes are obsolete: 03h, 04h, 05h, 09h, 0Bh, 0Ch, 0Dh, and
10h.
The following mode page code and subpage code combinations are vendor specific and do not require
a page format: mode page code 00h with subpage code 00h and mode page codes 20h to 3Eh with all
subpage codes.

The mode parameter list, including the mode parameter header, is described in SPC-4. Direct access block
devices support zero or one mode parameter block descriptors (i.e., the block descriptor is shared by all the
logical blocks on the medium) (see 6.5.2).
The MEDIUM TYPE field in the mode parameter header (see SPC-4) shall be set to 00h.
The DEVICE-SPECIFIC PARAMETER field in the mode parameter header (see SPC-4) for direct access block
devices is defined in table 187.

Table 187 DEVICE-SPECIFIC PARAMETER field for direct access block devices
Bit

7
WP

Reserved

DPOFUA

Reserved

If the medium is write-protected (i.e., due to mechanisms outside the scope of this standard), or the software
write protect (SWP) bit in the Control mode page (see SPC-4) is set to one, then the device server shall set the
WP bit to one when returning a DEVICE-SPECIFIC PARAMETER field in response to a MODE SENSE command. If
the medium is not write-protected and the SWP bit is set to zero, then the device server shall set the WP bit to
zero when returning a DEVICE-SPECIFIC PARAMETER field in response to a MODE SENSE command.
The write protect (WP) bit for mode data sent with a MODE SELECT command shall be ignored by the device
server.
The DPOFUA bit is reserved for mode data sent with a MODE SELECT command.

266

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the device server does not support the DPO bit and the FUA bit (see 4.15) being set to one, then the device
server shall set the DPO and FUA supported (DPOFUA) bit to zero when returning a DEVICE-SPECIFIC PARAMETER
field in response to a MODE SENSE command. If the device server supports the DPO bit and the FUA bit being
set to one, then the device server shall set the DPOFUA bit to one when returning a DEVICE-SPECIFIC PARAMETER
field in response to a MODE SENSE command.
6.5.2 Mode parameter block descriptors
6.5.2.1 Mode parameter block descriptors overview

If a device server returns a mode parameter block descriptor, then the device server shall return a short LBA
mode parameter block descriptor (see 6.5.2.2) in the mode parameter data in response to:
a) a MODE SENSE (6) command; or
b) a MODE SENSE (10) command with the LLBAA bit set to zero.
A device server may return a long LBA mode parameter block descriptor (see 6.5.2.3) in the mode parameter
data in response to a MODE SENSE (10) command with the LLBAA bit set to one.
If an application client sends a mode parameter block descriptor in the mode parameter list, then the
application client sends a short LBA mode parameter block descriptor (see 6.5.2.2) for a MODE SELECT (6)
command.
If an application client sends a mode parameter block descriptor in the mode parameter list, then the
application client may send a long LBA mode parameter block descriptor (see 6.5.2.3) for a MODE
SELECT (10) command.
Support for the mode parameter block descriptors is optional. The device server shall establish a unit attention
condition with the additional sense code set to MODE PARAMETERS CHANGED (see SPC-4 and SAM-5)
when the block descriptor values change.
6.5.2.2 Short LBA mode parameter block descriptor

Table 188 defines the short LBA mode parameter block descriptor for direct access block devices used:
a) with the MODE SELECT (6) and MODE SENSE (6) commands; and
b) with the MODE SELECT (10) and MODE SENSE (10) commands when the LONGLBA bit is set to zero
in the mode parameter header (see SPC-4).

Table 188 Short LBA mode parameter block descriptor


Bit
Byte
0

(MSB)
NUMBER OF LOGICAL BLOCKS

(LSB)
Reserved

4
5

(MSB)
LOGICAL BLOCK LENGTH

(LSB)

A device server shall respond to a MODE SENSE command (see SPC-4) by reporting the number of logical
blocks specified in the NUMBER OF LOGICAL BLOCKS field sent in the last MODE SELECT command that
contained a mode parameter block descriptor. If no MODE SELECT command with a mode parameter block
descriptor has been received then the current number of logical blocks shall be returned. To determine the

Working Draft SCSI Block Commands 4 (SBC-4)

267

T10/BSR INCITS 506 Revision 3

27 August 2014

number of logical blocks at which the logical unit is currently formatted, the application client shall use a READ
CAPACITY command (see 5.15 and 5.16) rather than the MODE SENSE command.
In response to a MODE SENSE command, the device server may return a value of zero indicating that it does
not report the number of logical blocks in the short LBA mode parameter block descriptor.
In response to a MODE SENSE command, if the number of logical blocks on the medium exceeds the
maximum value that is able to be specified in the NUMBER OF LOGICAL BLOCKS field, then the device server
shall return a value of FFFF_FFFFh.
If the logical unit does not support changing its capacity by changing the NUMBER OF LOGICAL BLOCKS field
using the MODE SELECT command (see SPC-4), then the value in the NUMBER OF LOGICAL BLOCKS field is
ignored. If the device supports changing its capacity by changing the NUMBER OF LOGICAL BLOCKS field, then
the NUMBER OF LOGICAL BLOCKS field is interpreted as follows:
a) if the NUMBER OF LOGICAL BLOCKS field is set to zero, then the logical unit shall retain its current
capacity if the logical block length has not changed. If the NUMBER OF LOGICAL BLOCKS field is set to
zero and the content of the LOGICAL BLOCK LENGTH field (i.e., new logical block length) is different than
the current logical block length, then the logical unit shall be set to its maximum capacity when the
new logical block length takes effect (i.e., after a successful FORMAT UNIT command);
b) if the NUMBER OF LOGICAL BLOCKS field is greater than zero and less than or equal to its maximum
capacity, then the logical unit shall be set to that number of logical blocks. If the content of the LOGICAL
BLOCK LENGTH field is the same as the current logical block length, then the logical unit shall not
become format corrupt (see 4.10). This capacity setting shall be retained through power cycles, hard
resets, logical unit resets, and I_T nexus losses. If the content of the LOGICAL BLOCK LENGTH field is the
same as the current logical block length, then this capacity setting shall take effect on successful
completion of the MODE SELECT command. If the content of the LOGICAL BLOCK LENGTH field (i.e.,
new logical block length) is different than the current logical block length, then this capacity setting
shall take effect when the new logical block length takes effect (i.e., after a successful FORMAT UNIT
command);
c) if the NUMBER OF LOGICAL BLOCKS field is set to a value greater than the maximum capacity of the
device and less than FFFF_FFFFh, then the device server shall terminate the MODE SELECT
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST. The logical unit shall retain its
previous logical block descriptor settings; or
d) if the NUMBER OF LOGICAL BLOCKS field is set to FFFF_FFFFh, then the logical unit shall be set to its
maximum capacity. If the content of the LOGICAL BLOCK LENGTH field is the same as the current logical
block length, then the logical unit shall not become format corrupt (see 4.10). This capacity setting
shall be retained through power cycles, hard resets, logical unit resets, and I_T nexus losses. If the
content of the LOGICAL BLOCK LENGTH field is the same as the current logical block length, then this
capacity setting shall take effect on successful completion of the MODE SELECT command. If the
content of the LOGICAL BLOCK LENGTH field (i.e., new logical block length) is different than the current
logical block length, then this capacity setting shall take effect when the new logical block length takes
effect (i.e., after a successful FORMAT UNIT command).
If the device server supports changing its logical units capacity by changing the NUMBER OF LOGICAL BLOCKS
field, is in a logical unit that supports logical block provisioning management, and the capacity is increased,
then the additional LBAs shall be in the initial provisioning management condition as specified in 4.7.3.2 or
4.7.3.3.
The LOGICAL BLOCK LENGTH field specifies the length in bytes of each logical block. No change shall be made
to any logical blocks on the medium until a format operation (see 5.3) is initiated by an application client.
A device server shall respond to a MODE SENSE command (see SPC-4) by reporting the length of the logical
blocks as specified in the LOGICAL BLOCK LENGTH field sent in the last MODE SELECT command that
contained a mode parameter block descriptor (e.g., if the logical block length is 512 bytes and a MODE
SELECT command occurs with the LOGICAL BLOCK LENGTH field set to 520 bytes, any MODE SENSE
commands would return 520 in the LOGICAL BLOCK LENGTH field). If no MODE SELECT command with a block
descriptor has been received then the current logical block length shall be returned. To determine the logical

268

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

block length at which the logical unit is currently formatted, the application client shall use a READ CAPACITY
command (see 5.15 and 5.16) rather than a MODE SENSE command.
6.5.2.3 Long LBA mode parameter block descriptor

Table 189 defines the long LBA mode parameter block descriptor for direct access block devices used with the
MODE SELECT (10) command and MODE SENSE (10) command when the LONGLBA bit is set to one in the
mode parameter header (see SPC-4).

Table 189 Long LBA mode parameter block descriptor


Bit
Byte
0

(MSB)
NUMBER OF LOGICAL BLOCKS

(LSB)

11
12

15

Reserved
(MSB)
LOGICAL BLOCK LENGTH

(LSB)

A device server shall respond to a MODE SENSE command (see SPC-4) by reporting the number of logical
blocks specified in the NUMBER OF LOGICAL BLOCKS field sent in the last MODE SELECT command that
contained a mode parameter block descriptor. If no MODE SELECT command with a mode parameter block
descriptor has been received then the current number of logical blocks shall be returned. To determine the
number of logical blocks at which the logical unit is currently formatted, the application client shall use a READ
CAPACITY command (see 5.15 and 5.16) rather than a MODE SENSE command.
In response to a MODE SENSE command, the device server may return a value of zero indicating that it does
not report the number of logical blocks in the long LBA mode parameter block descriptor.
If the logical unit does not support changing its capacity by changing the NUMBER OF LOGICAL BLOCKS field
using the MODE SELECT command (see SPC-4), then the value in the NUMBER OF LOGICAL BLOCKS field is
ignored. If the device supports changing its capacity by changing the NUMBER OF LOGICAL BLOCKS field, then
the NUMBER OF LOGICAL BLOCKS field is interpreted as follows:
a) if the NUMBER OF LOGICAL BLOCKS field is set to zero, then the logical unit shall retain its current
capacity if the logical block length has not changed. If the NUMBER OF LOGICAL BLOCKS field is set to
zero and the content of the LOGICAL BLOCK LENGTH field (i.e., new logical block length) is different than
the current logical block length, then the logical unit shall be set to its maximum capacity when the
new logical block length takes effect (i.e., after a successful FORMAT UNIT command);
b) if the NUMBER OF LOGICAL BLOCKS field is greater than zero and less than or equal to its maximum
capacity, then the logical unit shall be set to that number of logical blocks. If the content of the LOGICAL
BLOCK LENGTH field is the same as the current logical block length, then the logical unit shall not
become format corrupt (see 4.10). This capacity setting shall be retained through power cycles, hard
resets, logical unit resets, and I_T nexus losses. If the content of the LOGICAL BLOCK LENGTH field is the
same as the current logical block length, then this capacity setting shall take effect on successful
completion of the MODE SELECT command. If the content of the LOGICAL BLOCK LENGTH field (i.e.,
new logical block length) is different than the current logical block length, then this capacity setting
shall take effect when the new logical block length takes effect (i.e., after a successful FORMAT UNIT
command);

Working Draft SCSI Block Commands 4 (SBC-4)

269

T10/BSR INCITS 506 Revision 3

27 August 2014

c) if the NUMBER OF LOGICAL BLOCKS field is set to a value greater than the maximum capacity of the
device and less than FFFF_FFFF_FFFF_FFFFh, then the device server shall terminate the MODE
SELECT command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST
and the additional sense code set to INVALID FIELD IN PARAMETER LIST. The logical unit shall
retain its previous block descriptor settings; or
d) if the NUMBER OF LOGICAL BLOCKS field is set to FFFF_FFFF_FFFF_FFFFh, then the logical unit shall
be set to its maximum capacity. If the content of the LOGICAL BLOCK LENGTH field is the same as the
current logical block length, then the logical unit shall not become format corrupt (see 4.10). This
capacity setting shall be retained through power cycles, hard resets, logical unit resets, and I_T nexus
losses. If the content of the LOGICAL BLOCK LENGTH field is the same as the current logical block length,
then this capacity setting shall take effect on successful completion of the MODE SELECT command.
If the content of the LOGICAL BLOCK LENGTH field (i.e., new logical block length) is different than the
current logical block length, then this capacity setting shall take effect when the new logical block
length takes effect (i.e., after a successful FORMAT UNIT command).
If the device server supports changing its logical units capacity by changing the NUMBER OF LOGICAL BLOCKS
field, supports logical block provisioning management, and the capacity is increased, then the additional LBAs
shall be in the initial provisioning management condition as specified in 4.7.3.2 or 4.7.3.3.
The LOGICAL BLOCK LENGTH field specifies the length in bytes of each logical block. No change shall be made
to any logical blocks on the medium until a format operation (see 5.2) is initiated by an application client.
A device server shall respond to a MODE SENSE command (see SPC-4) by reporting the length of the logical
blocks as specified in the LOGICAL BLOCK LENGTH field sent in the last MODE SELECT command that
contained a mode parameter block descriptor (e.g., if the logical block length is 512 bytes and a MODE
SELECT command occurs with the LOGICAL BLOCK LENGTH field set to 520 bytes, any MODE SENSE
commands would return 520 in the LOGICAL BLOCK LENGTH field). If no MODE SELECT command with a block
descriptor has been received then the current logical block length shall be returned. To determine the logical
block length at which the logical unit is currently formatted, the application client shall use a READ CAPACITY
command (see 5.15 and 5.16) rather than a MODE SELECT command.
6.5.3 Application Tag mode page
6.5.3.1 Introduction

The Application Tag mode page (see table 190) specifies the logical block application tag that a device server
configured for protection information (see 4.22.2) shall use for each LBA range if:
a) the ATO bit in the Control mode page (see SPC-4) is set to one;
b) the ATMPE bit in the Control mode page (see SPC-4) is set to one; and
c) the WRPROTECT field requirements (see table 109) specify use of the Application tag mode page.
The mode page policy (see SPC-4) for this page shall be shared.

270

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If a method not defined by this standard changes the parameter data to be returned by the device server in the
Application Tag mode page, then the device server shall establish a unit attention condition for the SCSI
initiator port associated with every I_T nexus with the additional sense code set to MODE PARAMETERS
CHANGED.

Table 190 Application Tag mode page


Bit
Byte
0

7
PS

1
2

6
SPF

(1b)

PAGE CODE
SUBPAGE CODE

(MSB)

PAGE LENGTH

3
4

15

(0Ah)

(02h)

(n - 3)

(LSB)

Reserved
Application tag descriptors

16

39

Application tag descriptor [first] (see 6.5.3.2)

n - 24

Application tag descriptor [last] (see 6.5.3.2)

The parameters saveable (PS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field,
and the PAGE LENGTH field are defined in SPC-4.
The SPF bit, the PAGE CODE field, and the SUBPAGE CODE field shall be set to the values shown in table 190 for
the Application Tag mode page.
The application tag descriptor is defined in 6.5.3.2.

Working Draft SCSI Block Commands 4 (SBC-4)

271

T10/BSR INCITS 506 Revision 3

27 August 2014

6.5.3.2 Application tag descriptor

The application tag descriptor format is defined in table 191.

Table 191 Application tag descriptor format


Bit
Byte
0

7
LAST

5
6

Reserved
Reserved

(MSB)

7
8

15

(MSB)

16

23

(MSB)

LOGICAL BLOCK APPLICATION TAG

(LSB)

LOGICAL BLOCK ADDRESS

(LSB)
LOGICAL BLOCK COUNT

(LSB)

A LAST bit set to one specifies that this application tag descriptor is the last valid application tag descriptor in
the Application Tag mode page. A LAST bit set to zero specifies that the application tag descriptor is not the
last valid application tag descriptor in the Application Tag mode page.
The LOGICAL BLOCK APPLICATION TAG field specifies the value to be compared with the LOGICAL BLOCK
APPLICATION TAG field associated with an LBA within the range specified by the LOGICAL BLOCK ADDRESS field
and the LOGICAL BLOCK COUNT field within this descriptor.
The LOGICAL BLOCK ADDRESS field contains the starting LBA for this application tag descriptor. The LOGICAL
BLOCK ADDRESS field in the first Application tag descriptor shall be set to 0000_0000_0000_0000h. For
subsequent application tag descriptors in which the LOGICAL BLOCK COUNT field is not set to zero, the contents
of the LOGICAL BLOCK ADDRESS field shall contain the sum of the values in:
a) the LOGICAL BLOCK ADDRESS field in the previous application tag descriptor; and
b) the LOGICAL BLOCK COUNT field in the previous application tag descriptor.
The sum of the LOGICAL BLOCK ADDRESS field in the application tag descriptor with the LAST bit set to one and
the LOGICAL BLOCK COUNT field in the application tag descriptor with the LAST bit set to one equals the
RETURNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (16) parameter data (see 5.16.2).
If an invalid combination of the LAST bit, LOGICAL BLOCK APPLICATION TAG field, and LOGICAL BLOCK ADDRESS
field are sent by the application client, then the device server shall terminate the MODE SELECT command
(see SPC-4) with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST.
The LOGICAL BLOCK COUNT field specifies the number of logical blocks to which this application tag descriptor
applies.
A LOGICAL BLOCK COUNT field set to 0000_0000_0000_0000h specifies that this application tag descriptor shall
be ignored.

272

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.5.4 Background Control mode page

The Background Control mode page (see table 192) provides controls over background scan operations
(see 4.24). The mode page policy (see SPC-4) for this subpage shall be shared.

Table 192 Background Control mode page


Bit
Byte
0

7
PS

6
SPF

(1b)

SUBPAGE CODE

(MSB)

PAGE LENGTH

(MSB)

7
8

(MSB)

9
10

(MSB)

11
12
13

(MSB)

(01h)
(LSB)
S_L_FULL

BACKGROUND MEDIUM SCAN INTERVAL TIME

BACKGROUND PRE-SCAN TIME LIMIT

MINIMUM IDLE TIME BEFORE BACKGROUND SCAN

MAXIMUM TIME TO SUSPEND BACKGROUND SCAN

14
15

(1Ch)

Reserved

(000Ch)

Reserved

PAGE CODE

1
2

LOWIR

EN_BMS
EN_PS

(LSB)
(LSB)
(LSB)
(LSB)

Reserved

The parameters saveable (PS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field,
and the PAGE LENGTH field are defined in SPC-4.
The SPF bit, the PAGE CODE field, the SUBPAGE CODE field, and the PAGE LENGTH field shall be set to the values
shown in table 192 for the Background Control mode page.
A suspend on log full (S_L_FULL) bit set to zero specifies that the device server shall continue running a
background scan operation (see 4.24.1) even if the Background Scan Results log page (see 6.4.2) contains
the maximum number of Background Scan log parameters (see 6.4.2.3) supported by the logical unit. A
S_L_FULL bit set to one specifies that the device server shall suspend a background scan operation if the
Background Scan Results log page contains the maximum number of Background scan log parameters
supported by the logical unit.
A log only when intervention required (LOWIR) bit set to zero specifies that the device server shall log all
suspected recoverable medium errors or unrecoverable medium errors that are identified during background
scan operations in the Background Scan Results log page. A LOWIR bit set to one specifies that the device
server shall only log medium errors identified during background scan operations in the Background Scan
Results log page that require application client intervention.
An enable background medium scan (EN_BMS) bit set to zero specifies that the device server shall disable
background medium scan operations (see 4.24.3). An EN_BMS bit set to one specifies that the device server
shall enable background medium scan operations. If the EN_PS bit is also set to one, and a background
pre-scan operation is in progress, then the logical unit shall not start a background medium scan operation
Working Draft SCSI Block Commands 4 (SBC-4)

273

T10/BSR INCITS 506 Revision 3

27 August 2014

until after the background pre-scan operation is halted or completed. If a background medium scan operation
is in progress when the EN_BMS bit is changed from one to zero, then the logical unit shall suspend the
background medium scan operation before the device server completes the MODE SELECT command, and
the background medium scan shall remain suspended until the EN_BMS bit is set to one, at which time the
logical unit shall resume the background medium scan operation beginning with the logical block being tested
when the background medium scan operation was suspended.
An enable pre-scan (EN_PS) bit set to zero specifies that the device server shall disable background pre-scan
operations (see 4.24.2). If a background pre-scan operation is in progress when the EN_PS bit is changed from
a one to a zero, then the logical unit shall halt the background pre-scan operation before the device server
completes the MODE SELECT command. An EN_PS bit set to one specifies that the logical unit shall start a
background pre-scan operation after the next power on. Once a logical unit has completed a background
pre-scan operation, the logical unit shall not perform another background pre-scan operation unless the EN_PS
bit is set to zero, then set to one, and another power on occurs.
The BACKGROUND MEDIUM SCAN INTERVAL TIME field specifies the minimum time, in hours, between the start of
one background scan operation and the start of the next background medium scan operation. If the current
background scan operation takes longer than the value specified in the BACKGROUND MEDIUM SCAN INTERVAL
TIME field, then the logical unit shall:
a) continue the current background scan operation until that background scan operation is complete;
and
b) start the next background medium scan operation upon completion of the current background scan
operation.
The BACKGROUND PRE-SCAN TIME LIMIT field specifies the maximum time, in hours, for a background pre-scan
operation to complete. If the background pre-scan operation does not complete within the specified time then
the device server shall halt the background pre-scan operation. A value of zero specifies an unlimited timeout
value.
The MINIMUM IDLE TIME BEFORE BACKGROUND SCAN field specifies the time, in milliseconds, that the logical unit
shall be idle before resuming a background scan operation (e.g., after the device server has completed all of
the commands in all task sets).
The MAXIMUM TIME TO SUSPEND BACKGROUND SCAN field specifies the time, in milliseconds, that the device
server should take to start processing a command received while a logical unit is performing a background
scan operation.

274

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.5.5 Caching mode page

The Caching mode page (see table 193) defines the parameters that affect the use of the cache.

Table 193 Caching mode page


Bit
Byte
0

PS

SPF

3
4

IC

ABPF

CAP

(MSB)
(MSB)
(MSB)

FSW

13
14
15

SIZE

WCE

RCD

WRITE RETENTION PRIORITY

(LSB)

MAXIMUM PRE-FETCH CEILING


LBCSS

DRA

Vendor specific

(LSB)
(LSB)

MAXIMUM PRE-FETCH

11
12

MF

(08h)

MINIMUM PRE-FETCH

9
10

DISABLE PRE-FETCH TRANSFER LENGTH

7
8

DISC

(12h)

DEMAND READ RETENTION PRIORITY

(MSB)

PAGE CODE
PAGE LENGTH

5
6

(0b)

1
2

(LSB)
SYNC_PROG

NV_DIS

NUMBER OF CACHE SEGMENTS

(MSB)

CACHE SEGMENT SIZE

16

Reserved

17

19

Obsolete

(LSB)

The parameters saveable (PS) bit, the subpage format (SPF) bit, the PAGE CODE field, and the PAGE LENGTH
field are defined in SPC-4.
The SPF bit, the PAGE CODE field, and the PAGE LENGTH field shall be set to the values shown in table 193 for
the Caching mode page.
An initiator control (IC) enable bit set to one specifies that the device server use one of the following fields to
control the caching algorithm rather than the device servers own adaptive algorithm:
a) the NUMBER OF CACHE SEGMENTS field, if the SIZE bit is set to zero; or
b) the CACHE SEGMENT SIZE field, if the SIZE bit is set to one.
An abort pre-fetch (ABPF) bit set to one and a DRA bit is set to zero specify that the device server abort a
pre-fetch upon receipt of a new command. An ABPF bit set to one takes precedence over the value specified in
the MINIMUM PRE-FETCH field. An ABPF bit set to zero and a DRA bit set to zero specify that the termination of
any active pre-fetch is dependent upon Caching mode page bytes 4 through 11 and is vendor specific.

Working Draft SCSI Block Commands 4 (SBC-4)

275

T10/BSR INCITS 506 Revision 3

27 August 2014

A caching analysis permitted (CAP) bit set to one specifies that the device server perform caching analysis
during subsequent operations. A CAP bit set to zero specifies that caching analysis be disabled (e.g., to reduce
overhead time or to prevent nonpertinent operations from impacting tuning values).
A discontinuity (DISC) bit set to one specifies that the device server continue the pre-fetch across time
discontinuities (e.g., across cylinders) up to the limits of the buffer, or segment, space available for the
pre-fetch. A DISC bit set to zero specifies that pre-fetches be truncated or wrapped at time discontinuities.
A size enable (SIZE) bit set to one specifies that the CACHE SEGMENT SIZE field be used to control caching
segmentation. A SIZE bit set to zero specifies that the NUMBER OF CACHE SEGMENTS field be used to control
caching segmentation. Simultaneous use of both the number of segments and the segment size is vendor
specific.
A writeback cache enable (WCE) bit set to one specifies that the device server shall perform write operations
by using write cache operations to volatile write cache, write cache operations to non-volatile cache, or write
medium operations (e.g., a write command is able to complete without error after logical block data has been
written to volatile cache but has not necessarily been written to the medium) as described in 4.15. A WCE bit
set to zero specifies that the device server shall complete a write command with without error only after all
logical block data has been written without error by performing write cache operations to non-volatile cache or
by performing write medium operations to non-volatile medium. If an application client changes the WCE bit
from one to zero via a MODE SELECT command, then the device server shall perform write medium
operations to any LBAs in cache containing logical block data that is not the same as the logical block data
referenced by the corresponding LBAs on the medium before completing the MODE SELECT command.
A multiplication factor (MF) bit set to zero specifies that the device server shall interpret the MINIMUM PRE-FETCH
field and the MAXIMUM PRE-FETCH field in terms of the number of logical blocks for each of the respective types
of pre-fetch. An MF bit set to one specifies that the device server shall interpret the MINIMUM PRE-FETCH field
and the MAXIMUM PRE-FETCH field to be specified in terms of a scalar number that, when multiplied by the
number of logical blocks to be transferred for the current command, yields the number of logical blocks for
each of the respective types of pre-fetch.
A read cache disable (RCD) bit set to zero specifies that the device server shall perform read operations by
using read cache operations or read medium operations as described in 4.15. An RCD bit set to one specifies
that the device server shall perform read operations by only using read medium operations.
The DEMAND READ RETENTION PRIORITY field (see table 194) specifies the retention priority the device server
should assign for data read into the cache that has also been transferred to the Data-In Buffer.

Table 194 DEMAND READ RETENTION PRIORITY field


Code

0h

The device server should not distinguish between retaining the indicated data and data placed
into the cache by other means (e.g., pre-fetch).

1h

The device server should replace data put into the cache via a READ command sooner (i.e.,
read data has lower priority) than data placed into the cache by other means (e.g., pre-fetch).

2h to Eh
Fh

276

Description

Reserved
The device server should replace data placed into the cache by other means (e.g., pre-fetch)
sooner than data put into the cache via a READ command (i.e., read data has higher priority).

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The WRITE RETENTION PRIORITY field (see table 195) specifies the retention priority the device server should
assign for data written into the cache that has also been transferred from the cache to the medium.

Table 195 WRITE RETENTION PRIORITY field


Code

Description

0h

The device server should not distinguish between retaining the indicated data and data placed
into the cache by other means (e.g., pre-fetch).

1h

The device server should replace data put into the cache during a WRITE command or a
WRITE AND VERIFY command sooner (i.e., has lower priority) than data placed into the cache
by other means (e.g., pre-fetch).

2h to Eh
Fh

Reserved
The device server should replace data placed into the cache by other means (e.g., pre-fetch)
sooner than data put into the cache during a WRITE command or a WRITE AND VERIFY
command (i.e., has higher priority).

An anticipatory pre-fetch occurs when data is placed in the cache that has not been requested. This may
happen in conjunction with the reading of data that has been requested. The DISABLE PRE-FETCH TRANSFER
LENGTH field, the MINIMUM PRE-FETCH field, the MAXIMUM PRE-FETCH field, and the MAXIMUM PRE-FETCH CEILING
field give an indication to the device server how it should manage the cache based on the most recent READ
command. An anticipatory pre-fetch may occur based on other information. These fields are only
recommendations to the device server and should not cause a CHECK CONDITION to occur if the device
server is not able to satisfy the request.
The DISABLE PRE-FETCH TRANSFER LENGTH field specifies the selective disabling of anticipatory pre-fetch on
long transfer lengths. The value in this field is compared to the transfer length requested by a READ
command. If the transfer length is greater than the disable pre-fetch transfer length, then an anticipatory
pre-fetch is not done for the command. Otherwise the device server should attempt an anticipatory pre-fetch.
If the DISABLE PRE-FETCH TRANSFER LENGTH field is set to zero, then all anticipatory pre-fetching is disabled for
any request for data, including those with a transfer length of zero.
The MINIMUM PRE-FETCH field specifies the number of logical blocks to pre-fetch regardless of the delays that
may be incurred in processing subsequent commands. The field contains either:
a) a number of logical blocks, if the MF bit is set to zero; or
b) a scalar multiplier of the value in the TRANSFER LENGTH field, if the MF bit is set to one.
The pre-fetching operation begins at the logical block after the last logical block of a READ command.
Pre-fetching shall always halt when it reaches the last logical block on the medium. Errors that occur during
the pre-fetching operation shall not be reported to the application client unless the device server is unable to
process subsequent commands correctly as a result of the error. In this case the error may be reported either
as:
a) an error for that subsequent command; or
b) a deferred error,
at the discretion of the device server and according to the rules for reporting deferred errors (see SPC-4).
If the pre-fetch has read more than the amount of data specified by the MINIMUM PRE-FETCH field, then
pre-fetching should be terminated whenever another command enters the enabled state (see SAM-5). This
requirement is ignored if the MINIMUM PRE-FETCH field value is equal to the MAXIMUM PRE-FETCH field value.
The MAXIMUM PRE-FETCH field specifies the number of logical blocks to pre-fetch if the pre-fetch does not delay
processing of subsequent commands. The field contains either:
a) a number of logical blocks, if the MF bit is set to zero; or
b) a scalar multiplier of the value in the TRANSFER LENGTH field, if the MF bit is set to one.

Working Draft SCSI Block Commands 4 (SBC-4)

277

T10/BSR INCITS 506 Revision 3

27 August 2014

The MAXIMUM PRE-FETCH field contains the maximum amount of data to pre-fetch as a result of one READ
command. The MAXIMUM PRE-FETCH field is used in conjunction with the DISABLE PRE-FETCH TRANSFER LENGTH
field and MAXIMUM PRE- FETCH CEILING field to trade off pre-fetching new data with displacing old data already
stored in the cache.
The MAXIMUM PRE-FETCH CEILING field specifies an upper limit on the number of logical blocks computed as the
maximum pre-fetch. If this number of logical blocks is greater than the value in the MAXIMUM PRE-FETCH field,
then the number of logical blocks to pre-fetch shall be truncated to the value stored in the MAXIMUM PRE-FETCH
CEILING field.
NOTE 24 - If the MF bit is set to one, then the MAXIMUM PRE-FETCH CEILING field is useful in limiting the amount
of data to be pre-fetched.

A force sequential write (FSW) bit set to one specifies that, for commands requesting write operations to more
than one logical block, the device server shall write the logical blocks to the medium in ascending sequential
order. An FSW bit set to zero specifies that the device server may reorder the sequence of writing logical
blocks to the medium (e.g., in order to achieve faster command completion).
A logical block cache segment size (LBCSS) bit set to one specifies that the CACHE SEGMENT SIZE field units
shall be interpreted as logical blocks. An LBCSS bit set to zero specifies that the CACHE SEGMENT SIZE field units
shall be interpreted as bytes. The LBCSS shall not impact the units of other fields.
A disable read-ahead (DRA) bit set to one specifies that the device server shall not read into the pre-fetch
buffer any logical blocks beyond the addressed logical block(s). A DRA bit set to zero specifies that the device
server may continue to read logical blocks into the pre-fetch buffer beyond the addressed logical block(s).
The synchronize cache progress indication support (SYNC_PROG) field (see table 196) specifies device server
progress indication reporting while a SYNCHRONIZE CACHE command (see 5.26 and 5.27) is being
processed.

Table 196 SYNC_PROG field


Code Description

00b

The device server shall not terminate commands due to the synchronize cache operation and
shall not provide pollable sense data.

01b

The device server:


a) shall not terminate commands due to the synchronize cache operation; and
b) shall provide pollable sense data with the sense key set to NO SENSE, the additional sense
code set to SYNCHRONIZE CACHE OPERATION IN PROGRESS, and the PROGRESS
INDICATION field set to indicate the progress of the synchronize cache operation.

10b

The device server:


a) shall process INQUIRY commands, REPORT LUNS commands, REPORT TARGET PORT
GROUPS commands, and REQUEST SENSE commands;
b) may process commands that do not require resources used for the synchronize cache
operation;
c) shall terminate commands that require resources used for the synchronize cache operation
with CHECK CONDITION status with the sense key set to NOT READY, the additional sense
code set to LOGICAL UNIT NOT READY, SYNCHRONIZE CACHE OPERATION IN
PROGRESS, and the PROGRESS INDICATION field set to indicate the progress of the
synchronize cache operation; and
d) shall provide pollable sense data with the sense key set to NOT READY, the additional sense
code set to LOGICAL UNIT NOT READY, SYNCHRONIZE CACHE OPERATION IN
PROGRESS, and the PROGRESS INDICATION field set to indicate the progress of the
synchronize cache operation.

11b

Reserved

278

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

An NV_DIS bit set to one specifies that the device server shall disable a non-volatile cache and indicates that a
non-volatile cache is supported but disabled. An NV_DIS bit set to zero specifies that the device server may
use a non-volatile cache and indicates that a non-volatile cache may be present and enabled.
The NUMBER OF CACHE SEGMENTS field specifies the number of segments into which the device server shall
divide the cache.
The CACHE SEGMENT SIZE field specifies the segment size in bytes if the LBCSS bit is set to zero or in logical
blocks if the LBCSS bit is set to one. The CACHE SEGMENT SIZE field is valid only if the SIZE bit is set to one.
6.5.6 Informational Exceptions Control mode page

The Informational Exceptions Control mode page (see table 197) defines the methods used by the device
server to control the processing and reporting of informational exception conditions. Informational exception
conditions are defined as any event that the device server reports or logs as failure predictions (i.e., with the
ADDITIONAL SENSE CODE field set to 5Dh (e.g., FAILURE PREDICTION THRESHOLD EXCEEDED)) or
warnings (i.e., with the ADDITIONAL SENSE CODE field set to 0Bh (e.g., WARNING)).
Informational exception conditions may occur while a logical unit is processing:
a)
b)
c)
d)

a background self-test (see SPC-4);


device specific background functions (see SPC-4);
a command; or
other device specific events.

An informational exception condition may occur at any time (e.g., the condition may be asynchronous to any
commands issued by an application client).
The mode page policy for this mode page shall be shared or per I_T nexus (see SPC-4).
NOTE 25 - Storage devices that support SMART (Self-Monitoring Analysis and Reporting Technology) for
predictive failure software should use informational exception conditions.

Table 197 Informational Exceptions Control mode page


Bit
Byte
0

7
PS

6
SPF

(0b)

PAGE CODE

1
2

PAGE LENGTH
PERF

Reserved

EBF

EWASC

(MSB)

11

(MSB)

EBACKERR

LOGERR

(1Ch)

(0Ah)

DEXCPT

Reserved

TEST

MRIE

INTERVAL TIMER

(LSB)
REPORT COUNT

(LSB)

The PS bit, the SPF bit, the PAGE CODE field, and the PAGE LENGTH field are described in SPC-4.
The SPF bit, the PAGE CODE field, and the PAGE LENGTH field shall be set to the values shown in table 197 for
the Informational Exceptions Control mode page.
If the performance (PERF) bit is set to zero, then the device server may process informational exception
conditions that cause delays in processing other operations (e.g., processing a command). If the PERF bit is

Working Draft SCSI Block Commands 4 (SBC-4)

279

T10/BSR INCITS 506 Revision 3

27 August 2014

set to one, then the device server shall not process informational exception conditions that cause delays in
processing other operations. A PERF bit set to one may cause the device server to disable some or all of the
processing of informational exception conditions, thereby limiting the reporting of informational exception
conditions.
If device specific background functions (see SPC-4) are implemented by the logical unit, and the enable
background function (EBF) bit is set to one, then the device server shall enable device specific background
functions. If the EBF bit is set to zero, then the device server shall disable device specific background
functions. Background functions with separate enable control bits (e.g., the background medium scan
(see 4.24)) are not controlled by the EBF bit.
The enable warning (EWASC) bit specifies if the device server enables reporting of warnings (see table 198).
The disable exception control (DEXCPT) bit specifies if the device server disables reporting of failure
predictions (see table 198).
The TEST bit specifies if the device server creates a test device failure prediction (see table 198).
If an informational exception condition occurs that is not the result of the logical unit processing a background
self-test (see SPC-4) or device specific background function (see SPC-4), then the device server:
a) shall use the definitions for the combination of the values in the EWASC bit, the DEXCPT bit, and the
TEST bit shown in table 198 for processing informational exception conditions if the MRIE field is set
from 2h to 6h;
b) may use the definitions for the combination of the values in the EWASC bit, the DEXCPT bit, and the
TEST bit shown table 198 for processing informational exception conditions if the MRIE field is set from
Ch to Fh; and
c) shall ignore the EWASC bit, the DEXCPT bit, and the TEST bit if the MRIE field is set to any value other
than 2h to 6h or Ch to Fh.

Table 198 Definitions for the combinations of values in EWASC, DEXCPT, and TEST
EWASC DEXCPT

280

TEST

Description

The device server shall process informational exception conditions as follows:


a) failure prediction processing shall be enabled a; and
b) warning processing shall be disabled.

The device server shall process informational exception conditions as follows:


a) failure prediction processing shall be enabled a; and
b) warning processing shall be enabled a.

The device server shall process informational exception conditions as follows:


a) failure prediction processing shall be disabled; and
b) warning processing shall be disabled.

The device server shall process informational exception conditions as follows:


a) failure prediction processing shall be disabled; and
b) warning processing shall be enabled a.

The device server shall set the additional sense code to FAILURE PREDICTION
THRESHOLD EXCEEDED (FALSE) a.
The device server shall terminate the MODE SELECT command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the
additional sense code set to INVALID FIELD IN PARAMETER LIST.

If applicable based on the value in the MRIE field (e.g., 2h to 6h), then the values in the LOGERR bit, the
INTERVAL TIMER field, and the REPORT COUNT field determine how the informational exception condition
is processed.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If an informational exception condition occurs while the logical unit is processing a background self-test
(see SPC-4) or background function (see SPC-4), then the enable background error (EBACKERR) bit
determines how the device server processes the informational exception as defined in the following:
a) if the EBACKERR bit is set to zero, then the device server shall disable reporting of informational
exception conditions that occur during the processing of background self-tests and background
functions;
b) if the EBACKERR bit is set to one, then, for informational exception conditions that occur during the
processing of background self-tests and background functions, the device server shall:
A) enable reporting of the informational exception conditions;
B) use the method for reporting the informational exception conditions as determined by contents of
the MRIE field; and
C) report the informational exception conditions as soon as the method specified in the MRIE field
occurs (i.e., the INTERVAL TIMER field and REPORT COUNT field do not apply for background self-test
errors and errors that occur during background functions);
and
c) logging by the device server of informational exception conditions is determined by the value in the
LOGERR bit.
IA LOGERR bit is set to zero specifies the device server may log any informational exception conditions in the
Informational Exceptions log page (see SPC-4). A LOGERR bit is set to one specifies the device server shall
log informational exception conditions in the Informational Exceptions log page.
The method of reporting informational exceptions (MRIE) field (see table 199) defines the method that shall be
used by the device server to report:
a) informational exception conditions if the specified code value is supported by the device server; and
b) background self-test errors and device specific background function errors with the ADDITIONAL SENSE
CODE field set to 0Bh or 5Dh if the EBACKERR bit is set to one and the specified code value is
supported by the device server.
A device server that supports the Informational Exceptions Control mode page shall support at least one code
value other than zero in the MRIE field.
The priority of reporting multiple informational exceptions is vendor specific.

Table 199 Method of reporting informational exceptions (MRIE) field (part 1 of 2)


Code

Description

0h

No reporting of informational exception condition: The device server shall not report
information exception conditions.

1h

Obsolete

2h

Establish unit attention condition: The device server shall report informational exception
conditions by establishing a unit attention condition (see SAM-5) for the SCSI initiator port
associated with every I_T nexus, with the additional sense code set to indicate the cause of the
informational exception condition.a

The device server terminates the command to report the unit attention condition for the informational
exception condition (i.e., the device server does not process the command except to report the unit
attention condition) (see SAM-5).
This is controlled by the PER bit in the Read-Write Error Recovery mode page (see 6.5.8) or the PER bit
in the Verify Error Recovery mode page (see 6.5.9).

Working Draft SCSI Block Commands 4 (SBC-4)

281

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 199 Method of reporting informational exceptions (MRIE) field (part 2 of 2)


Code

Description

3h

Conditionally generate recovered error: The device server shall report informational
exception conditions, if the reporting of recovered errors is allowed b, by modifying the
completion of the next command processed without encountering any errors, regardless of the
I_T nexus on which the command was received. The modification shall be to terminate the
command with CHECK CONDITION status with the sense key set to RECOVERED ERROR
and the additional sense code set to indicate the cause of the informational exception
condition.

4h

Unconditionally generate recovered error: The device server shall report informational
exception conditions, regardless of whether the reporting of recovered errors is allowed b, by
modifying the completion of the next command processed without encountering any errors,
regardless of the I_T nexus on which the command was received. The modification shall be to
terminate the command with CHECK CONDITION status with the sense key set to
RECOVERED ERROR and the additional sense code set to indicate the cause of the
informational exception condition.

5h

Generate no sense: The device server shall report informational exception conditions by
modifying the completion of the next command processed without encountering any errors,
regardless of the I_T nexus on which the command was received. The modification shall be to
terminate the command with CHECK CONDITION status with the sense key set to NO SENSE
and the additional sense code set to indicate the cause of the informational exception
condition.

6h

Only report informational exception condition on request: The device server shall provide
pollable sense data (see SPC-4) with the sense key set to NO SENSE and the additional
sense code set to indicate the cause of the informational exception condition. To find out about
information exception conditions, the application client polls the device server by issuing a
REQUEST SENSE command.

7h to Bh

Reserved

Ch to Fh

Vendor specific

The device server terminates the command to report the unit attention condition for the informational
exception condition (i.e., the device server does not process the command except to report the unit
attention condition) (see SAM-5).
This is controlled by the PER bit in the Read-Write Error Recovery mode page (see 6.5.8) or the PER bit
in the Verify Error Recovery mode page (see 6.5.9).

The INTERVAL TIMER field specifies the period in 100 millisecond increments that the device server shall use for
reporting that an informational exception condition has occurred (see table 200). After an informational
exception condition has been reported, the interval timer shall be started. An INTERVAL TIMER field set to zero
or FFFF_FFFFh specifies that the period for reporting an informational exception condition is vendor specific.
The REPORT COUNT field specifies the maximum number of times the device server may report an
informational exception condition to the application client. A REPORT COUNT field set to zero specifies that there
is no limit on the number of times the device server may report an informational exception condition.

282

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The device server shall use the values in the INTERVAL TIMER field and the REPORT COUNT field based on the
value in the MRIE field as shown in table 200.

Table 200 Use of the INTERVAL TIMER field and the REPORT COUNT field based on the MRIE field
MRIE

Description

2h to 6h

If reporting of an informational exception condition is enabled (see table 199), then the device
server shall:
1) report an informational exception condition when the condition is first detected; and
2) if the value in the REPORT COUNT field is not equal to one, then:
1) if the INTERVAL TIMER field is not set to zero or FFFF_FFFFh, then wait the time
specified in the INTERVAL TIMER field, and, if that informational exception condition still
exists, report the informational exception again; and
2) while the informational exception condition exists, continue to report the informational
exception condition after waiting the time specified in the INTERVAL TIMER field until the
condition has been reported the number of times specified by the REPORT COUNT field.

Ch to Fh

The device server may use or may ignore the values in the INTERVAL TIMER field and the
REPORT COUNT field to report the informational exception condition based on the device specific
implementation.

For values in the MRIE field (see table 199) not shown in this table, the INTERVAL TIMER field and the
REPORT COUNT field shall be ignored.

Maintaining the interval timer and the report counter across power cycles, hard resets, logical unit resets, and
I_T nexus losses by the device server is vendor specific.

Working Draft SCSI Block Commands 4 (SBC-4)

283

T10/BSR INCITS 506 Revision 3

27 August 2014

6.5.7 Logical Block Provisioning mode page


6.5.7.1 Introduction

The Logical Block Provisioning mode page (see table 201) specifies the parameters that a device server that
supports logical block provisioning threshold values (see 4.7.3.7) shall use to report logical block provisioning
threshold notifications (see 4.7.3.7.4). The mode page policy (see SPC-4) for this page shall be shared.
If a method not defined by this standard changes the parameter data to be returned by a device server in the
Logical Block Provisioning mode page, then the device server shall establish a unit attention condition for the
SCSI initiator port associated with every I_T nexus with the additional sense code set to MODE
PARAMETERS CHANGED.

Table 201 Logical Block Provisioning mode page


Bit
Byte
0

7
PS

6
SPF

(1b)

PAGE CODE

1
2

SUBPAGE CODE

(MSB)

PAGE LENGTH

15

(1Ch)

(02h)

(n - 3)

Reserved

(LSB)
SITUA

Reserved
Threshold descriptors

16

23

Threshold descriptor [first] (see 6.5.7.2)

n-7

Threshold descriptor [last] (see 6.5.7.2)

The parameters saveable (PS) bit, the subpage format (SPF) bit, the PAGE CODE field, the SUBPAGE CODE field,
and the PAGE LENGTH field are defined in SPC-4.
The SPF bit, the PAGE CODE field, and the SUBPAGE CODE field shall be set to the values shown in table 201 for
the Logical Block Provisioning mode page.
A single initiator threshold unit attention (SITUA) bit set to one specifies that the logical block provisioning
threshold notification unit attention condition is established on a single I_T nexus as described in 4.7.3.7.4. A
SITUA bit set to zero specifies that the logical block provisioning threshold notification unit attention condition is
established on multiple I_T nexuses as described in 4.7.3.7.4.
The threshold descriptors are defined in 6.5.7.2.

284

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.5.7.2 Threshold descriptor format

The threshold descriptor format is defined in table 202.

Table 202 Threshold descriptor format


Bit
Byte
0

ENABLED

Reserved

4
THRESHOLD TYPE

THRESHOLD ARMING

THRESHOLD RESOURCE

Reserved

3
4

(MSB)
THRESHOLD COUNT

(LSB)

An ENABLED bit set to one specifies that the threshold is enabled. An ENABLED bit set to zero specifies that the
threshold is disabled.
The THRESHOLD TYPE field (see table 203) specifies the type of this threshold.

Table 203 THRESHOLD TYPE field


Code

Description

000b

If the THRESHOLD COUNT field specifies a soft threshold, the threshold is enabled, and that
threshold is reached, then the device server shall establish a unit attention condition as
described in 4.7.3.7.4.

All others

Reserved

The THRESHOLD ARMING field (see table 204) specifies the arming method used for operation of this threshold.

Table 204 THRESHOLD ARMING field


Code

Description

000b

The threshold operates as an armed decreasing threshold.

4.7.3.7.2

001b

The threshold operates as an armed increasing threshold.

4.7.3.7.3

All others

Reference

Reserved

The THRESHOLD RESOURCE field specifies the resource of this threshold. The contents of this field are as
defined for parameters codes 0000h to 00FFh (see table 165) in the Logical Block Provisioning log page
(see 6.4.4).
The valid combinations of the THRESHOLD TYPE field, the THRESHOLD ARMING field, and the THRESHOLD
RESOURCE field are shown in table 7.
The THRESHOLD COUNT field specifies the center of the threshold range for this threshold expressed as a
number of threshold sets (i.e., the number of LBA mapping resources expressed as a number of threshold
sets).
Working Draft SCSI Block Commands 4 (SBC-4)

285

T10/BSR INCITS 506 Revision 3

27 August 2014

6.5.8 Read-Write Error Recovery mode page

The Read-Write Error Recovery mode page (see table 205) specifies the error recovery parameters the
device server shall use during:
a) read medium operations; or
b) write medium operations.

Table 205 Read-Write Error Recovery mode page


Bit
Byte
0

7
PS

6
SPF

(0b)

PAGE CODE

1
2

PAGE LENGTH
AWRE

ARRE

TB

Obsolete

Obsolete

Obsolete

Obsolete
Reserved

WRITE RETRY COUNT

Reserved

10
11

(MSB)

(01h)
Error recovery bits

RC

READ RETRY COUNT

LBPERE

(0Ah)

RECOVERY TIME LIMIT

PER

DTE

Obsolete

Restricted for MMC-6

(LSB)

The parameters saveable (PS) bit, the subpage format (SPF) bit, the PAGE CODE field, and the PAGE LENGTH
field are defined in SPC-4.
The SPF bit, the PAGE CODE field, and the PAGE LENGTH field shall be set to the values shown in table 205 for
the Read-Write Error Recovery mode page.
An automatic write reassignment enabled (AWRE) bit set to zero specifies that the device server shall not
perform automatic write reassignment.
An AWRE bit set to one specifies that the device server shall enable automatic write reassignment for LBAs
referencing logical blocks for which a recovered error or unrecovered error occurs during a write medium
operation. Automatic write reassignment shall be performed only if the device server has the valid data (e.g.,
original data in a buffer or recovered from the medium). The valid data shall be placed in the logical block
referenced by the reassigned LBA. The device server shall report any failures that occur during the reassign
operation. Error reporting as specified by the error recovery bits (i.e., the PER bit, and the DTE bit) shall be
performed only after completion of the reassign operation.
An automatic read reassignment enabled (ARRE) bit set to zero specifies that the device server shall not
perform automatic read reassignment.
An ARRE bit set to one specifies that the device server shall enable automatic read reassignment for LBAs
referencing logical blocks for which a recovered error occurs during a read medium operation. All error
recovery actions required by the error recovery bits shall be processed. Automatic read reassignment shall
then be performed only if the device server recovers the data without error. The recovered data shall be
placed in the logical block referenced by the reassigned LBA. The device server shall report any failures that

286

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

occur during the reassign operation. Error reporting as specified by the error recovery bits shall be performed
only after completion of the reassign operation.
A transfer block (TB) bit set to zero specifies that if an unrecovered read error occurs during a read medium
operation, then the device server shall not transfer any data for that logical block to the Data-In Buffer. A TB bit
set to one specifies that if an unrecovered read error occurs during a read medium operation, then the device
server shall transfer pseudo read data (e.g., data already in a buffer or any other vendor specific data) for that
logical block before returning CHECK CONDITION status. The data returned in this case is vendor specific.
The value of the TB bit does not specify any action for recovered read errors.
A read continuous (RC) bit set to zero specifies that error recovery operations that cause delays during the
data transfer are acceptable. Data shall not be fabricated.
An RC bit set to one specifies the device server shall transfer the entire requested length of data without
adding delays during the data transfer to perform error recovery procedures. The device server may transfer
pseudo read data in order to maintain a continuous flow of data. The device server shall assign priority to the
RC bit over conflicting bits within this byte.
NOTE 26 - The RC bit set to one is useful for image processing, audio, or video applications.

A post error (PER) bit set to one specifies that if a recovered read error occurs while processing a read
command or a write command, then the device server shall terminate the command with CHECK CONDITION
status with the sense key set to RECOVERED ERROR. A PER bit set to zero specifies that if a recovered read
error occurs while processing a read command or a write command, then the device server shall perform error
recovery procedures within the limits established by the error recovery parameters and not terminate the
specified command with CHECK CONDITION status with the sense key set to RECOVERED ERROR (e.g.,
the device server may terminate the specified command with CHECK CONDITION status with the sense key
set to MEDIUM ERROR if an uncorrectable error is detected based on the established limits during the error
recovery process). If the DTE bit is set to one, then the PER bit shall be set to one.
A data terminate on error (DTE) bit set to one specifies that, upon detection of a recovered error, the device
server shall terminate the data transfer to the Data-In Buffer for a read command or the data transfer to the
Data-Out Buffer for a write command upon detection of a recovered error. A DTE bit set to zero specifies that,
upon detection of a recovered error, the device server shall not terminate the data transfer to the Data-In
Buffer for a read command or the data transfer to the Data-Out Buffer for a write command.

Working Draft SCSI Block Commands 4 (SBC-4)

287

T10/BSR INCITS 506 Revision 3

27 August 2014

The combinations of the error recovery bits (i.e., the PER bit, and the DTE bit) are defined in table 206.

Table 206 Error recovery bit combinations (part 1 of 2)


PER

DTE

Description b

The device server shall perform the full number of retries as specified in the READ
field for read medium operations, the WRITE RETRY COUNT field for
write medium operations, and the VERIFY RETRY COUNT field (see 6.5.9) for verify
medium operations and shall perform error correction in an attempt to recover the
data.
RETRY COUNT

The device server shall not report recovered read errors or write errors. The
device server shall terminate a command performing a read medium operation or
a write medium operation with CHECK CONDITION status before the transfer
count is exhausted only if an unrecovered error is detected.
If an unrecovered read error occurs during a read medium operation, then the
transfer block (TB) bit determines whether the data for the logical block with the
unrecovered read error is transferred to the Data-In Buffer.

Invalid mode. The PER bit shall be set to one if the DTE bit is set to one. a
The device server shall perform the full number of retries as specified in the READ
field for read medium operations, the VERIFY RETRY COUNT field
(see 6.5.9) for verify medium operations, the WRITE RETRY COUNT field for write
medium operations, and shall perform error correction in an attempt to recover the
data.
RETRY COUNT

The device server shall terminate a command performing a read medium


operation or write medium operation with CHECK CONDITION status before the
transfer count is exhausted only if an unrecovered error is detected.
1

If an unrecovered read error occurs during a read medium operation, the transfer
block (TB) bit determines whether the data for the logical block with the
unrecovered read error is transferred to the Data-In Buffer.
If a recovered error occurs while the device server is performing a read medium
operation or write medium operation, then, after the operation is complete, the
device server shall terminate the command with CHECK CONDITION status with
the sense key set to RECOVERED ERROR. The INFORMATION field in the sense
data contains the LBA of the last recovered error that occurred during the
command (see 4.18.1).

288

If an invalid combination of the error recovery bits is sent by an application client, then the
device server shall terminate the MODE SELECT command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
INVALID FIELD IN PARAMETER LIST.
This table is used by both the Read Write Error Recovery mode page and the Verify Error
Recovery mode page (see 6.5.9). When used for the Read Write Error Recovery mode
page, rules about the VERIFY RETRY COUNT field are not applicable. When used for the
Verify Error Recovery mode page, rules about the READ RETRY COUNT field, the WRITE RETRY
COUNT field, and write medium operations are not applicable and rules about read medium
operations are applicable to verify medium operations.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3


Table 206 Error recovery bit combinations (part 2 of 2)

PER

DTE

Description b

The device server shall perform the full number of retries as specified in the READ
RETRY COUNT field for read medium operations, the VERIFY RETRY COUNT field
(see 6.5.9) for verify medium operations, the WRITE RETRY COUNT field for write
medium operations, and shall perform error correction in an attempt to recover the
data.
1

The device server shall terminate a command performing a read medium


operation or write medium operation with CHECK CONDITION status before the
transfer count is exhausted if any error, either recovered or unrecovered, is
detected. The INFORMATION field in the sense data contains the LBA of the error
(see 4.18.1).
If an unrecovered read error occurs during a read medium operation, the transfer
block (TB) bit determines whether the data for the logical block with the
unrecovered read error is transferred to the Data-In Buffer.

If an invalid combination of the error recovery bits is sent by an application client, then the
device server shall terminate the MODE SELECT command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense code set to
INVALID FIELD IN PARAMETER LIST.
This table is used by both the Read Write Error Recovery mode page and the Verify Error
Recovery mode page (see 6.5.9). When used for the Read Write Error Recovery mode
page, rules about the VERIFY RETRY COUNT field are not applicable. When used for the
Verify Error Recovery mode page, rules about the READ RETRY COUNT field, the WRITE RETRY
COUNT field, and write medium operations are not applicable and rules about read medium
operations are applicable to verify medium operations.

The READ RETRY COUNT field specifies the number of times that the device server shall attempt its recovery
algorithm during read medium operations.
The WRITE RETRY COUNT field specifies the number of times that the device server shall attempt its recovery
algorithm during write medium operations.
A logical block provisioning error reporting enabled (LBPERE) bit set to one specifies that logical block
provisioning threshold notification is enabled. A LBPERE bit set to zero specifies that logical block provisioning
threshold notification is disabled (see 4.7.3.7.4).
A RECOVERY TIME LIMIT field set to a non-zero value specifies in milliseconds the maximum time duration that
the device server shall use for data error recovery procedures during read medium operations and during
write medium operations. The device server may round this value as described in SPC-4. The limit in this field
specifies the maximum error recovery time allowed for any individual logical block. A RECOVERY TIME LIMIT field
set to zero specifies that the device server shall use its default value.
If both a retry count and a recovery time limit are specified, then the field that specifies the recovery action of
least duration shall have priority.
To disable all types of correction and retries, the application client should set:
a)
b)
c)
d)
e)

the PER bit to one;


the DTE bit to one;
the READ RETRY COUNT field to 00h;
the WRITE RETRY COUNT field to 00h; and
the RECOVERY TIME LIMIT field to 0000h.

Working Draft SCSI Block Commands 4 (SBC-4)

289

T10/BSR INCITS 506 Revision 3

27 August 2014

6.5.9 Verify Error Recovery mode page

The Verify Error Recovery mode page (see table 207) specifies the error recovery parameters the device
server shall use during verify medium operations (e.g., from VERIFY commands and the verify medium
operations of the WRITE AND VERIFY commands). Verify medium operations do not trigger automatic read
reassignment.

Table 207 Verify Error Recovery mode page


Bit
Byte
0

7
PS

6
SPF

(0b)

PAGE CODE
PAGE LENGTH

Obsolete

Reserved

11

(07h)

Obsolete
VERIFY RETRY COUNT

(MSB)

(0Ah)

10

Error recovery bits

Reserved

VERIFY RECOVERY TIME LIMIT

PER

DTE

Obsolete

(LSB)

The parameters saveable (PS) bit, the subpage format (SPF) bit, the PAGE CODE field, and the PAGE LENGTH
field are defined in SPC-4.
The SPF bit, the PAGE CODE field, and the PAGE LENGTH field shall be set to the values shown in table 207 for
the Verify Error Recovery mode page.
The PER bit, and the DTE bit (i.e., the error recovery bits) are defined in 6.5.8. The combinations of these bits
are defined in table 206.
The VERIFY RETRY COUNT field specifies the number of times that the device server shall attempt its recovery
algorithm during a verify medium operation.
The VERIFY RECOVERY TIME LIMIT field specifies in milliseconds the maximum time duration that the device
server shall use error recovery procedures to recover data for an individual logical block during a verify
medium operation. The device server may round this value as described in SPC-4.
If both a verify retry count and a verify recovery time limit are specified, then the one that requires the least
time for data error recovery actions shall have priority.
To disable all types of correction and retries, the application client should set:
a)
b)
c)
d)

290

the PER bit to one;


the DTE bit to one;
the VERIFY RETRY COUNT field to 00h; and
the VERIFY RECOVERY TIME LIMIT field to 0000h.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.6 Vital product data (VPD) parameters


6.6.1 VPD parameters overview

See table 208 for references to the VPD pages used only with direct access block devices. See SPC-4 for
VPD pages used with all device types. The VPD pages and their corresponding page codes specific to direct
access block devices are defined in table 208.

Table 208 VPD page codes for direct access block devices
Page code a

Reference

Support
requirements

ATA Information VPD page

89h

SAT-3

See SAT-3

Block Device Characteristics VPD page

B1h

6.6.2

Optional

Block Device Characteristics Extension


VPD page

B5h

6.6.3

Optional

Block Limits VPD page

B0h

6.6.4

Optional

Logical Block Provisioning VPD page

B2h

6.6.5

Optional

Power Consumption VPD page

8Dh

SPC-4

See SPC-4

Referrals VPD page

B3h

6.6.6

Optional

Third-Party Copy VPD page

8Fh

SPC-4 and 6.6.7

See b

Supported Block Lengths And Protection


Types VPD page

B4h

6.6.8

Optional

VPD page name

Reserved for this standard


a
b

B5h to BFh

All page codes for direct access block devices not shown in this table are reserved.
Mandatory if the POPULATE TOKEN command and the WRITE USING TOKEN command are
supported.

Working Draft SCSI Block Commands 4 (SBC-4)

291

T10/BSR INCITS 506 Revision 3

27 August 2014

6.6.2 Block Device Characteristics VPD page

The Block Device Characteristics VPD page (see table 209) contains parameters indicating characteristics of
the logical unit.

Table 209 Block Device Characteristics VPD page


Bit
Byte

PERIPHERAL QUALIFIER

PERIPHERAL DEVICE TYPE


PAGE CODE

(MSB)

PAGE LENGTH

(MSB)

(00000b)

(B1h)
(003Ch)

(LSB)

MEDIUM ROTATION RATE

5
6

(LSB)

PRODUCT TYPE

WABEREQ

WACEREQ

Reserved

NOMINAL FORM FACTOR

HAW_ZBC

63

Reserved

FUAB

VBULS

Reserved

The PERIPHERAL QUALIFIER field is and PERIPHERAL QUALIFIER field are defined in SPC-4.
The PAGE CODE field, PERIPHERAL DEVICE TYPE field, and PAGE LENGTH field are defined in SPC-4 and shall be
set to the values shown in table 209 for the Block Device Characteristics VPD page.
The MEDIUM ROTATION RATE field is defined in table 210.

Table 210 MEDIUM ROTATION RATE field


Code

Description

0000h

Medium rotation rate is not reported

0001h

Non-rotating medium (e.g., solid state)

0002h to 0400h

Reserved

0401h to FFFEh

Nominal medium rotation rate in revolutions per minute (e.g., 7 200 rpm =
1C20h,10 000 rpm = 2710h, and 15 000 rpm = 3A98h)

FFFFh

292

Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The PRODUCT TYPE field (see table 211) defines the product type of the storage device.

Table 211 PRODUCT TYPE field


Code

Description

00h

Not indicated

01h

CFast (see CFast)

02h

CompactFlash (see CF)

03h

Memory Stick (see MS)

04h

MultiMediaCard (see eMMC)

05h

Secure Digital Card (see SD Card)

06h

XQD (see XQD)

07h

Universal Flash Storage (see UFS)

08h to EFh

Reserved

F0h to FFh

Vendor specific

The write after block erase required (WABEREQ) field indicates the device server behavior (see table 212), if a
write operation has not been performed to a mapped LBA since a sanitize block erase operation was
performed and no other error occurs during the processing of a read command specifying that LBA.

Table 212 WABEREQ field


Code

Description

00b

Not specified.

01b

The device server completes the read command specifying that LBA with GOOD status and any
data transferred to the Data-In Buffer is indeterminate.

10b

The device server terminates the read command specifying that LBA with CHECK CONDITION
status with sense key set to MEDIUM ERROR and the additional sense code set to an appropriate
value other than WRITE AFTER SANITIZE REQUIRED (e.g., ID CRC OR ECC ERROR).

11b

The device server terminates the read command specifying that LBA with CHECK CONDITION
status with sense key set to MEDIUM ERROR and the additional sense code set to WRITE
AFTER SANITIZE REQUIRED.

Working Draft SCSI Block Commands 4 (SBC-4)

293

T10/BSR INCITS 506 Revision 3

27 August 2014

The write after cryptographic erase required (WACEREQ) field indicates the device server behavior
(see table 213), if a write operation has not been performed to a mapped LBA since a sanitize cryptographic
erase operation was performed and no other error occurs during the processing of a read command
specifying that LBA, then.

Table 213 WACEREQ field


Code

Description

00b

Not specified.

01b

The device server completes the read command specifying that LBA with GOOD status and any
data transferred to the Data-In Buffer is indeterminate.

10b

The device server terminates the read command specifying that LBA with CHECK CONDITION
status with sense key set to MEDIUM ERROR and the additional sense code set to an appropriate
value other than WRITE AFTER SANITIZE REQUIRED (e.g., ID CRC OR ECC ERROR).

11b

The device server terminates the read command specifying that LBA with CHECK CONDITION
status with sense key set to MEDIUM ERROR and the additional sense code set to WRITE
AFTER SANITIZE REQUIRED.

The NOMINAL FORM FACTOR field indicates the nominal form factor of the device containing the logical unit and
is defined in table 214.

Table 214 NOMINAL FORM FACTOR field


Code

Description

0h

Nominal form factor is not reported

1h

5.25 inch

2h

3.5 inch

3h

2.5 inch

4h

1.8 inch

5h

Less than 1.8 inch

All others

Reserved

A host aware zoned block capable (HAW_ZBC) bit set to one indicates that the device server supports the host
aware zoned block capabilities defined in ZBC. A HAW_ZBC bit set to zero indicates that the device server does
not support host aware zoned block capabilities defined in ZBC.
A force unit access behavior (FUAB) bit set to one indicates that the device server interprets the
SYNCHRONIZE CACHE command and the FUA bit in read commands and write commands in compliance
with this standard. An FUAB bit set to zero indicates that the device server interprets the SYNCHRONIZE
CACHE command and the FUA bit in read commands and write commands in compliance with SBC-2.
A verify byte check unmapped LBA supported (VBULS) bit set to one indicates that the device server supports
unmapped LBAs while processing VERIFY commands (see 5.29, 5.30, 5.31, and 5.32) and WRITE AND
VERIFY commands (see 5.37, 5.38, 5.39, and 5.40) with the BYTCHK field set to 01b. A VBULS bit set to zero
indicates that the device server does not support unmapped LBAs while processing VERIFY commands and
WRITE AND VERIFY commands with the BYTCHK field set to 01b. The device server should set the VBULS bit
to one.

294

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.6.3 Block Device Characteristics Extension VPD page

The Block Device Characteristics Extension VPD page (see table 215) contains parameters indicating
characteristics of the logical unit.
Table 215 Block Device Characteristics Extension VPD page
Bit
Byte
0

PERIPHERAL QUALIFIER

PERIPHERAL DEVICE TYPE

PAGE CODE

(MSB)

2
3

PAGE LENGTH

(007Ch)

RESERVED

UTILIZATION TYPE

UTILIZATION UNITS

UTILIZATION INTERVAL

(MSB)

12

15

(MSB)

(00000b)

(B5h)

11

(LSB)

UTILIZATION B

(LSB)
UTILIZATION A

(LSB)

16

127

Reserved

The PERIPHERAL QUALIFIER field is defined in SPC-4.


The PAGE CODE field, PERIPHERAL DEVICE TYPE field, and PAGE LENGTH field are defined in SPC-4 and shall be
set to the values shown in table 215 for the Block Device Characteristics Extension VPD page.
The UTILIZATION TYPE field (see table 216) indicates the designed utilization characteristics for the direct
access block device based on the contents of the UTILIZATION A field and the UTILIZATION B field evaluated
using the units indicated by the UTILIZATION UNITS field over the time interval indicated by the UTILIZATION
INTERVAL field.
Table 216 UTILIZATION TYPE field
Code

01h

02h
03h

all others

Description
Combined writes and reads: the UTILIZATION A field contains designed number of host
requested bytes transferred by write operations and host requested bytes transferred by
read operations. The UTILIZATION B field is reserved.
Writes only: the UTILIZATION A field contains designed number of host requested bytes
transferred by write operations. The UTILIZATION B field is reserved.
Separate writes and reads: the UTILIZATION A field contains designed number of host
requested bytes transferred by write operations. The UTILIZATION B field contains
designed number of host requested bytes transferred by read operations.
Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

295

T10/BSR INCITS 506 Revision 3

27 August 2014

The UTILIZATION UNITS field (see table 217) indicates the units of measure for the values, if any, in the
UTILIZATION A field and the UTILIZATION B field.
Table 217 UTILIZATION UNITS field
Code

Description

02h

megabytes

03h

gigabytes

04h

terabytes

05h

petabytes

06h

exabytes

all others

Reserved

The UTILIZATION INTERVAL field (see table x4) indicates a nominal calendar time reference interval over which
the values, if any, in the UTILIZATION A field and the UTILIZATION B field may be applied.
Table 218 UTILIZATION INTERVAL field
Code

Description

0Ah

per day

0Eh

per year

all others

Reserved

The UTILIZATION A field and the UTILIZATION B field indicate the designed utilization characteristics for the direct
access block device as:
a) defined by the utilization type field;
b) expressed in the units defined by the utilization units field; and
c) over the time interval defined by the utilization interval field.

296

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.6.4 Block Limits VPD page

The Block Limits VPD page (see table 219) provides the application client with the means to obtain certain
operating parameters of the logical unit.

Working Draft SCSI Block Commands 4 (SBC-4)

297

T10/BSR INCITS 506 Revision 3

298

27 August 2014

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3


Table 219 Block Limits VPD page (part 1 of 2)

Bit
Byte
0

(MSB)

PERIPHERAL DEVICE TYPE


PAGE CODE
PAGE LENGTH

3
5

(00000b)

(B0h)
(003Ch)

Reserved

4
6

PERIPHERAL QUALIFIER

1
2

(LSB)
WSNZ

MAXIMUM COMPARE AND WRITE LENGTH

(MSB)

OPTIMAL TRANSFER LENGTH GRANULARITY

7
8

11

(MSB)

12

15

(MSB)

16

19

(MSB)

20

23

(MSB)

24

27

(MSB)

28

31

(MSB)

32

35

UGAVALID

36

43

(MSB)

44

47

(MSB)

48

51

(MSB)

(LSB)

MAXIMUM TRANSFER LENGTH

(LSB)
OPTIMAL TRANSFER LENGTH

(LSB)
MAXIMUM PREFETCH LENGTH

(LSB)
MAXIMUM UNMAP LBA COUNT

(LSB)
MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT

(LSB)
OPTIMAL UNMAP GRANULARITY

(LSB)
(MSB)
UNMAP GRANULARITY ALIGNMENT

(LSB)
MAXIMUM WRITE SAME LENGTH

(LSB)
MAXIMUM ATOMIC TRANSFER LENGTH

(LSB)
ATOMIC ALIGNMENT

Working Draft SCSI Block Commands 4 (SBC-4)

(LSB)

299

T10/BSR INCITS 506 Revision 3

27 August 2014

Table 219 Block Limits VPD page (part 2 of 2)


Bit
Byte
52

55
56

63

(MSB)
ATOMIC TRANSFER LENGTH GRANULARITY

(LSB)
Reserved

The PERIPHERAL QUALIFIER field and PERIPHERAL QUALIFIER field areis defined in SPC-4.
The PAGE CODE field, PERIPHERAL DEVICE TYPE field, and PAGE LENGTH field are defined in SPC-4 and shall be
set to the values shown in table 219 for the Block Limits VPD page.
A write same non-zero (WSNZ) bit set to one indicates that the device server does not support a value of zero
in the NUMBER OF LOGICAL BLOCKS field in the WRITE SAME command CDBs (see 5.45, 5.46, and 5.47). A
WSNZ bit set to zero indicates that the device server may or may not support a value of zero in the NUMBER OF
LOGICAL BLOCKS field of the WRITE SAME commands.
A MAXIMUM COMPARE AND WRITE LENGTH field set to a non-zero value indicates the maximum value that the
device server accepts in the NUMBER OF LOGICAL BLOCKS field in the COMPARE AND WRITE command
(see 5.2). A MAXIMUM COMPARE AND WRITE LENGTH field set to zero indicates that the device server does not
support the COMPARE AND WRITE command. If the MAXIMUM TRANSFER LENGTH field is not set to zero, then
the device server shall set the MAXIMUM COMPARE AND WRITE LENGTH field to a value less than or equal to the
value in the MAXIMUM TRANSFER LENGTH field.

300

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

An OPTIMAL TRANSFER LENGTH GRANULARITY field set to a non-zero value indicates the optimal transfer length
granularity size in logical blocks for a single command shown in the command column of table 220. If a device
server receives one of these commands with a transfer size that is not equal to a multiple of this value, then
the device server may incur delays in processing the command. An OPTIMAL TRANSFER LENGTH GRANULARITY
field set to 0000h indicates that the device server does not report optimal transfer length granularity.

Table 220 Transfer limits for commands

Command

Field that specifies


the transfer size

Block Limits VPD


page field(s) that
indicate maximum
limits

COMPARE AND WRITE

CDB NUMBER OF
LOGICAL BLOCKS field

MAXIMUM COMPARE AND


WRITE LENGTH field

ORWRITE

CDB TRANSFER
LENGTH field

MAXIMUM TRANSFER
LENGTH field

PRE-FETCH

CDB PREFETCH
LENGTH field

MAXIMUM PREFETCH
LENGTH field

READ

CDB TRANSFER
LENGTH field

VERIFY

CDB VERIFICATION
LENGTH field

WRITE
WRITE AND VERIFY
XDWRITEREAD

Additional sense code if


the value in the
specified field exceeds
the maximum limit

INVALID FIELD IN CDB

MAXIMUM TRANSFER
LENGTH field

CDB TRANSFER
LENGTH field

XPWRITE
Any individual block device
range descriptor in a
POPULATE TOKEN
command (see 5.7)
Any individual block device
range descriptor in a
WRITE USING TOKEN
command (see 5.48)

Block device range


descriptor NUMBER
OF LOGICAL BLOCKS

MAXIMUM TRANSFER
LENGTH field

INVALID FIELD IN
PARAMETER LIST

field

A MAXIMUM TRANSFER LENGTH field set to a non-zero value indicates the maximum transfer length in logical
blocks that the device server accepts for a single command shown in table 220. If a device server receives
one of these commands with a transfer size greater than this value, then the device server shall terminate the
command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to the value shown in table 220. A MAXIMUM TRANSFER LENGTH field set to 0000_0000h
indicates that the device server does not report a limit on the transfer length.
An OPTIMAL TRANSFER LENGTH field set to a non-zero value indicates the optimal transfer size in logical blocks
for a single command shown in table 220. If a device server receives one of these commands with a transfer
size greater than this value, then the device server may incur delays in processing the command. An OPTIMAL
TRANSFER LENGTH field set to 0000_0000h indicates that the device server does not report an optimal transfer
size.
The MAXIMUM PREFETCH LENGTH field indicates the maximum prefetch length in logical blocks that the device
server accepts for a single PRE-FETCH command. If the MAXIMUM TRANSFER LENGTH field is not set to zero,

Working Draft SCSI Block Commands 4 (SBC-4)

301

T10/BSR INCITS 506 Revision 3

27 August 2014

then the device server should set the MAXIMUM PREFETCH LENGTH field to a value less than or equal to the
value in the MAXIMUM TRANSFER LENGTH field.
A MAXIMUM UNMAP LBA COUNT field set to a non-zero value indicates the maximum number of LBAs that may
be unmapped by an UNMAP command (see 5.28). If the number of LBAs that may be unmapped by an
UNMAP command is constrained only by the amount of data that may be contained in the UNMAP parameter
list (see 5.28.2), then the device server shall set the MAXIMUM UNMAP LBA COUNT field to FFFF_FFFFh. If the
device server implements the UNMAP command, then the value in this field shall be greater than or equal to
one. A MAXIMUM UNMAP LBA COUNT field set to 0000_0000h indicates that the device server does not
implement the UNMAP command.
A MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT field set to a non-zero value indicates the maximum number of
UNMAP block descriptors (see 5.28.2) that shall be contained in the parameter data transferred to the device
server for an UNMAP command (see 5.28). If there is no limit on the number of UNMAP block descriptors
contained in the parameter data, then the device server shall set the MAXIMUM UNMAP BLOCK DESCRIPTOR
COUNT field to FFFF_FFFFh. If the device server implements the UNMAP command, then the value in the
MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT field shall be greater than or equal to one. A MAXIMUM UNMAP BLOCK
DESCRIPTOR COUNT field set to 0000_0000h indicates that the device server does not implement the UNMAP
command.
An OPTIMAL UNMAP GRANULARITY field set to a non-zero value indicates the optimal granularity in logical blocks
for unmap requests (e.g., an UNMAP command or a WRITE SAME (16) command with the UNMAP bit set to
one). An unmap request with a number of logical blocks that is not a multiple of this value may result in unmap
operations on fewer LBAs than requested. An OPTIMAL UNMAP GRANULARITY field set to 0000_0000h indicates
that the device server does not report an optimal unmap granularity.
An unmap granularity alignment valid (UGAVALID) bit set to one indicates that the UNMAP GRANULARITY
ALIGNMENT field is valid. A UGAVALID bit set to zero indicates that the UNMAP GRANULARITY ALIGNMENT field is not
valid.
The UNMAP GRANULARITY ALIGNMENT field indicates the LBA of the first logical block to which the OPTIMAL
UNMAP GRANULARITY field applies. The unmap granularity alignment is used to calculate an optimal unmap
request starting LBA as follows:
optimal unmap request starting LBA = (n optimal unmap granularity) + unmap granularity alignment
where:
n
optimal unmap granularity
unmap granularity alignment

is zero or any positive integer value;


is the value in the OPTIMAL UNMAP GRANULARITY field; and
is the value in the UNMAP GRANULARITY ALIGNMENT field.

An unmap request with a starting LBA that is not optimal may result in unmap operations on fewer LBAs than
requested.
A MAXIMUM WRITE SAME LENGTH field set to a non-zero value indicates the maximum number of contiguous
logical blocks that the device server allows to be unmapped or written in a single WRITE SAME command. A
MAXIMUM WRITE SAME LENGTH field set to zero indicates that the device server does not report a limit on the
number of logical blocks that it allows to be unmapped or written in a single WRITE SAME command.
A MAXIMUM ATOMIC TRANSFER LENGTH field set to a non-zero value indicates the maximum atomic transfer
length in logical blocks that the device server supports for a single atomic command (see 4.31). A MAXIMUM
ATOMIC TRANSFER LENGTH field set to 0000_0000h indicates that the device server does not indicate a
maximum atomic transfer length. The maximum atomic transfer length indicated by the MAXIMUM ATOMIC
TRANSFER LENGTH field shall be less than or equal to the maximum transfer length indicated by the MAXIMUM
TRANSFER LENGTH field.
The atomic alignment field indicates the required alignment of the starting LBA in an atomic write command. If
the atomic alignment field is set to 0000_0000h, then there is no alignment requirement for atomic write
commands.

302

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

If the atomic alignment field is non-zero, then the starting LBA of an atomic write request shall meet the
following:
atomic request starting LBA = n atomic alignment
where:
n

is zero or any positive integer value; and

atomic alignment

is the value in the atomic alignment field,

The ATOMIC TRANSFER LENGTH GRANULARITY field indicates the minimum length for a WRITE ATOMIC
command. Atomic write operations are required to have a length that is a multiple of the atomic transfer length
granularity. An ATOMIC TRANSFER LENGTH GRANULARITY field set to 0000_0000h indicates that there is no
atomic transfer length granularity requirement.
6.6.5 Logical Block Provisioning VPD page

The Logical Block Provisioning VPD page (see table 221) provides the application client with logical block
provisioning related operating parameters of the logical unit.

Table 221 Logical Block Provisioning VPD page


Bit
Byte
0

PERIPHERAL QUALIFIER

PAGE CODE

(MSB)

PAGE LENGTH

3
4
5
6

(00000b)

(B2h)

(0004h or (n - 3))

(LSB)

THRESHOLD EXPONENT
LBPU

LBPWS

LBPWS10

Reserved

LBPRZ

Reserved

ANC_SUP

DP

PROVISIONING TYPE

Reserved

7
8

PERIPHERAL DEVICE TYPE

1
2

PROVISIONING GROUP DESCRIPTOR

(if any)

The PERIPHERAL QUALIFIER field is defined in SPC-4.


The PAGE CODE field and PERIPHERAL DEVICE TYPE field are defined in SPC-4 and shall be set to the value
shown in table 221 for the Logical Block Provisioning VPD page.
The PAGE LENGTH field is defined in SPC-4. If the DP bit is set to zero, then the PAGE LENGTH field shall be set
to 0004h. If the DP bit is set to one, then the PAGE LENGTH field shall be set to the value defined in table 221.
The THRESHOLD EXPONENT field indicates the threshold set size as described in 4.7.3.7.1. A THRESHOLD
EXPONENT field set to zero indicates that the logical unit does not support logical block provisioning thresholds.
If logical block provisioning thresholds or the Logical Block Provisioning log page (see 6.4.4.1) are supported,
then the threshold exponent shall be a non-zero value selected such that:
(capacity 2(threshold exponent)) < 2(32)
where:

Working Draft SCSI Block Commands 4 (SBC-4)

303

T10/BSR INCITS 506 Revision 3

capacity

threshold exponent
2(32)

27 August 2014

is 1 + the LBA of the last logical block as returned in the READ


CAPACITY (16) parameter data (see 5.16.2) (i.e., the number of logical
blocks on the direct access block device);
is the contents of the THRESHOLD EXPONENT field; and
is the constant value 1_0000_0000h (i.e., 4 294 967 296).

A logical block provisioning UNMAP command (LBPU) bit set to one indicates that the device server supports
the UNMAP command (see 5.28). An LBPU bit set to zero indicates that the device server does not support the
UNMAP command.
A logical block provisioning WRITE SAME (16) command (LBPWS) bit set to one indicates that the device
server supports the use of the WRITE SAME (16) command (see 5.46) to unmap LBAs. An LBPWS bit set to
zero indicates that the device server does not support the use of the WRITE SAME (16) command to unmap
LBAs.
A logical block provisioning WRITE SAME (10) command (LBPWS10) bit set to one indicates that the device
server supports the use of the WRITE SAME (10) command (see 5.45) to unmap LBAs. An LBPWS10 bit set to
zero indicates that the device server does not support the use of the WRITE SAME (10) command to unmap
LBAs.
The logical block provisioning read zeros (LBPRZ) bit shall be set to the same value as the LBPRZ bit in the
READ CAPACITY (16) parameter data (see 5.16.2).
An anchor supported (ANC_SUP) bit set to one indicates that the device server supports anchored LBAs
(see 4.7.1). An ANC_SUP bit set to zero indicates that the device server does not support anchored LBAs.
A descriptor present (DP) bit set to one indicates a PROVISIONING GROUP DESCRIPTOR field is present. A DP bit
set to zero indicates a PROVISIONING GROUP DESCRIPTOR field is not present.
The PROVISIONING TYPE field is defined in table 222.

Table 222 PROVISIONING TYPE field


Code

Description

000b

The device server does not report a provisioning type


or may be fully provisioned.

001b

The logical unit is resource provisioned (see 4.7.3.2).

010b

The logical unit is thin provisioned (see 4.7.3.3).

All others

Reserved

The PROVISIONING GROUP DESCRIPTOR field, if any, contains a designation descriptor (see SPC-4) for the LBA
mapping resources used by this logical unit.
If a PROVISIONING GROUP DESCRIPTOR field is present:
a) the ASSOCIATION field shall be set to 00b (i.e. logical unit); and
b) the DESIGNATOR TYPE field shall be set to:
A) 1h (i.e., T10 vendor ID based); or
B) 3h (i.e., NAA).

304

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.6.6 Referrals VPD page

The Referrals VPD page (see table 223) contains parameters indicating characteristics of the user data
segments contained within this logical unit.

Table 223 Referrals VPD page


Bit
Byte
0

PERIPHERAL QUALIFIER

PAGE CODE

(MSB)

PERIPHERAL DEVICE TYPE

1
2

PAGE LENGTH

(00000b)

(B3h)
(000Ch)

(LSB)

Reserved

11

(MSB)

12

15

(MSB)

USER DATA SEGMENT SIZE

(LSB)
USER DATA SEGMENT MULTIPLIER

(LSB)

The PERIPHERAL QUALIFIER field is defined in SPC-4.


The PAGE CODE field, PERIPHERAL DEVICE TYPE field, and PAGE LENGTH field are defined in SPC-4 and shall be
set to the values shown in table 223 for the Referrals VPD page.
A USER DATA SEGMENT SIZE field set to a non-zero value indicates the number of contiguous logical blocks in a
user data segment (see 4.28.2). A USER DATA SEGMENT SIZE field set to zero indicates the user data segment
size information (i.e., the first user data segment LBA to the last user data segment LBA) is as indicated in the
user data segment referral descriptor (see table 17).
The USER DATA SEGMENT MULTIPLIER field is used by an application client to calculate the beginning LBA of
each user data segment as described in 4.28.2.

Working Draft SCSI Block Commands 4 (SBC-4)

305

T10/BSR INCITS 506 Revision 3

27 August 2014

6.6.7 Third-Party Copy VPD page


6.6.7.1 Third-Party Copy VPD page overview

The Third-Party Copy VPD page (see SPC-4) provides a means to retrieve third-party copy descriptors
including a descriptor that describes operating parameters for the POPULATE TOKEN command (see 5.7)
and the WRITE USING TOKEN command (see 5.48).
6.6.7.2 Block device third-party copy descriptor type codes

Block device third-party copy descriptor type codes (see table 224) indicate which third-party copy descriptor
is being returned.

Table 224 Block device third-party copy descriptor type codes


Descriptor
code

0000h
All other codes
a

306

Third-party copy descriptor name

Block Device ROD Token Limits


See SPC-4

Reference

Support
requirements

6.6.7.3

See a

See SPC-4

See SPC-4

Mandatory if the POPULATE TOKEN command and the WRITE USING TOKEN command are
supported.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

6.6.7.3 Block Device ROD Token Limits descriptor

The Block Device ROD Token Limits descriptor (see table 225) is a third-party copy descriptor in the
Third-Party Copy VPD page (see SPC-4) that provides the application client with a method to obtain operating
parameters for direct access block device ROD token operations (see 4.30).

Table 225 Block Device ROD Token Limits descriptor


Bit
Byte
0

(MSB)

1
2

(MSB)

3
4

9
10

THIRD-PARTY COPY DESCRIPTOR TYPE

(0000h)

THIRD-PARTY COPY DESCRIPTOR LENGTH

(0020h)

(LSB)
(LSB)

Vendor specific
(MSB)

11
12

15

(MSB)

16

19

(MSB)

20

27

(MSB)

28

35

(MSB)

MAXIMUM RANGE DESCRIPTORS

(LSB)

MAXIMUM INACTIVITY TIMEOUT

(LSB)
DEFAULT INACTIVITY TIMEOUT

(LSB)
MAXIMUM TOKEN TRANSFER SIZE

(LSB)
OPTIMAL TRANSFER COUNT

(LSB)

The THIRD-PARTY COPY DESCRIPTOR TYPE field and the THIRD-PARTY COPY DESCRIPTOR LENGTH field are defined
in SPC-4 and shall be set to the values shown in table 225 for the Block Device ROD Token Limits descriptor.
The MAXIMUM RANGE DESCRIPTORS field indicates the maximum number of block device range descriptors that
may be specified in the parameter data of a POPULATE TOKEN command (see 5.7) and the parameter data
of a WRITE USING TOKEN command (see 5.48). If the MAXIMUM RANGE DESCRIPTORS field is set to zero, then
the copy manager does not report a maximum number of block device range descriptors.
The MAXIMUM INACTIVITY TIMEOUT field indicates the maximum value in the INACTIVITY TIMEOUT field of the
parameter data of a POPULATE TOKEN command that is accepted by the copy manager. If the MAXIMUM
INACTIVITY TIMEOUT field is set to zero, then the device server does not report a maximum inactivity timeout
value. If the MAXIMUM INACTIVITY TIMEOUT field is set to FFFF_FFFFh then there is no maximum value that may
be specified in the INACTIVITY TIMEOUT field in the parameter data of the POPULATE TOKEN command.
The DEFAULT INACTIVITY TIMEOUT field indicates the inactivity timeout value that is used if the INACTIVITY
TIMEOUT field in the parameter data of a POPULATE TOKEN command is set to zero. If the DEFAULT INACTIVITY
TIMEOUT field is set to zero, then the copy manager does not report a default inactivity timeout value.

Working Draft SCSI Block Commands 4 (SBC-4)

307

T10/BSR INCITS 506 Revision 3

27 August 2014

The MAXIMUM TOKEN TRANSFER SIZE field indicates the maximum size in logical blocks that may be specified by
the sum of the NUMBER OF LOGICAL BLOCKS fields in all block device range descriptors for the following
commands:
a) POPULATE TOKEN; and
b) WRITE USING TOKEN.
If the MAXIMUM TOKEN TRANSFER SIZE field is set to zero, then the copy manager does not report a maximum
token transfer size.
If the MAXIMUM BYTES IN BLOCK ROD field in the block ROD device type specific features descriptor in the ROD
token features third-party copy descriptor in the Third-party Copy VPD page (see SPC-4) is reported, then the
MAXIMUM TOKEN TRANSFER SIZE field shall be set to the number of logical blocks that represents the value in the
MAXIMUM BYTES IN BLOCK ROD field in the block ROD device type specific features descriptor in the ROD token
features third-party copy descriptor in the Third-party Copy VPD page.
The OPTIMAL TRANSFER COUNT field indicates the optimal number of logical blocks that the copy manager is
able to transfer. If the sum of the NUMBER OF LOGICAL BLOCKS fields in all block device range descriptors in the
parameter data of a POPULATE TOKEN command or the parameter data of a WRITE USING TOKEN
command exceeds this value then, a delay in processing the request may be incurred. If the field is set to
zero, then the copy manager does not report an optimal transfer count.
If the OPTIMAL BYTES IN BLOCK ROD TRANSFER field in the block ROD device type specific features descriptor in
the ROD token features third-party copy descriptor in the Third-party Copy VPD page is reported, then the
OPTIMAL TRANSFER COUNT field shall be set to the number of logical blocks that represents the value in the
OPTIMAL BYTES IN BLOCK ROD TRANSFER field in the block ROD device type specific features descriptor in the
ROD token features third-party copy descriptor in the Third-party Copy VPD page.
6.6.8 Supported Block Lengths And Protection Types VPD page

The Supported Block Lengths And Protection Types VPD page (see table 226) contains parameters indicating
the specific protection types (see 4.22) supported for each supported logical block length. If the PROTECT bit is
set to zero in the Standard INQUIRY data (See SPC-5) or the SBLP bit is set to zero in the Control mode page
(See SPC-5), then the device server shall not support this VPD page.
Table 226 Supported Block Lengths And Protection Types VPD page
Bit
Byte
0

PERIPHERAL QUALIFIER

1
2
3

(000b)

PERIPHERAL DEVICE TYPE


PAGE CODE

(MSB)

(00h)

(B4h)

PAGE LENGTH

(n-3)

(LSB)

Logical block length and protection types descriptor list


4

11

Logical block length and protection types


descriptor [first]

n-7

Logical block length and protection types


descriptor [last]

The PERIPHERAL QUALIFIER field and PERIPHERAL DEVICE TYPE field are as defined in SPC-4 and shall be set as
defined in table 226.

308

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The PAGE CODE field is defined in SPC-5, and shall be set to the value shown in table 226 for the Supported
Logical Block Lengths and Protection Types VPD page.
The PAGE LENGTH field is defined in SPC-5.
The logical block length and protection types descriptor list shall contain one logical block length and
protection types descriptor for each logical block length that the device server supports.
Each logical block length and protection types descriptor describes the protection types supported for the
logical block length specified (see table 227).
Table 227 Logical block length and protection types descriptor format
Bit
Byte

(MSB)

LOGICAL BLOCK LENGTH

(LSB)

3
4
5
6
7

Reserved

P_I_I_SUP

Reserved

Reserved

T3PS

GRD_CHK

APP_CHK

REF_CHK

T2PS

T1PS

T0PS

Reserved

The LOGICAL BLOCK LENGTH field indicates the logical block length in bytes that is supported by the device
server for which the device server supports the protection types identified in the P_I_I_SUP bit, T3PS bit, T2PS
bit, T1PS bit, T0PS bit, GRD_CHK bit, APP_CHK bit, and REF_CHK bit.
A protection information interval supported (P_I_I_SUP) bit set to one indicates that the logical unit supports
protection information intervals for the specified logical block length. A P_I_I_SUP bit set to zero indicates that
the logical unit does not support protection information intervals for the specified logical block length.
A guard check (GRD_CHK) bit set to zero indicates that the device server does not check the logical block
guard field in the protection information, if any for the specified logical block length. A GRD_CHK bit set to one
indicates that the device server checks the logical block guard field in the protection information, if any, for the
specified logical block length.
An application tag check (APP_CHK) bit set to zero indicates that the device server does not check the logical
block application tag field in the protection information, if any, for the specified logical block length. An
APP_CHK bit set to one indicates that the device server checks the logical block application tag field in the
protection information, if any, for the specified logical block length.
A reference tag check (REF_CHK) bit set to zero indicates that the device server does not check the logical
block reference tag field in the protection information, if any, for the specified logical block length. A REF_CHK
bit set to one indicates that the device server checks the logical block reference tag field in the protection
information, if any, for the specified logical block length.
A type 3 protection supported (T3PS) bit set to one indicates that type 3 protection is supported for the
indicated logical block length. A T3PS bit set to zero indicates that type 3 protection is not supported for the
indicated logical block length.
A type 2 protection supported (T2PS) bit set to one indicates that type 2 protection is supported for the
indicated logical block length. A T2PS bit set to zero indicates that type 2 protection is not supported for the
indicated logical block length.
A type 1 protection supported (T1PS) bit set to one indicates that type 1 protection is supported for the
indicated logical block length. A T1PS bit set to zero indicates that type 1 protection is not supported for the
indicated logical block length.

Working Draft SCSI Block Commands 4 (SBC-4)

309

T10/BSR INCITS 506 Revision 3

27 August 2014

A type 0 protection supported (T0PS) bit set to one indicates that type 0 protection is supported for the
indicated logical block length. A T0PS bit set to zero indicates that type 0 protection is not supported for the
indicated logical block length.

6.7 Copy manager parameters


The copy manager parameters are device type specific data for ROD tokens (see SPC-4) created by a copy
manager for a direct access block device (see 4.30) and are defined in table 228.

Table 228 ROD token device type specific data


Bit
Byte
0

(LSB)

P_I_EXPONENT

31

LOGICAL BLOCK LENGTH IN BYTES

Reserved

(MSB)

LBPME

LBPRZ

(MSB)

P_TYPE

PROT_EN

LOGICAL BLOCKS PER PHYSICAL BLOCK


EXPONENT
LOWEST ALIGNED LOGICAL BLOCK ADDRESS

(LSB)

Reserved

The LOGICAL BLOCK LENGTH IN BYTES field, the P_TYPE field, the PROT_EN bit, the P_I_EXPONENT field, the
LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field, the LBPME bit, the LBPRZ bit, and the LOWEST ALIGNED
LOGICAL BLOCK ADDRESS field are defined in 5.16.2.

310

Working Draft SCSI Block Commands 4 (SBC-4)

T10/BSR INCITS 506 Revision 3

27 August 2014

Annex A
(informative)

Numeric order codes


A.1 Variable length CDBs
Commands that use operation code 7Fh in table 33 use the variable length command format defined in
SPC-4 and are differentiated by service action codes as described in table A.1.

Table A.1 Variable length command service action code assignments


Operation code/service
action code

310

Description

7Fh/0000h

Reserved

7Fh/0001h

Reserved

7Fh/0002h

Reserved

7Fh/0003h

Obsolete

7Fh/0004h

Obsolete

7Fh/0005h

Reserved

7Fh/0006h

XPWRITE (32)

7Fh/0007h

XDWRITEREAD (32)

7Fh/0008h

Reserved

7Fh/0009h

READ (32)

7Fh/000Ah

VERIFY (32)

7Fh/000Bh

WRITE (32)

7Fh/000Ch

WRITE AND VERIFY (32)

7Fh/000Dh

WRITE SAME (32)

7Fh/000Eh

ORWRITE (32)

7Fh/000Fh

WRITE ATOMIC(32)

7Fh/0010h to 07FFh

Reserved

7Fh/0800h to FFFFh

See SPC-4

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

A.2 Service action CDBs


Commands that use operation code 9Eh (i.e., SERVICE ACTION IN (16)) (see SPC-4) in table 33 are
differentiated by service action codes as described in table A.2.

Table A.2 SERVICE ACTION IN (16) service actions


Operation code/service
action code

9Eh/00h to 0Fh

Description

Reserved for commands applicable to all device types (see SPC-4)

9Eh/10h

READ CAPACITY (16)

9Eh/11h

READ LONG (16)

9Eh/12h

GET LBA STATUS

9Eh/13h

REPORT REFERRALS

9Eh/14h to 1Fh

Reserved

Commands that use operation code 9Fh (i.e., SERVICE ACTION OUT (16)) (see SPC-4) in table 33 are
differentiated by service action codes as described in table A.3.

Table A.3 SERVICE ACTION OUT (16) service actions


Operation code/service
action code

9Fh/00h to 0Fh

Description

Reserved for commands applicable to all device types (see SPC-4)

9Fh/10h

Reserved

9Fh/11h

WRITE LONG (16)

9Fh/12h to 1Fh

Reserved

Working Draft SCSI Block Commands 4 (SBC-4)

311

T10/BSR INCITS 506 Revision 3

27 August 2014

Annex B
(informative)

XOR command examples


B.1 XOR command examples overview
This annex provides XOR command examples in SCSI storage array device (see SCC-2) supervised
configurations.

B.2 Update write operation


Figure B.1 shows an update write operation (see 4.19.2.2) operation supervised by a SCSI storage array
device (see SCC-2). The example uses a supervising SCSI storage array device, a direct access block device
holding XOR-protected data (i.e., the data disk), and a direct access block device holding check data (i.e., the
parity disk) that use the following SCSI commands:
a) an XDWRITE command (see SBC-2);
b) an XDREAD command (see SBC-2); and
c) an XPWRITE command.
An XDWRITEREAD command may be used in place of any sequence of an XDWRITE command followed by
an XDREAD command.
The supervising SCSI storage array device begins by sending XOR-protected data to the data disk using an
XDWRITE command.
The data disk reads old XOR-protected data, performs an XOR operation using the old XOR-protected data
and the XOR-protected data from the supervising SCSI storage array device, stores the resulting intermediate
XOR data in its buffer memory, and writes the XOR-protected data from the supervising SCSI storage array
device. The supervising SCSI storage array device reads the resulting intermediate XOR data from the buffer
memory by sending the data disk an XDREAD command.
The supervising SCSI storage array device makes the resulting intermediate XOR data (i.e., data read with
the XDREAD command) available to the parity disk by sending an XPWRITE command. The parity disk
performs an XOR operation using the intermediate XOR data and the old XOR data read from the parity disk.
The resulting new XOR data is written.

312

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Direct access block device


containing XOR-protected data
(i.e., data disk)

Supervising array
controller

1.2. New XORprotected data


1. XDWRITE command
Data-out contains
new XOR-protected data

XOR

1.1 Old XORprotected data

Medium

Port 1

XORprotected data

2. XDREAD command
Data-in contains
intermediate XOR data

Intermediate
XOR data buffer

Direct access block device


containing check data (i.e.,
parity disk)

Port 2

Intermediate
XOR data

3. XPWRITE command
Data-out contains
intermediate XOR data

XOR

3.1. Old
check data

Medium

3.2. New check data

Figure B.1 Update write operation (SCSI storage array device supervised)

B.3 Regenerate operation


Figure B.2 shows a regenerate operation (see 4.19.2.3) supervised by a SCSI storage array device (see
SCC-2). The example uses a supervising SCSI storage array device and three direct access block devices
(i.e., disk 1, disk 2, and disk 3) that use the following SCSI commands:
a) a READ command;
b) an XDWRITE command (see SBC-2); and
c) an XDREAD command (see SBC-2).
An XDWRITEREAD command may be used in place of any sequence of an XDWRITE command followed by
an XDREAD command.
The supervising SCSI storage array device begins by issuing a READ command to disk 1. The data received
from this command is sent by the supervising SCSI storage array device to disk 2 using an XDWRITE
command with the DISABLE WRITE bit set to one. Disk 2 reads data, performs an XOR operation using that data
and the data received from the supervising SCSI storage array device, and stores the resulting intermediate
XOR data in its buffer memory. The supervising SCSI storage array device retrieves the intermediate XOR
data from the buffer memory by issuing an XDREAD command to disk 2. The supervising SCSI storage array
device issues an XDWRITE command and an XDREAD command in the same manner to disk 3.
The resulting data from disk 3 is the regenerated data.

Working Draft SCSI Block Commands 4 (SBC-4)

313

T10/BSR INCITS 506 Revision 3

27 August 2014

Direct access block


device (i.e., disk 1)
Port 1

Supervising array
controller

Data

Medium

1. READ command
Data-in contains
data

Port 2

Direct access block


device (i.e., disk 2)
2. XDWRITE command or
XDWRITEREAD command
Data-out contains
data

3. XDREAD command or
XDWRITEREAD command part 2
Data-in contains
intermediate XOR data

Medium
XOR

2.1 data

Intermediate
XOR data buffer

Direct access block


device (i.e., disk 3)
4. XDWRITE command or
XDWRITEREAD command
Data-out contains
intermediate XOR data

Medium
XOR

4.1 data

Port 3

Intermediate
XOR data

Regenerated
data

5. XDREAD command or
XDWRITEREAD command part 2
Data-in contains
intermediate XOR data

Intermediate
XOR data buffer

Figure B.2 Regenerate operation (SCSI storage array device supervised)

B.4 Rebuild operation


Figure B.3 shows a rebuild operation (see 4.19.2.4) supervised by a SCSI storage array device (see SCC-2).
The example uses a supervising SCSI storage array device, two direct access block devices (i.e., disk 1 and
disk 2) as the source devices, and one direct access block device (i.e., disk 3) as the rebuild device that use
the following SCSI commands:
a)
b)
c)
d)

314

a READ command;
an XDWRITE command (see SBC-2);
an XDREAD command (see SBC-2); and
a WRITE command.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

An XDWRITEREAD command may be used in place of any sequence of an XDWRITE command followed by
an XDREAD command.
The supervising SCSI storage array device begins by issuing a READ command to disk 1. The data received
from the READ command is sent by the supervising SCSI storage array device to disk 2 using an XDWRITE
command with a DISABLE WRITE bit set to one. Disk 2 reads data, performs an XOR operation using that data
and the data received from the supervising SCSI storage array device, and stores the resulting intermediate
XOR data in its buffer memory. The supervising SCSI storage array device retrieves the intermediate XOR
data by sending an XDREAD command to disk 2.
The resulting data from disk 2 is the rebuilt data and is sent to the direct access block device being rebuilt (i.e.,
disk 3) using a WRITE command.

Direct access block


device (i.e., disk 1)
Port 1

Supervising array
controller

Data

1. READ command
Data-in contains
data

Medium
Data

Port 2

Direct access block


device (i.e., disk 2)
2. XDWRITE command or
XDWRITEREAD command
Data-out contains
data

Intermediate
XOR data

Port 3

3. XDREAD command or
XDWRITEREAD command part 2
Data-in contains
intermediate XOR data

Medium
XOR

2.1 data

Intermediate
XOR data buffer

Direct access block


device (i.e., disk 3)
4. WRITE command
Data-out contains
intermediate XOR data

Medium
Rebuilt data

Figure B.3 Rebuild operation (SCSI storage array device supervised)

Working Draft SCSI Block Commands 4 (SBC-4)

315

T10/BSR INCITS 506 Revision 3

27 August 2014

Annex C
(informative)

CRC example in C
The following is an example C program that generates the value for the LOGICAL BLOCK GUARD field in
protection information (see 4.22).
// picrc.cpp : SCSI SBC-3 Protection Information CRC generator
#include stdafx.h
#include <stdio.h>
#include <malloc.h>
/* return crc value */
unsigned short calculate_crc(unsigned char *frame, unsigned long length) {
unsigned short const poly = 0x8BB7L; /* Polynomial */
unsigned const int poly_length = 16;
unsigned short crc_gen;
unsigned short x;
unsigned int i, j, fb;
unsigned const int invert = 0;/* 1=seed with 1s and invert the CRC */
crc_gen = 0x0000;
crc_gen ^= invert? 0xFFFF: 0x0000;

/* seed generator */

for (i = 0; i < length; i += 2) {


/* assume little endian */
x = (frame[i] << 8) | frame[i+1];
/* serial shift register implementation */
for (j = 0; j < poly_length; j++) {
fb = ((x & 0x8000L) == 0x8000L) ^ ((crc_gen & 0x8000L) ==
0x8000L);
x <<= 1;
crc_gen <<= 1;
if (fb)
crc_gen ^= poly;
}
}
return crc_gen ^ (invert? 0xFFFF: 0x0000); /* invert output */
} /* calculate_crc */
/* function prototype */
unsigned short calculate_crc(unsigned char *, unsigned long);
void main (void) {
unsigned char *buffer;
unsigned long buffer_size = 32;
unsigned short crc;
unsigned int i;
/* 32 0x00 */
buffer = (unsigned char *) malloc (buffer_size);
for (i = 0; i < buffer_size; i++) {
buffer[i] = 0x00;

316

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

}
crc = calculate_crc(buffer, buffer_size);
printf (Example CRC all-zeros is %04x\n, crc);
free (buffer);
/* 32 0xFF */
buffer = (unsigned char *) malloc (buffer_size);
for (i = 0; i < buffer_size; i++) {
buffer[i] = 0xFF;
}
crc = calculate_crc(buffer, buffer_size);
printf (Example CRC all-ones is %04x\n, crc);
free (buffer);
/* 0x00 incrementing to 0x1F */
buffer = (unsigned char *) malloc (buffer_size);
for (i = 0; i < buffer_size; i++) {
buffer[i] = i;
}
crc = calculate_crc(buffer, buffer_size);
printf (Example CRC incrementing is %04x\n, crc);
free (buffer);
/* 0xFF 0xFF then 30 zeros */
buffer = (unsigned char *) malloc (buffer_size);
buffer[0] = 0xff;
buffer[1] = 0xff;
for (i = 2; i < buffer_size; i++) {
buffer[i] = 0x00;
}
crc = calculate_crc(buffer, buffer_size);
printf (Example CRC FF FF then 30 zeros is %04x\n, crc);
free (buffer);
/* 0xFF decrementing to 0xE0 */
buffer = (unsigned char *) malloc (buffer_size);
for (i = 0; i < buffer_size; i++) {
buffer[i] = 0xff - i;
}
crc = calculate_crc(buffer, buffer_size);
printf (Example CRC FF decrementing to E0 is %04x\n, crc);
free (buffer);
} /* main */

Working Draft SCSI Block Commands 4 (SBC-4)

317

T10/BSR INCITS 506 Revision 3

27 August 2014

Annex D
(informative)

Sense information for locked or encrypted logical units


A device sever may complete some commands with CHECK CONDITION status under certain conditions
while the logical unit is locked or encrypted. Table D.1 describes the conditions relative to the sense key and
the additional sense code returned by the device server with the CHECK CONDITION status.

Table D.1 Sense information for locked or encrypted logical units


Sense key

Additional sense code

Description

DATA
PROTECT

ACCESS DENIED
NO ACCESS RIGHTS

The logical unit is locked. This condition may occur for read
commands or write commands. This condition may occur for
the entire logical unit or for a range of LBAs contained in the
logical unit. To clear this condition, an application client
performs a security protocol specific procedure to unlock
access to the logical unit.

ABORTED
COMMAND

LOGICAL BLOCK
REFERENCE TAG
CHECK FAILED

ABORTED
COMMAND

LOGICAL BLOCK
APPLICATION TAG
CHECK FAILED

ABORTED
COMMAND

LOGICAL BLOCK
GUARD CHECK
FAILED

318

These conditions may occur for a read command. The


additional sense codes may indicate that an encrypting logical
unit has changed the encryption/decryption key, and the LBAs
requested by the command have not yet been rewritten.
Disabling protection information checking in a CDB may allow
the command to complete successfully, but the data returned
for the command may be invalid (i.e., not decrypted). To clear
this condition, an application client writes the LBAs for which
the condition occurred with new data.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Annex E
(informative)

Optimizing block access characteristics


E.1 Optimizing block access overview
This annex describes an example method that application clients may use to achieve optimal performance for
logical block access. This example uses the following information:
a) the LOWEST ALIGNED LOGICAL BLOCK ADDRESS field in the READ CAPACITY (16) parameter data (see
5.16.2);
b) the LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT field in the READ CAPACITY (16) parameter data;
c) the OPTIMAL TRANSFER LENGTH GRANULARITY field in the Block Limits VPD page (see 6.6.4);
d) the OPTIMAL TRANSFER LENGTH field in the Block Limits VPD page; and
e) the MAXIMUM TRANSFER LENGTH field in the Block Limits VPD page.

E.2 Starting logical block offset


The READ CAPACITY (16) command transfers parameter data which includes a value in the LOWEST ALIGNED
LOGICAL BLOCK ADDRESS field. As shown in figure 4, the value in this field indicates the starting alignment of
logical block addresses where optimal performance for logical block access begins.

E.3 Optimal granularity sizes


The READ CAPACITY (16) command transfers parameter data that includes a value in the LOGICAL BLOCKS
PER PHYSICAL BLOCK EXPONENT field. As shown in figure 2 and in figure 4, the value in this field enables the
application client to determine the number of logical blocks per physical block.
The Block Limits VPD page may include values in the OPTIMAL TRANSFER LENGTH GRANULARITY field, the
OPTIMAL TRANSFER LENGTH field, and the MAXIMUM TRANSFER LENGTH field. These values may be used to
determine optimum transfer sizes.
If the OPTIMAL TRANSFER LENGTH GRANULARITY field is valid (i.e., contains a value greater than zero), then the
value in the OPTIMAL TRANSFER LENGTH GRANULARITY field is the optimal granularity size. If:
a) the Block Limits VPD page is not supported; or
b) the Block Limits VPD page is supported and the OPTIMAL TRANSFER LENGTH GRANULARITY field is set to
zero,
then the value 2(logical blocks per physical block exponent) is the optimal granularity size.

E.4 Optimizing transfers


To obtain optimal performance, the application client requests transfers with a starting LBA of the form
calculated by the following formula:
starting LBA = lowest aligned LBA + (optimal transfer length granularity n)
where:
starting LBA
lowest aligned LBA

is the LBA of the first logical block accessed;


is the value in the LOWEST ALIGNED LOGICAL BLOCK ADDRESS field; and

Working Draft SCSI Block Commands 4 (SBC-4)

319

T10/BSR INCITS 506 Revision 3

27 August 2014

is zero or a positive integer.

and using transfer lengths of the form:


transfer length = (optimal granularity size k)
where:
transfer length
optimal granularity size
k

is the number of contiguous logical blocks of data being accessed;


is the value described in E.3; and
is a positive integer.

To obtain optimal performance, the application client requests a transfer length, in logical blocks, that is no
larger than the value in the MAXIMUM TRANSFER LENGTH field, and is:
a) no larger than the optimal transfer length for logical units where the delay in processing transfers
larger than the optimal transfer length is large; or
b) not limited by the value in the OPTIMAL TRANSFER LENGTH field for logical units where the delay in
processing transfers larger than the optimal transfer length is small (i.e., most direct access block
devices exhibit this type of operation).
NOTE 28 - There is no method available to determine if the delay in processing for various transfer lengths is
large or small.

It is more important that the application client meet the logical units starting and ending alignment boundary
conditions than the maximum transfer length conditions. These considerations have larger impacts on write
performance than read performance.

E.5 Examples
In this example, a logical unit reports the following information:
a) the LOWEST ALIGNED LOGICAL BLOCK ADDRESS field set to 0003h in the READ CAPACITY (16)
parameter data (see 5.16.2);
b) the OPTIMAL TRANSFER LENGTH GRANULARITY field set to 0008h in the Block Limits VPD page (see
6.6.4);
c) the MAXIMUM TRANSFER LENGTH field set to 0000_0000h in the Block Limits VPD page; and
d) the OPTIMAL TRANSFER LENGTH field set to 0000_0080h (i.e., 128) in the Block Limits VPD page.
The starting LBA for optimal transfers on this logical unit should be of the form ((8 n) + 3) where n is any
integer greater than or equal to zero (e.g., starting LBAs of 3, 11, 19, 27, and 35). The transfer length for
optimal transfers should be a multiple of eight logical blocks (e.g., transfer lengths of 8 blocks, 32 blocks, or
128 blocks).
A write command with the LOGICAL BLOCK ADDRESS field set to 19 and the TRANSFER LENGTH field set to 32
should exhibit improved performance over a write command with the LOGICAL BLOCK ADDRESS field set to 18
and the TRANSFER LENGTH field set to 32.
If the device has a delay in processing transfers larger than the optimal transfer length, some operations may
exhibit improved performance if a single large request is broken info multiple smaller requests (e.g., rather
than performing a single read of 248 logical blocks, the transfer may be optimized by setting the transfer
length of one read command to 128 logical blocks and setting the transfer length of a second read command
to 120 logical blocks).

320

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

Annex F
(informative)

Logical block provisioning reporting examples


F.1 Logical block provisioning reporting examples overview
Logical block provisioning reporting may be implemented using different methods. Implementations may
include one or more of the following:
a) use of dedicated LBA mapping resources (e.g., resources are associated with a specific logical unit);
b) use of shared LBA mapping resources (e.g., resources are shared by multiple logical units);
c) reporting based on dedicated LBA mapping resources (e.g., resources are reported specific to the
logical unit);
d) reporting based on shared LBA mapping resources (e.g., resources are reported for the resource pool
as a whole);
e) LBA mapping resource tracking based on logical blocks; and
f) LBA mapping resource tracking based on threshold sets.
This annex describes examples of logical block provisioning reporting. Each example follows logical block
provisioning resource usage and reporting over time as a specified set of operations occur.

F.2 Interpreting log parameter counts


Due to the variation of the threshold set size implementations, logical block usage and resource reporting may
not have a direct relationship. The second example (see F.4) demonstrates an implementation where logical
blocks are allocated on an individual LBA basis and reported using a larger threshold set basis. The reporting
is a direct calculation from a logical block based count to a threshold set based count.
In implementations where a threshold set contains a set of contiguous logical blocks, the reporting may be
substantially different. LUN 1 in the first example (see F.3) demonstrates such an implementation. At the initial
conditions, two threshold sets are reported as being used. With a threshold set size of 1 024 blocks, these two
threshold sets may contain as little as one logical block of application client data in each threshold set, or as
many as 1 024 contiguous logical blocks in each threshold set. Which LBAs have been written by the
application client has a substantial impact on how the usage of those resources is reported.
The relationship of the physical blocks to the logical blocks (see figure 4 and figure 5) may have an impact on
the logical block provisioning log parameters. Which LBAs are written by the application may impact the
number of physical blocks required to be allocated and therefore impact the reporting of the LBA mapping
resource parameters.
The device server may not prioritize the maintenance of the values in the Logical Block Provisioning log page
(see 6.4.4) above the completion of other operations (e.g., read operations or write operations). This may
result in delays in updates to these values (e.g., after a request to unmap a large number of logical blocks).
The logical block provisioning log parameters may also appear inaccurate for logical units where unmap
operations cause LBA mapping resources to be released using a periodic background function.
As a result, application clients using logical block provisioning thresholds and examining logical block
provisioning log parameters should not expect application client determined usage values or application client
determined available space values to match log parameters or threshold events as reported by the logical
unit.

Working Draft SCSI Block Commands 4 (SBC-4)

321

T10/BSR INCITS 506 Revision 3

27 August 2014

F.3 Dedicated resource, threshold set tracked example


F.3.1 Dedicated resource, threshold set tracked example overview

This example describes a method that reports dedicated logical block provisioning resources based on
threshold sets. In this example, the values reported by the logical unit in the Logical Block Provisioning log
page (see 6.4.4) reflect the usage for each logical unit and the available resources dedicated to each logical
unit. Each threshold set is allocated to contain a set of contiguous logical blocks (e.g., LBAs 1024 to 2047 are
contained in the same threshold set).
F.3.2 Dedicated resource, threshold set tracked example configuration

The configuration used for this example consists of two thin provisioned logical units, each with dedicated
logical block provisioning resources. Table F.1 shows logical block provisioning related capacity values used
in this example.

Table F.1 Dedicated resource, threshold set tracked example capacity information
Capacity
LUN

LBA

Logical
blocks b

THRESHOLD EXPONENT

field c

Number of threshold sets d

3FFF_FFFFh

1 Gi

0Ah (i.e., 512 KiB, 1 024 logical blocks)

0010_0000h (i.e., 1 Mi)

BFFF_FFFFh

3 Gi

0Ch (i.e., 2 MiB, 4 096 logical blocks)

000C_0000h (i.e., 768 Ki)

a RETURNED LOGICAL BLOCK ADDRESS field in READ CAPACITY parameter data


b The value returned in the RETURNED LOGICAL BLOCK ADDRESS field plus one.
c In the Logical Block Provisioning VPD page (see 6.6.5).
d Number of threshold sets = capacity 2(threshold exponent).

(see 5.15.2 and 5.16.2).

Table F.2 shows LUN 1 with four enabled threshold descriptors and LUN 2 with two enabled threshold
descriptors. The threshold descriptors in the Logical Block Provisioning mode page (see 6.5.7) for LUN 1 are
configured to report a logical block provisioning threshold crossing (see 4.7.3.7) when:
a)
b)
c)
d)

322

the percentage of available LBA mapping resources reaches 30% of reported capacity;
the percentage of available LBA mapping resources reaches 20% of reported capacity;
the percentage of available LBA mapping resources reaches 10% of reported capacity; or
the percentage of used LBA mapping resources reaches 75% of reported capacity.

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

The threshold descriptors in the Logical Block Provisioning mode page for LUN 2 are configured to report a
logical block provisioning threshold crossing when:
a) the percentage of available LBA mapping resources reaches 50% of reported capacity; or
b) the percentage of available LBA mapping resources reaches 10% of reported capacity.

Table F.2 Dedicated resource, threshold set tracked example capacity information
LUN

Threshold
resource a

Threshold
count b

0001h

0004_CCCCh

An available LBA mapping resource threshold set to 30% of the


reported capacity (i.e., number of threshold sets from table F.1
0.30 = 0004_CCCCh threshold sets)

0001h

0003_3333h

An available LBA mapping resource threshold set to 20% of the


reported capacity

0001h

0001_9999h

An available LBA mapping resource threshold set to 10% of


the reported capacity

0002h

000C_0000h

A used LBA mapping resource threshold set to 75% of the reported


capacity (i.e., number of threshold sets from table F.1 (i.e.,
0010_0000h) 0.75 = 000C_0000h threshold sets)

0001h

0006_0000h

An available LBA mapping resource threshold set to 50% of the


reported capacity (i.e., number of threshold sets from table F.1 (i.e.,
000C_0000h) 0.50 = 0006_0000h threshold sets)

0001h

0001_3333h

An available LBA mapping resource threshold set to 10% of the


reported capacity

Description

THRESHOLD RESOURCE field in the Logical Block Provisioning mode page (see
PARAMETER CODE field in Logical Block Provisioning log page (see 6.4.4.2).
b
THRESHOLD COUNT field in the Logical Block Provisioning mode page.

6.5.7.2) and the

F.3.3 Dedicated resource, threshold set tracked example sequence

The sequence of events for this example are:


1) initial conditions (see F.3.4);
2) operations that occur (see F.3.5); and
3) final values in the logical block provisioning log page (see F.3.6).

Working Draft SCSI Block Commands 4 (SBC-4)

323

T10/BSR INCITS 506 Revision 3

27 August 2014

F.3.4 Dedicated resource, threshold set tracked example initial conditions

Initially, LUN 1 has two threshold sets used and has 69 108 736 logical blocks available (i.e. 0001_07A1h
threshold sets). The application client has written at least one logical block into each of the two logical block
ranges that correspond to those two threshold sets, therefore the application client may have written from two
logical blocks to 2048 logical blocks. LUN 2 has 1 073 741 824 logical blocks available (i.e., 0004_0000h
threshold sets). LUN 2 does not report a used LBA mapping resource parameter. Table F.3 shows the values
in the Logical Block Provisioning log page for the initial conditions in this example.

Table F.3 Dedicated resource, threshold set tracked example initial conditions
LUN

Log page
parameter a

0001h

Resource
count b

0001_07A1h

Scope c

01b

The available LBA mapping resource parameter


indicates that 69 108 736 logical blocks (i.e., 1_07A1h
threshold sets 1 024 logical blocks per threshold set)
are available for LUN 1.

01b

The used LBA mapping resource parameter indicates


that 2 048 logical blocks (i.e., 2h threshold sets 1 024
logical blocks per threshold set) have been used (i.e.,
allocated) by LUN 1.

01b

The available LBA mapping resource parameter


indicates that 1 073 741 824 logical blocks (i.e.,
4_0000h threshold sets 4 096 logical blocks per
threshold set) are available for LUN 2.

1
0002h

0001h

0000_0002h

0004_0000h

Description d

THRESHOLD RESOURCE field in the Logical Block Provisioning mode page (see
PARAMETER CODE field in Logical Block Provisioning log page (see 6.4.4.2).
b
RESOURCE COUNT field in the Logical Block Provisioning mode page.
c
SCOPE field in the Logical Block Provisioning log page.
d
(threshold exponent)

LBA count = capacity 2

6.5.7.2) and the

F.3.5 Operations that occur

Write operations occur to LUN 1 that require one additional threshold set to be allocated when the application
client writes 50 additional contiguous logical blocks. Used LBA mapping resources on LUN 1 are now 3 072
logical blocks (i.e., three threshold sets), and available LBA mapping resources are 69 107 712 logical blocks.
Write operations also occur to LUN 2 that require no additional threshold sets when the application client
writes an additional 100 logical blocks into a threshold set that was already allocated.

324

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

F.3.6 Dedicated resource, threshold set tracked example final log page values

Table F.4 shows the values in the Logical Block Provisioning log page after the operations described in F.3.5
have occurred.

Table F.4 Dedicated resource, threshold set tracked example final log page values
LUN

Log page
parameter a

0001h

Resource
count b

0001_07A0h

Scope c

01b

The available LBA mapping resource parameter


indicates that 69 107 712 logical blocks (i.e., 1_07A0h
threshold sets 1 024 logical blocks per threshold set)
are available for LUN 1.

01b

The used LBA mapping resource parameter indicates


that 3 072 logical blocks (i.e., 3h threshold sets 1 024
logical blocks per threshold set) have been used (i.e.,
allocated) by LUN 1.

01b

The available LBA mapping resource parameter


indicates that 1 073 741 824 (i.e., 4_0000h threshold
sets 4 096 logical blocks per threshold set) are
available for LUN 2.

1
0002h

0001h

0000_0003h

0004_0000h

Description d

THRESHOLD RESOURCE field in the Logical Block Provisioning mode page (see
PARAMETER CODE field in Logical Block Provisioning log page (see 6.4.4.2).
b
RESOURCE COUNT field in the Logical Block Provisioning mode page.
c
SCOPE field in the Logical Block Provisioning log page.
d
(threshold exponent)

LBA count = capacity 2

6.5.7.2) and the

F.4 Shared resource, logical block tracked example


F.4.1 Shared resource, logical block tracked example overview

This example describes a method that tracks shared logical block provisioning resources based on logical
blocks. The logical block provisioning resources are shared by multiple logical units. In this example, the
values reported by each logical unit in its Logical Block Provisioning log page (see 6.4.4) reflect the combined
usage of all logical units that share the logical block provisioning resources and the resources available for
use by any of the logical units that share the logical block provisioning resources. Resources are allocated
one logical block at a time but reported with a larger threshold set size.

Working Draft SCSI Block Commands 4 (SBC-4)

325

T10/BSR INCITS 506 Revision 3

27 August 2014

F.4.2 Shared resource, logical block tracked example configuration

The configuration used for this example consists of two thin provisioned logical units, where the logical block
provisioning resources are shared between both logical units. Table F.5 shows logical block provisioning
related capacity values used in this example.

Table F.5 Shared resource, logical block tracked example capacity information
Capacity
LUN

LBA

Logical
blocks b

THRESHOLD EXPONENT

field c

Number of threshold sets d

3FFF_FFFFh

1 Gi

0Bh (i.e., 1 MiB, 2 048 logical blocks)

0008_0000h (i.e., 512 Ki)

BFFF_FFFFh

3 Gi

0Bh (i.e., 1 MiB, 2 048 logical blocks)

0018_0000h (i.e., 1 536 Ki)

a
RETURNED LOGICAL BLOCK ADDRESS field in READ CAPACITY
b
The value returned in the RETURNED LOGICAL BLOCK ADDRESS
c
In the Logical Block Provisioning VPD page (see 6.6.5).
d
(threshold exponent)

Number of threshold sets = capacity 2

parameter data (see 5.15.2 and 5.16.2).


field plus one.

F.4.3 Shared resource, logical block tracked example time line

The sequence of events for this example are:


1) initial conditions (see F.4.4);
2) operations that occur (see F.4.5); and
3) final values in the logical block provisioning log page (see F.4.6).

326

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

F.4.4 Shared resource, logical block tracked example initial conditions

Initially, LUN 1 and LUN 2 have used a combined total of 57 000 logical blocks. LUN1 and LUN 2 have
1 073 741 900 logical blocks available for use by either LUN 1 or LUN 2. Table F.6 shows the values in the
Logical Block Provisioning log page for the initial conditions in this example.

Table F.6 Shared resource, logical block tracked example initial conditions
LUN

Log page
parameter a

0001h

Resource
count b

0008_0000h

Scope c

10b

The available LBA mapping resource parameter


indicates that from 1 073 741 824 logical blocks (i.e.
8_0000h threshold sets 2 048 logical block per
threshold set) to 1 073 743 871 logical blocks are
available for LUN 1 or LUN 2. d

10b

The used LBA mapping resource parameter indicates


that from 55 297 logical blocks to 57 344 logical blocks
(i.e., 1Ch threshold sets 2 048 logical blocks per
threshold set) have been used (i.e., allocated) by
LUN 1 and LUN 2. e

10b

The available LBA mapping resource parameter


indicates that 1 073 741 824 logical blocks (i.e.,
8_0000h threshold sets 2 048 logical blocks per
threshold set) are available for LUN 1 or LUN 2. d

1
0002h

2
a
b
c
d
e

0001h

0000_001Ch

0008_0000h

Description

THRESHOLD RESOURCE field in the Logical Block Provisioning mode page (see
PARAMETER CODE field in Logical Block Provisioning log page (see 6.4.4.2).
RESOURCE COUNT field in the Logical Block Provisioning mode page.
SCOPE field in the Logical Block Provisioning log page.
Minimum available LBA count = resource count 2(threshold exponent).
(threshold exponent)

Maximum used LBA count = resource count 2

6.5.7.2) and the

F.4.5 Operations that occur

Write operations occur to LUN 1 that require 2 000 additional logical blocks to be used and write operations
occur to LUN 2 that require 3 000 additional logical blocks to be used. Used LBA mapping resources on LUN
1 and LUN 2 are now 62 000 logical blocks, and the combined LBA mapping resources available to both LUN
1 and LUN 2 are 1 073 736 900 logical blocks (i.e., 1 073 741 900 minus 5 000).

Working Draft SCSI Block Commands 4 (SBC-4)

327

T10/BSR INCITS 506 Revision 3

27 August 2014

F.4.6 Shared resource, logical block tracked example final log page values

Table F.7 shows the values in the Logical Block Provisioning log page after the operations described in F.4.5
have occurred.

Table F.7 Shared resource, logical block tracked example final log page values
LUN

Log page
parameter a

0001h

Resource
count b

0007_FFFDh

Scope c

10b

The available LBA mapping resource parameter


indicates that from 1 073 735 680 logical blocks (i.e.
7_FFFDh threshold sets 2 048 logical blocks per
threshold set) to 1 073 737 727 logical blocks are
available for LUN 1 or LUN 2. d

10b

The used LBA mapping resource parameter indicates


that from 61 441 logical blocks to 63 488 logical blocks
(i.e., 1Fh threshold sets 2 048 logical blocks per
threshold set) have been used (i.e., allocated) by LUN
1 and LUN 2. e

10b

The available LBA mapping resource parameter


indicates that from 1 073 735 680 logical blocks (i.e.
7_FFFDh threshold sets 2 048 logical blocks per
threshold set) to 1 073 737 727 logical blocks are
available for LUN 1 or LUN 2. d

1
0002h

a
b
c
d
e

328

0001h

0000_001Fh

0007_FFFDh

Description

THRESHOLD RESOURCE field in the Logical Block Provisioning mode page (see
PARAMETER CODE field in Logical Block Provisioning log page (see 6.4.4.2).
RESOURCE COUNT field in the Logical Block Provisioning mode page.
SCOPE field in the Logical Block Provisioning log page.
Minimum available LBA count = resource count 2(threshold exponent).
(threshold exponent)

Maximum used LBA count = resource count 2

6.5.7.2) and the

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

F.5 Shared available, dedicated used, logical block tracked example


F.5.1 Shared available, dedicated used, logical block tracked example overview

This example describes a method that tracks available shared logical block provisioning resources based on
logical blocks and dedicated used logical block provisioning resources based on logical blocks. The available
logical block provisioning resources are shared by multiple logical units. In this example, the values reported
by the logical unit in the available LBA mapping resource parameter of the Logical Block Provisioning log page
(see 6.4.4) reflect the resources available for use by any of the logical units that share the logical block
provisioning resources. The values reported by the logical unit in the used LBA mapping resource parameter
of the Logical Block Provisioning log page reflect the usage for the individual logical unit.
F.5.2 Shared available, dedicated used, logical block tracked example configuration

The configuration used for this example consists of two thin provisioned logical units, where the available
logical block provisioning resources are shared between both logical units and used logical block provisioning
resources are reported independently for each logical unit. Table F.8 shows logical block provisioning related
capacity values used in this example.

Table F.8 Shared available, dedicated used example capacity information


Capacity
LUN

LBA

Logical
blocks b

THRESHOLD EXPONENT

field c

Number of threshold sets d

3FFF_FFFFh

1 Gi

0Bh (i.e., 1 MiB, 2 048 logical blocks)

0008_0000h (i.e., 512 Ki)

BFFF_FFFFh

3 Gi

0Bh (i.e., 1 MiB, 2 048 logical blocks)

0018_0000h (i.e., 1 536 Ki)

a RETURNED LOGICAL BLOCK ADDRESS field in READ CAPACITY parameter data


b The value returned in the RETURNED LOGICAL BLOCK ADDRESS field plus one.
c In the Logical Block Provisioning VPD page (see 6.6.5).
d Number of threshold sets = capacity 2(threshold exponent).

(see 5.15.2 and 5.16.2).

F.5.3 Shared available, dedicated used, logical block tracked example time line

The sequence of events for this example are:


1) initial conditions (see F.5.4);
2) operations that occur (see F.5.5); and
3) final values in the logical block provisioning log page (see F.5.6).

Working Draft SCSI Block Commands 4 (SBC-4)

329

T10/BSR INCITS 506 Revision 3

27 August 2014

F.5.4 Shared available, dedicated used, logical block tracked example initial conditions

Initially, LUN 1 has used 57 000 logical blocks and, LUN 2 has used 103 000 logical blocks. LUN 1 and LUN 2
have 1 073 741 900 logical blocks available for use by either LUN 1 or LUN 2. Table F.9 shows the values in
the Logical Block Provisioning log page for the initial conditions in this example.

Table F.9 Shared resource, logical block tracked example initial conditions
LUN

Log page
parameter a

0001h

Resource
count b

0008_0000h

Scope c

10b

The available LBA mapping resource parameter


indicates that from 1 073 741 824 logical blocks (i.e.
8_0000h threshold sets 2 048 logical blocks per
threshold set) to 1 073 743 871 logical blocks are
available for LUN 1 or LUN 2. d

01b

The used LBA mapping resource parameter indicates


that from 55 297 logical blocks to 57 344 logical blocks
(i.e., 1Ch threshold sets 2 048 logical blocks per
threshold set) have been used (i.e., allocated) by
LUN 1. e

10b

The available LBA mapping resource parameter


indicates that from 1 073 741 824 logical blocks (i.e.,
8_0000h threshold sets 2 048 logical blocks per
threshold set) to 1 073 743 871 logical blocks are
available for LUN 1 or LUN 2. d

01b

The used LBA mapping resource parameter indicates


that from 102 401 logical blocks to 104 448 (i.e., 33h
threshold sets 2 048 logical blocks per threshold set)
have been used (i.e., allocated) by LUN 2. e

1
0002h

0001h

0000_001Ch

0008_0000h

2
0002h
a
b
c
d
e

0000_0033h

Description

THRESHOLD RESOURCE field in the Logical Block Provisioning mode page (see
PARAMETER CODE field in Logical Block Provisioning log page (see 6.4.4.2).
RESOURCE COUNT field in the Logical Block Provisioning mode page.
SCOPE field in the Logical Block Provisioning log page.
Minimum available LBA count = resource count 2(threshold exponent).
Maximum used LBA count = resource count 2(threshold exponent).

6.5.7.2) and the

F.5.5 Operations that occur

Write operations occur to LUN 1 that require 2 000 additional logical blocks to be used and write operations
occur to LUN 2 that require 3 000 additional logical blocks to be used. Used LBA mapping resources on LUN
1 are now 59 000 logical blocks, used LBA mapping resources on LUN 2 are now 106 000 logical blocks, and
the combined LBA mapping resources available to both LUN 1 and LUN 2 are 1 073 736 900 logical blocks.

330

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

F.5.6 Shared available, dedicated used, example final log page values

Table F.10 shows the values in the Logical Block Provisioning log page after the operations described in F.5.5
have occurred.

Table F.10 Shared available, dedicated used example final log page values
LUN

Log page
parameter a

0001h

Resource
count b

0007_FFFDh

Scope c

10b

The available LBA mapping resource parameter


indicates that from 1 073 735 680 logical blocks (i.e.
7_FFFDh threshold sets 2 048 logical blocks per
threshold set) to 1 073 737 727 logical blocks are
available for LUN 1 or LUN 2. d

01b

The used LBA mapping resource parameter indicates


that from 57 345 logical blocks to 59 392 logical blocks
(i.e., 1Dh threshold sets 2 048 logical blocks per
threshold set) have been used (i.e., allocated) by
LUN 1. e

10b

The available LBA mapping resource parameter


indicates that from 1 073 735 680 logical blocks (i.e.
7_FFFDh threshold sets 2 048 logical blocks per
threshold set) to 1 073 737 727 logical blocks are
available for LUN 1 or LUN 2. d

01b

The used LBA mapping resource parameter indicates


that from 104 449 logical blocks to 106 496 logical
blocks (i.e., 34h threshold sets 2_048 logical blocks
per threshold set) have been used (i.e., allocated) by
LUN 2. e

1
0002h

0001h

0000_001Dh

0007_FFFDh

2
0002h

a
b
c
d
e

0000_0034h

Description

THRESHOLD RESOURCE field in the Logical Block Provisioning mode page (see
PARAMETER CODE field in Logical Block Provisioning log page (see 6.4.4.2).
RESOURCE COUNT field in the Logical Block Provisioning mode page.
SCOPE field in the Logical Block Provisioning log page.
Minimum available LBA count = resource count 2(threshold exponent).
Maximum used LBA count = resource count 2(threshold exponent).

Working Draft SCSI Block Commands 4 (SBC-4)

6.5.7.2) and the

331

T10/BSR INCITS 506 Revision 3

27 August 2014

Annex G
(informative)

Discovering referrals examples


G.1 Referrals example with no user data segment multiplier
This subclause demonstrates a method an application client may use to determine the optimal target port
group from which to access logical blocks using information sent from the device server when the user data
segment multiplier is set to zero.
Figure G.1 shows an example of a SCSI device in which referrals have been implemented with a user data
segment multiplier of zero.

Target port group (1)


SCSI target port
(1)

LBA: 0 to 1 999
LBA: 2 000 to 2 999
LBA: 3 000 to 5 999

Target port group (2)

SCSI target port


(2)

SCSI target port


(3)

SCSI target port


(4)

User data segment


User data segment
User data segment

Logical unit
SCSI target device
SCSI device
Active/optimized target port asymmetric access (see SPC-4) to user data segment
Active/non-optimized target port asymmetric access (see SPC-4) to user data segment

Figure G.1 Referrals example with no user data segment multiplier

332

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

In the example shown in figure G.1, the application client acquires the information from the logical unit as
shown in table G.1.

Table G.1 Referrals application client information with no user data segment multiplier
Referrals VPD page
User data segment size

User data segment multiplier

ignored

0
REPORT TARGET PORT GROUPS command

Asymmetric access state

Target port
group

Relative target port identifier

4h (i.e., logical block


dependent)

REPORT REFERRALS command or user data segment referral sense data descriptors
First user data segment
LBA

Last user data


segment LBA

1 999

2 000

2 999

3 000

5 999

Asymmetric access state

Target port group

0 (i.e., active/optimized)

1 (i.e., active/non-optimized)

0 (i.e., active/optimized)

1 (i.e., active/non-optimized)

0 (i.e., active/optimized)

1 (i.e., active/non-optimized)

The application may determine the user data segments that are optimally accessed through the two target
port groups as shown in table G.2.

Table G.2 User data segment calculations with no user data segment multiplier
First LBA of user
data segment

Calculation
(see 4.28.2)

Last LBA of user


data segment

Calculation
(see 4.28.2)

Target port group 1 user data segments in active/optimized asymmetric access state
a

3 000

3 000

1 999

1 999

5 999

5 999

Target port group 2 user data segments in active/optimized asymmetric access state

2 000
a
b

2 000

2 999

2 999

The first user data segment LBA


The last user data segment LBA

Working Draft SCSI Block Commands 4 (SBC-4)

333

T10/BSR INCITS 506 Revision 3

27 August 2014

G.2 Referrals example with non-zero user data segment multiplier


This subclause demonstrates a method that an application client may use to determine the optimal target port
group from which to access logical blocks using information sent from the device server when the user data
segment multiplier is set to a non-zero value.
Figure G.2 shows an example of a SCSI device in which referrals have been implemented with a user data
segment multiplier of two and a user data segment size of 1 000.

Target port group (1)


SCSI target port (1)

Target port group (2)


SCSI target port (2)

LBA: 0 to 999
LBA: 2 000User
to 2 999
Data Segment
LBA: 4 000User
to 4 999
Data Segment
User data segment

Target port group (3)

SCSI target port (3)

SCSI target port (4)

LBA: 1 000 to 1 999


LBA: 3 000User
to 3 999
Data Segment
LBA: 5 000User
to 5 999
Data Segment
User data segment

Logical unit
SCSI target device
SCSI device
Active/optimized target port asymmetric access (see SPC-4) to user data segment
Active/non-optimized target port asymmetric access (see SPC-4) to user data segment

Figure G.2 Referrals example with non-zero user data segment multiplier

334

Working Draft SCSI Block Commands 4 (SBC-4)

27 August 2014

T10/BSR INCITS 506 Revision 3

In the example shown in figure G.2, the application client acquires the information from the logical unit as
shown in table G.3.

Table G.3 Referrals application client information with non-zero user data segment multiplier
Referrals VPD page
User data segment size

User data segment multiplier

1 000

2
REPORT TARGET PORT GROUPS command

Asymmetric access state

4h (i.e., logical block


dependent)

Target port
group

Relative target port identifier

1
2

REPORT REFERRALS command or user data segment referral sense data descriptors
First user data segment
LBA

1 000

Last user data


segment LBA

4 999

5 999

Asymmetric access state

Target port group

0 (i.e., active/optimized)

1 (i.e., active/non-optimized)

1 (i.e., active/non-optimized)

0 (i.e., active/optimized)

1 (i.e., active/non-optimized)

1 (i.e., active/non-optimized)

The application may determine the user data segments that are optimally accessed through the two target
port groups as shown in table G.4.

Table G.4 User data segment calculations with non-zero user data segment multiplier
First LBA of user
data segment

Calculation
(see 4.28.2)

Last LBA of user


data segment

Calculation
(see 4.28.2)

Target port group 2 user data segments in active/optimized asymmetric access state

999

+ (1 000 1)

2 000

0 + (1 000 2)

2 999

2 000 + (1 000 1)

4 000

2 000 + (1 000 2)

4 999

4 000 + (1 000 1)

Target port group 3 user data segments in active/optimized asymmetric access state

1 000

1 000

1 999

1 000

+ (1 000 1)

3 000

1 000 + (1 000 2)

3 999

3 000 + (1 000 1)

5 000

3 000 + (1 000 2)

5 999

5 000 + (1 000 1)

The first user data segment LBA.

Working Draft SCSI Block Commands 4 (SBC-4)

335

T10/BSR INCITS 506 Revision 3

27 August 2014

Annex H
(informative)

Bibliography
ISO/IEC 14776-321, SCSI Block Commands (SBC)
ISO/IEC 14776-322, SCSI Block Commands-2 (SBC-2)
ISO/IEC 14776-154, Serial Attached SCSI-3 (SAS-3)
ISO/IEC 14776-223, Fibre Channel Protocol for SCSI-4 (FCP-4)
CFast (CFast), CompactFlash Association (see http://www.compactflash.org)
CompactFlash (CF), CompactFlash Association (see http://www.compactflash.org)
Memory Stick (MS). One Stop Site for Formats (see https://www.oss-formats.org)
MultiMediaCard (eMMC), JEDEC (see http://www.jedec.org)
NOTE 29 JEDEC is a registered trademark of JEDEC Solid State Technology Association. This information
is given for the convenience of users of this standard and does not constitute an endorsement by ISO, IEC, or
ANSI.

Secure Digital Card (SD Card), SD Association (see http://www.sdcard.org)


XQD (XQD), CompactFlash Association (see http://www.compactflash.org)
Universal Flash Storage (UFS), JEDEC (see http://www.jedec.org)

336

Working Draft SCSI Block Commands 4 (SBC-4)

You might also like