NVM Express Zoned Namespace Command Set Specification revision 1.1b

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第1张图片

目录

1 Introduction

1.1 Overview

1.2 Scope

1.3 Conventions

1.4 Definitions

1.4.1 Definitions from the NVMe Base Specification

1.4.2 在分区命名空间命令集中指定的NVMe Base Specification中的术语

1.4.3 Definitions from the NVM Command Set Specification

1.4.4 特定于zoning命名空间命令集的定义

1.5 References

2 Zoned Namespace Command Set Model

2.1 工作原理

2.1.1 Namespaces

2.1.2 Command Ordering Requirements

2.1.3 Fused Operation

2.1.4 Atomic Operation

2.1.5 End-to-end Protection Information

2.2 I/O Controller Requirements

2.2.1 Command Support

2.2.2 Log Page Support

2.2.3 Features Support

3 I/O Commands for the Zoned Namespace Command Set

3.1 Submission Queue Entry and Completion Queue Entry

3.1.1 Common Command Format

3.1.2 Command Specific Status Values

3.2 Zoned Namespace Command Set Commands

3.3 NVM Command Set I/O Commands

3.3.1 Compare command

3.3.2 Copy command

3.3.3 Dataset Management command

3.3.4 Flush command

3.3.5 Read command

3.3.6 Verify command

3.3.7 Write command

3.3.8 Write Uncorrectable command

3.3.9 Write Zeroes command

3.4 Zoned Namespace Command Set I/O Commands

3.4.1 Zone Append command

3.4.2 Zone Management Receive command

3.4.3 Zone Management Send command

4 Admin Commands for the Zoned Namespace Command Set

4.1 Admin Command behavior for the Zoned Namespace Command Set

4.1.1 Asynchronous Event Request Command

4.1.2 Format NVM command

4.1.3 Get Features and Set Features Commands

4.1.4 Get Log Page Command

4.1.5 Identify Command

4.1.6 Namespace Management command

4.1.7 Sanitize command

4.2 I/O Command Set Specific Admin commands

5 Extended Capabilities

5.1 Reservations

5.2 Directives

5.3 Zone Descriptor Extension

5.4 Reset Zone Recommended

5.5 Finish Zone Recommended

5.6 Zone Active Excursions

Annex A. Zoned Namespaces Host Considerations (Normative)

A.1 Introduction

A.2 Writing to Zones

A.3 Open Zone Considerations

A.3.1 Overview

A.3.2 Zones in the ZSEO:Explicitly Opened Zones and the ZSIO:Implicitly Opened states

A3.3 Opening and Closing Zones

A.3.4 Zone Send Action of Finish Zone Considerations

A.4 Partial Failures

A.4.1 Overview

A.5 Capacity and Sizes


1 Introduction

1.1 Overview

NVM Express®(NVMe®)基本规范定义了一个接口,用于主机软件通过各种基于内存的传输和基于消息的传输与非易失性内存子系统通信。

本文档定义了一个特定的NVMe I/O命令集,即分区命名空间命令集,它扩展了NVMe基本规范和NVM命令集规范。

1.2 Scope

图1显示了NVM Express®分区命名空间命令集规格与NVMe规格家族中的其他规格的关系。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第2张图片

本规范补充了NVMe基础规范。这个规范定义了额外的数据结构、特性features、日志页log pages、命令commands和状态值status values。该规范还定义了对现有数据结构、特性、日志页面、命令和状态值的扩展。这个规范定义了特定于zoning命名空间命令集的需求和行为。NVMe基本规范中定义了一般适用于NVMe或跨多个I/O命令集的功能。

如果在不同规范中定义的需求之间发生冲突,那么下面列表中编号较低的规范应优先于编号较高的规范:

  1. Non-NVMe specifications
  2. NVMe Base Specification
  3. NVMe transport specifications
  4. NVMe I/O command set specifications
  5. NVMe-MI specification

1.3 Conventions

本规范符合NVMe基础规范的约定部分Conventions section、关键字部分Keywords section和字节Byte、字Word和Dword Relationships section关系部分。

1.4 Definitions

1.4.1 Definitions from the NVMe Base Specification

本规范使用NVMe Base Specification中的定义。

1.4.2 在分区命名空间命令集中指定的NVMe Base Specification中的术语

本规范和NVMe基础规范中使用的下列术语在此定义。

1.4.2.1 Endurance Group Host Read Command

NVM命令集规范中定义的Endurance Group Host Read Command。

1.4.2.2 Format Index

用于索引LBA Format data structure、Extended LBA Format data structure和LBA Format Extension data structure的值。

1.4.2.3 SMART Data Units Read Command

在NVM命令集规范中定义的SMART数据单元读取命令。

1.4.2.4 SMART Host Read Command

NVM命令集规范中定义的SMART主机读命令。

1.4.2.5 User Data Out Command

NVM命令集规范和Zone Append command中定义的用户数据输出命令。

1.4.3 Definitions from the NVM Command Set Specification

以下术语在NVM命令集规范中定义并在本规范中使用:

a) LBA range

b) logical block

c) logical block address (LBA)

d) User Data Format

1.4.4 特定于zoning命名空间命令集的定义

本节定义了与本规范相关的术语。

1.4.4.1 active zone

A zone that is in the ZSIO:Implicitly Opened state, the ZSEO:Explicitly Opened state, or the ZSC:Closed state.

1.4.4.2 Address-Specific Write Command

A Write command, Write Uncorrectable command, Write Zeroes command, or Copy command. 地址特定的写命令在命令参数中指定逻辑块地址范围,作为Submission Queue Entry的一部分,或者在命令参数指向的数据结构中。

1.4.4.3 open zone

A zone that is in the ZSIO:Implicitly Opened state, the ZSEO:Explicitly Opened state.

1.4.4.4 write operation

由Write command, a Write Zeroes command, a Write Uncorrectable command, a Copy command, or a Zone Append command发起的操作。

1.4.4.5 zone

作为单个单元进行管理的连续的逻辑块地址范围。

1.4.4.6 Zone Descriptor

包含zone信息的数据结构。

1.4.4.7 Zone Descriptor Extension

主机定义的与zone相关联的数据。

1.4.4.8 zoned namespace

一个命名空间,它被划分为多个zones,并且与zoning命名空间命令集相关联。

1.5 References

NVMe® Base Specification, Revision 2.0. Available from https://www.nvmexpress.org.

NVMe® NVM Command Set Specification, Revision 1.0. Available from https://www.nvmexpress.org.

2 Zoned Namespace Command Set Model

NVMe基础规范定义了主机软件与non-volatile memory subsystem通信的接口。这个规范为zoning命名空间命令集定义了额外的功能。

该命令集的命令集标识符(CSI)值为02h。

2.1 工作原理

介绍分区命名空间命令集的相关操作。

2.1.1 Namespaces

命名空间是NVM的集合,在NVMe Base Specification和NVM Command Set Specification中定义,由本规范修改。

zoned namespace是与Zoned Namespace Command Set相关联的命名空间。zoned namespace被划分为一组大小相等的zone,这些zone是连续的、不重叠的逻辑块地址范围。图2显示了一个有x个zone和z个LBA的zoned namespace,其中LBA 0是zone 0的最低LBA, LBA z-1是zone x-1的最高LBA,对于zone 1,m是最低LBA, n-1是最高LBA。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第3张图片

分区命名空间命令集基于NVM命令集(请参见NVM命令集规范)。

每个zone都有一个相关的Zone Descriptor,它包含一组属性。Zone Management Receive command可用于检索一个或多个Zone Descriptor。

2.1.1.1 Zone Descriptor

图3总结了与区域相关的属性。这些属性在Zone Descriptor数据结构中报告,如图37所示。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第4张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第5张图片

2.1.1.2 Zone Types

2.1.1.2.1 Sequential Write Required Zones

“Sequential Write Required”类型的zone要求一个zone的一组逻辑块地址按顺序写入。

2.1.1.2.1.1 Writing in Sequential Write Required Zones

在zone类型为Sequential write Required的特定zone中,可以使用以下命令写入逻辑块:

Write command;

Write Zeroes command;

Write Uncorrectable command;

Copy command; and

Zone Append command.

为分区名称空间中的每个zone维护一个写指针,它指示该区域中的下一个可写逻辑块地址。写指针对于图4中定义的区域状态子集有效。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第6张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第7张图片

主机可以使用Zone Management Receive command来确定Zone的当前写指针。

对于处于ZSE:Empty状态、ZSIO: implicit open状态、ZSEO: implicit open状态或ZSC:Closed状态的zone,当一个写操作成功完成时,该区域的写指针会随着写逻辑块的数量而增加。

如果控制器不能成功写入启动写操作的命令指定的所有逻辑块,则写指针应:

a)设置为该命令指定的lba范围内的一个值;

b)被设置为比该命令指定的LBA范围内的最后一个LBA大1;

或c)失效(即,由于过渡到ZSRO:Read Only状态或ZSO:Offline状态,或由于Zone Active Excursion(参见5.6节))。

带Zone Send Action of Reset Zone的Zone Management Send命令将写指针设置为该zone的ZSLBA。

图5显示了一个处于ZSE:Empty状态的zone示例。LBA m表示ZSLBA属性,写指针表示ZSLBA, n-1表示该zone最大的LBA。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第8张图片

图6显示了一个处于ZSIO:Implicitly Opened state、ZSEO:Explicitly Opened state或ZSC:Closed state的zone示例,它已经写入了一些逻辑块。写指针用LBA w表示,是该zone编号最低的未写LBA(即下一个要写的LBA), n-1是该zone编号最高的LBA。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第9张图片

控制器应中止向处于ZSF:Full状态的zone写入命令,状态码为Zone Is Full。

当一个命令写入处于ZSRO:Read Only状态的zone时,控制器将中止该命令,状态码为Zone Is Read Only。

对处于ZSO:Offline状态的zone写入命令时,控制器应中止,状态码为Zone Is Offline。

For a zone in the ZSE:Empty state, the ZSIO:Implicitly Opened state, the ZSEO:Explicitly Opened state, or the ZSC:Closed state:

a)如果一个Address-Specific Write Command指定了一个不等于该区域的写指针的启动LBA字段,那么控制器将终止该命令,状态码为“Zone Invalid Write”;

b)如果一个Zone Append command指定的ZSLBA不是该zone中最低逻辑块地址,那么控制器将中止该命令,并在命令中输入Invalid Field的状态码。

控制器应中止这样的写入操作命令,该命令在一个zone中具有起始 LBA,并且逻辑块的数量超过该zone中剩余的逻辑块数量,状态代码为Zone Boundary Error。

2.1.1.2.1.2 Reading in Sequential Write Required Zones

If the zone for a User Data Read Access Command is:

a)处于ZSO:Offline状态时,终止该命令,状态码为Zone Is Offline;

或b)处于任何其他状态时,则User Data Read Access Command将按照本节、2.1.1.5节和NVM命令集规范中的Deallocated or Unwritten Logical Blocks章节的描述执行。

如果在Zoned Namespace Command Set特定Identify Namespace data structure(参见图48)中,Read Across Zone Boundaries bit被设置为' 1 ',那么 User Data Read Access Commands可以指定一个LBA范围,其中包含多个zone中的逻辑块。

如果Read Across Zone Boundaries bit被清除为' 0 ',那么执行指定LBA范围(包含多个区域的逻辑块)的读取操作的命令将被终止,状态码为Zone Boundary Error。

2.1.1.3 Zone State Machine

每个zone都有一个关联的状态机。状态机控制每个zone的操作特征。状态机包括:ZSE:Empty、ZSIO: implicit Opened、ZSEO: explicit Opened、ZSC:Closed、ZSF:Full、ZSRO:Read Only、ZSO:Offline。

区域状态机的初始状态设置如下:

a)NVM Subsystem Reset;或

b) NVM Subsystem中的所有控制器报告控制器关机处理完成(即Shutdown Type (ST) bit清除为' 0 ',Shutdown Status (SHST)字段设置为10b,参见NVMe基础规范)。

每个zone的初始状态是:

a) ZSE:Empty state,如果写指针有效,写指针指向区域中最低的LBA,Zone Descriptor Extension Valid bit被清除为' 0 ';

b) ZSC:Closed state:

a)如果写指针是有效的,并且不指向区域中最低的LBA;或

b)如果写指针是有效的并且Zone Descriptor Extension Valid bit设置为' 1 ';

c) ZSF:Full state:

a)如果最近的状态是ZSF:Full;或

b)如果区域状态由于NVM Subsystem Reset而转变为ZSF:Full状态;

d) ZSRO:Read Only state,如果最近的zone state是ZSRO:只读状态;和

e) ZSO:Offline state,如果最近的zone state是ZSO:Offline state。

zone states之间的转换导致报告如图42中定义的Zone Descriptor Changed异步事件。

如果zoned namespace使用Format NVM command格式化,或者使用Namespace Management command创建,zoned namespace中的 zone将初始化为ZSE:Empty状态或ZSO:Offline状态。

处于ZSE:Empty state、ZSIO:Implicitly Opened state、ZSEO:Explicitly Opened state、ZSC:Closed state或ZSF:Full state的Zone可以通过本规范范围之外的机制过渡到ZSRO:Read Only state或ZSO:Offline state。

图7显示了从格式化或创建分区名称空间开始的每个zone state之间的有效转换。从ZSE:Empty状态到ZSC:Closed状态的转换(虚线)只有在zoned namespace使用Zone Descriptor Extension支持进行格式化时才有效(请参阅5.3节)。阴影区域之间的箭头表示与该区域所有状态之间的转换。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第10张图片

对一个命令的处理可能会导致多个状态机转换(例如,对一个Write命令的处理可能会导致从ZSC:Closed状态到ZSIO: implicit open状态的转换,然后导致从ZSIO: implicit open状态到ZSF:Full状态的转换)。

2.1.1.3.1 ZSE:Empty state

Transition ZSE:ZSIO:如果有2.1.1.4节定义的可用资源,并且写操作写入该zone的一个或多个逻辑块,则该zone将从ZSE:Empty状态过渡到ZSIO:隐式打开状态。

Transition ZSE: ZSEO:如果有2.1.1.4节中定义的可用资源,并且一个zone发送动作为Open zone的Zone Management Send command成功完成,该区域将从ZSE:Empty状态过渡到ZSEO: explicit Opened状态。

Transition ZSE: ZSC:如果有2.1.1.4节中定义的可用资源,并且一个zone发送动作为Set Zone Descriptor Extension的Zone Management Send command成功完成,该区域将从ZSE:Empty状态过渡到ZSC:Closed状态。

Transition ZSE: ZSF:一个zone发送动作为Finish Zone的Zone Management Send command成功完成,该区域将从ZSE:Empty状态过渡到ZSF:Full状态。

2.1.1.3.2 ZSIO:Implicitly Opened state

Transition ZSIO:ZSE: zone将从ZSIO:Implicitly Opened state过渡到ZSE:Empty state,这是成功完成带有Reset Zone的Zone Send Action 的Zone Management Send command的结果。

Transition ZSIO:ZSEO: zone将从ZSIO:Implicitly Opened state过渡到ZSEO:Explicitly Opened state,这是成功完成带有Open Zone的Zone Send Action的a Zone Management Send command的结果。

Transition ZSIO:ZSC: 由于以下原因,该zone将从ZSIO:Implicitly Opened state过渡到ZSC:Closed state:

a)成功完成带Close Zone的Zone Send Action的Zone Management Send command;和

b)the controller initiating the transition as defined in section 2.1.1.4.1

Transition ZSIO: ZSF: Zone将从ZSIO:Implicitly Opened state过渡到ZSF:Full state:

a)成功完成带Finish Zone的Zone Send Action的Zone Management Send command;

b)作为写操作的结果,该操作写入一个或多个逻辑块,使zone达到其可写zone capacity;

c)由于Zone Active Excursion(参见5.6节);和

d)由于zoned namespace成为write protected(请参阅NVMe基础规范中的命名空间write protected部分)。

2.1.1.3.3 ZSEO:Explicitly Opened state

Transition ZSEO:ZSE: The zone shall transition from the ZSEO:Explicitly Opened state to the ZSE:Empty state as a result of successful completion of a Zone Management Send command with a Zone Send Action of Reset Zone.

Transition ZSEO:ZSC: The zone shall transition from the ZSEO:Explicitly Opened state to the ZSC:Closed state upon successful completion of a Zone Management Send command with a Zone Send Action of Close Zone.

Transition ZSEO:ZSF: The zone shall transition from the ZSEO:Explicitly Opened state to the ZSF:Full state:

a) as a result of successful completion of a Zone Management Send command with a Zone Send Action of Finish Zone;

b) as a result of a write operation that writes one or more logical blocks that causes the zone to reach its writeable zone capacity;

c) due to a Zone Active Excursion (refer to section 5.6); or

d) as a result of the zoned namespace becoming write protected (refer to the Namespace Write Protection section in the NVMe Base Specification).

2.1.1.3.4 ZSC:Closed state

Transition ZSC:ZSE: The zone shall transition from the ZSC:Closed state to the ZSE:Empty state as a result of successful completion of a Zone Management Send command with a Zone Send Action of Reset Zone.

Transition ZSC:ZSIO: The zone shall transition from the ZSC:Closed state to the ZSIO:Implicitly Opened state, if there are available resources as defined in section 2.1.1.4 and a write operation writes one or more logical blocks of that zone.

Transition ZSC:ZSEO: The zone shall transition from the ZSC:Closed state to the ZSEO:Explicitly Opened state if there are available resources as defined in section 2.1.1.4 and a Zone Management Send command with a Zone Send Action of Open Zone completes successfully.

Transition ZSC:ZSF: The zone shall transition from the ZSC:Closed state to the ZSF:Full state:

a) as a result of successful completion of a Zone Management Send command with a Zone Send Action of Finish Zone;

b) due to a Zone Active Excursion (refer to section 5.6); and

c) as a result of the zoned namespace becoming write protected (refer to the Namespace Write Protection section in the NVMe Base Specification).

2.1.1.3.5 ZSF:Full state

Transition ZSF:ZSE: The zone shall transition from the ZSF:Full state to the ZSE:Empty state as a result of successful completion of a Zone Management Send command with a Zone Send Action of Reset Zone.

2.1.1.3.6 ZSRO:Read Only state

Transition ZSRO:ZSO: The zone shall transition from the ZSRO:Read Only state to the ZSO:Offline state as a result of successful completion of a Zone Management Send command with a Zone Send Action of Offline Zone.

2.1.1.3.7 ZSO:Offline state

There are no transitions from the ZSO:Offline state to any other zone state.

2.1.1.4 Zone Resources

Zone可能有关联的Active Resources和关联的Open Resources。资源限制每个zone状态允许的zone的数量。resource relationship在图8中定义。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第11张图片

已关联Open Resources的zone是关联Active Resources的zone的子集。Maximum Open Resources字段应该小于或等于I/O Command Set specific Identify Namespace Data Structure for the Zoned Namespace Command Set中的Maximum Active Resources字段(参见图48)。

2.1.1.4.1 Managing resources

控制器将Active Resources与ZSIO: implicit Opened状态、ZSEO: explicit Opened状态和ZSC:Closed状态的zone相关联。控制器将Open Resources与ZSIO:隐式打开状态和ZSEO:显式打开状态中的zone关联起来。资源管理如下:

a)从ZSE:空状态到ZSIO:隐式打开状态或ZSEO:显式打开状态的转换会使Active Resources和Open Resources的资源使用量增加1。

b)从ZSE:Empty状态到ZSC:Closed状态的转换会使Active Resources的资源占用增加1。

c)从ZSIO:隐式打开状态或ZSEO:显式打开状态到ZSC:关闭状态的转换会使Open Resources的使用减少1。

d)从ZSC:关闭状态到ZSIO:隐式打开状态或ZSEO:显式打开状态的转换会使Open Resources的使用增加1。

e)从ZSIO:隐式打开状态或ZSEO:显式打开状态到ZSE:Empty状态、ZSF:Full状态、ZSRO:Read Only状态或ZSO:Offline状态的转换会减少Active Resources和Open Resources的资源使用1。

f)从ZSC:Closed状态到ZSE:Empty状态、ZSF:Full状态、ZSRO:Read Only状态或ZSO:Offline状态的转换会减少Active Resources的资源使用1。

g)从ZSE:Empty状态到ZSF:Full状态的转换不影响Active Resources和Open Resources的资源使用。

控制器处理一个命令,该命令请求zone过渡到ZSIO:隐式打开状态,ZSEO:显式打开状态,或ZSC:关闭状态,如果资源不可用并且:

a)Maximum Active Resources字段大于 Maximum Open Resources field,并且:

1.由于所请求的转换的资源是不可用的Active Resources,则中止状态码为Too Many Active Zones的命令;或

2.由于所请求的转换的资源是不可用的Open Resources,则中止状态码为Too Many Open Zones;或

b) Maximum Active Resources字段等于Maximum Open Resources字段,由于所请求的转换的资源是Active Resources,然后以Too Many Active Zones状态码终止命令。

当zoned namespace变为write protected时,关联Active Resources的Zone会转换为ZSF:Full状态。请参阅NVMe基础规范中的Namespace Write Protection一节。

为了资源管理的目的,控制器可以将ZSIO: implicit Opened状态的Zone转换为ZSC:Closed状态。

The coordination of host software usage of resources associated with shared zoned namespaces is outside the scope of this specification.

2.1.1.5 Logical Block Allocation and Capacity Management

当逻辑块用以下语句写入时,该逻辑块应被标记为已分配:

a) a Write command;

b) a Write Uncorrectable command;

c) a Write Zeroes command that does not deallocate the logical block (refer to the Deallocated or Unwritten Logical Blocks section in the NVM Command Set Specification);

d) a Copy command; and

e) a Zone Append command.

一个逻辑块可能被标记为已分配,因为:

a) a Write command not addressing that logical block (e.g., a write of LBA n causes allocation of LBAs n and n+1);

b) a Write Uncorrectable command not addressing that logical block;

c) a Write Zeroes command not addressing that logical block (refer to the Write Zeroes command in the NVM Command Set Specification);

d) a Copy command not addressing that logical block;

e) a Zone Management Send command that transitions a zone containing that logical block to the ZSEO:Explicitly Opened state or the ZSC:Closed state; and

f) a Zone Append command.

由于以下原因,逻辑块可能会被标记为已释放:

a) a Dataset Management command;

b) a Write Zeroes command addressing that deallocates logical blocks (refer to the Deallocated or Unwritten Logical Blocks section in the NVM Command Set Specification); and

c) a sanitize operation.

当区域处于 ZSE:Empty 状态时,区域中的所有逻辑块都应标记为已释放。

2.1.2 Command Ordering Requirements

提交给分区命名空间的命令按照NVMe基本规范和NVM命令集规范中指定的方式处理。正如NVM命令集规范中描述的那样,控制器不负责检查Address-specific Write command的LBA,以确保命令之间的任何类型的排序。例如,如果LBA x提交了一个Address-specific Write command,而LBA x + 1也提交了一个Address-specific Write command,那么这些命令的处理顺序没有保证。如果这些命令之间有顺序要求(例如,zone type),则需要主机软件在每个命令提交期间强制执行顺序。

2.1.3 Fused Operation

本规范不支持 fused operations(例如,NVM命令集规范中定义的 fused operations在本规范中不支持)。

2.1.4 Atomic Operation

AWUN, NAWUN, nabn, AWUPF, NAWUPF, NABSPF原子性参数应用于NVM命令集规范中的原子操作部分。

2.1.5 End-to-end Protection Information

端到端保护信息与NVM命令集规范定义一致,需要3.4.1.1章节定义的Zone追加命令。

Metadata Region (MR)

元数据区域在NVM命令集规范中定义。

2.2 I/O Controller Requirements

2.2.1 Command Support

本规范实现了NVMe基础规范和NVM命令集规范中定义的I/O控制器的命令支持要求。另外,图9定义了zoning Namespace命令集,对于支持Zoned Namespace Command Set Specification的I/O控制器,这些命令是强制性的、可选的和禁止的。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第12张图片

2.2.2 Log Page Support

该规范实现了NVMe基础规范和NVM命令集规范中定义的I/O控制器的log page支持要求。另外,图10定义了Zoned Namespace Command Set特定的log page,对于支持Zoned Namespace Command Set的I/O控制器,这些log page是强制性的、可选的和禁止的。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第13张图片

2.2.3 Features Support

本规范实现了NVMe基础规范和NVM命令集规范中定义的I/O控制器的feature support要求。附加需求在4.1.3节中定义。

3 I/O Commands for the Zoned Namespace Command Set

本节定义分区命名空间命令集 I/O 命令。

3.1 Submission Queue Entry and Completion Queue Entry

Submission Queue Entry(SQE)结构和Completion Queue Entry(CQE)结构在NVM命令集规范中定义,在本节中定义了一些变化。

3.1.1 Common Command Format

通用命令格式在NVMe基础规范中定义。

3.1.2 Command Specific Status Values

本规范支持NVMe基础规范和NVM命令集规范中定义的Command Specific status values。本节定义了分区命名空间命令集规格中Command Specific status values。

图11定义了特定于Zoned Namespace命令集的状态值。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第14张图片

3.2 Zoned Namespace Command Set Commands

该规范包括图12中列出的命令。3.3节介绍了分区命名空间命令集的NVM命令集I/O命令的具体行为。第3.4节描述了本规范定义的命令。命令按照NVMe基本规范中的定义提交。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第15张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第16张图片

3.3 NVM Command Set I/O Commands

分区命名空间命令集实现了NVM命令集I/O命令,在本节中定义了更改。

3.3.1 Compare command

本节定义了分区命名空间命令集 I/O 命令。Compare命令按照 NVM 命令集规范中的定义进行操作,并具有与命令操作的指定zone的zone type相关的附加要求(请参阅2.1.1.2节)。

3.3.1.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 13 中定义的附加Zoned Namespace Command Set的Command Specific status values。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第17张图片

3.3.2 Copy command

Copy command的操作与NVM命令集规范中定义的一样,还有与命令操作的指定zone的zone type相关联的附加要求(请参阅2.1.1.2节)。

3.3.2.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 14 中定义的附加Zoned Namespace Command Set的Command Specific status values。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第18张图片

3.3.3 Dataset Management command

Dataset Management command的操作与NVM命令集规范中定义的一致,并在本节中定义了额外的要求。

如果指定的zone处于ZSO:Offline状态,则命令将中止,状态码为zone is Offline。

3.3.3.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 15 中定义的附加Zoned Namespace Command Set的Command Specific status values。

3.3.4 Flush command

Flush命令的操作与NVM命令集规范中定义的一致,并在本节中定义了额外的要求。

如果:

a)存在一个volatile写cache;

b)启用了易失性写缓存;和

c)指定zone处于ZSO:Offline状态,

则终止命令,且状态码Zone Is Offline。

3.3.4.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 16 中定义的附加Zoned Namespace Command Set的Command Specific status values。

3.3.5 Read command

Read命令的操作与NVM命令集规范中定义的一样,还有与命令操作的指定区域的区域类型相关的附加要求(参见2.1.1.2节)。

3.3.5.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 17 中定义的附加Zoned Namespace Command Set的Command Specific status values。

3.3.6 Verify command

Verify命令的操作与NVM命令集规范中定义的一样,还有与命令操作的指定区域的区域类型相关联的附加要求(请参阅2.1.1.2节)。

3.3.6.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 18中定义的附加Zoned Namespace Command Set的Command Specific status values。

3.3.7 Write command

Write命令的操作与NVM命令集规范中定义的一样,还有与命令操作的指定区域的区域类型相关联的附加要求(参见2.1.1.2节)。

3.3.7.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 19中定义的附加Zoned Namespace Command Set的Command Specific status values。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第19张图片

3.3.8 Write Uncorrectable command

Write Uncorrectable命令的操作与NVM命令集规范中定义的一样,还有与命令操作的指定区域的区域类型相关的附加要求(参见2.1.1.2节)。

3.3.8.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 20中定义的附加Zoned Namespace Command Set的Command Specific status values。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第20张图片

3.3.9 Write Zeroes command

Write Zeroes命令的操作与NVM命令集规范中定义的一样,还有与命令操作的指定区域的区域类型相关的附加要求(参见2.1.1.2节)。

3.3.9.1 Command Completion

Command Completion如 NVM 命令集规范中所定义,以及图 21中定义的附加Zoned Namespace Command Set的Command Specific status values。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第21张图片

3.4 Zoned Namespace Command Set I/O Commands

3.4.1 Zone Append command

Zone Append 命令将数据和元数据(如果适用)写入 ZSLBA 字段指示的Zone的 I/O 控制器。 如果适用,控制器将数据和元数据分配给Zone内的一组逻辑块。 写入的一组逻辑块的最低 LBA 在completion queue entry中返回(请参阅第 3.4.1.2 节)。 主机还可以指定要包含在操作中的保护信息。

该命令使用了Command Dword 2, Command Dword 3, Command Dword 10, Command Dword 11, Command Dword 12, Command Dword 13, Command Dword 14, and Command Dword 15的字段。如果命令使用PRP进行数据传输,则使用Metadata Pointer、PRP Entry 1和PRP Entry 2字段。如果该命令使用SGL进行数据传输,则使用“Metadata SGL Segment Pointer”和“SGL Entry 1”字段。所有其他特定于命令的字段都保留。

在多个未完成的Zone Append command到一个区域的情况下,写入顺序未定义并留给控制器。

如果“Zone Append”命令指定的区域不是“Sequential Write Required”的区域,那么该命令将以“Invalid Field in Command”的状态码终止。

如果Zone Append命令中的ZSLBA字段没有指定一个Zone的最低逻辑块,那么该命令将以“Invalid Field in Command”的状态码终止。

The AWUN, NAWUN, NABSN, AWUPF, NAWUPF, NABSPF atomicity parameters apply as defined in the Atomic Operations section in the NVM Command Set Specification to the Zone Append command.

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第22张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第23张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第24张图片

3.4.1.1 Protection Information

对于Zone Append命令,直到Zone Append命令完成,主机才知道该命令写入数据的实际LBA(参考3.4.1.2节中定义的ALBA字段)。在发出Zone Append命令时,主机不能提供保护信息中reference tags中数据的实际LBA(请参考NVM命令集规范的端到端数据保护部分)。因此,保护信息中基于LBA的reference tags的处理方法按照本节的定义进行处理。

除非另有规定,对于控制器从主机接收的保护信息,控制器执行的检查应按照 NVM 命令集规范的保护信息检查控制 - PRCHK 部分的定义进行。

对于写入media的Reference Tag,如果PIREMAP位为:

a)清除为' 0 ',则控制器应按照NVM命令集规范的端到端保护信息章节,不加修改地将参考标签写入介质;或

b)设置为“1”,则控制器将第一个和后续lba的逻辑块参考标签写入介质,如下所示:

A) Media Reference Tag[0] = ILBRT + (ALBA - ZSLBA); and

B) Media Reference Tag[n+1] = Media Reference Tag[n] + 1

Where: Media Reference Tag [0] is the Logical Block Reference Tag written to media for the first LBA, and Media Reference Tag [n+1] is the Logical Block Reference Tag written to media for all other LBAs.

Note: When writing protection information using the Zone Append command with the PIREMAP bit set to ‘1’, the Logical Block Reference Tag written to media is not the value transferred from the host to the controller, but contains the value calculated as defined in this section.

The controller shall write all protection information received from the host, other than the Logical Block Reference Tag, to the media without modification.

3.4.1.2 Command Completion

When the command is completed, the controller shall post a completion queue entry (CQE) to the associated I/O Completion Queue indicating the status for the command. If the command is successfully completed, then the lowest LBA containing the data written by the command is returned in the Assigned LBA (ALBA) field of the completion queue entry. Dword 0 contains bits 31:00 of the ALBA field; Dword 1 contains bits 63:32 of the ALBA field. If the command is not successfully completed, then the contents of the ALBA field are undefined.

Figure 30 defines the Zone Append command specific status values.

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第25张图片

3.4.2 Zone Management Receive command

Zone Management Receive命令返回一个data buffer,其中包含关于Zone的信息。该信息包括characteristics of the zone、 state of the zone、capacity of the zone以及在3.4.2.2节中定义的其他信息。主机使用此命令来确定此信息的当前设置。

如果该信息发生变化(例如,在Zone Management Send command的completion queue entry中,Capacity Changed bit设置为' 1 ',或者通过Zone Descriptor Changed event),那么主机可以使用该命令来确定该信息的当前状态(例如,zone的当前容量或Reset Zone Recommended属性)。

Zone Management Receive command使用Data Pointer、Command Dword 10, Command Dword 11, Command Dword 12, and Command Dword 13字段。所有其他特定于命令的字段都保留。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第26张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第27张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第28张图片

3.4.2.1 Zone Receive Actions

Zone Management Receive command的Zone Receive Action字段指定执行什么动作。

3.4.2.1.1 Report Zones

Report Zones操作返回Report Zones数据结构(请参见图35)。the Report Zones data structure的The Zone Descriptors应:

a)仅报告ZSLBA值大于或等于命令中SLBA值所指定区域的ZSLBA值的区域的Zone描述符;

b)匹配在Zone Receive Action Specific字段的标准;和

c)按各zone的ZSLBA值升序排序。

3.4.2.1.2 Extended Report Zones

Extended Report Zones操作返回Extended Report Zones数据结构(请参见图36)。Extended Report Zones data structure的Zone Descriptors和Zone Descriptor Extensions应:

a)仅报告ZSLBA值大于或等于命令中SLBA值所指定区域的ZSLBA值的区域的Zone描述符;

b)匹配在Zone Receive Action Specific字段的标准;和

c)按各zone的ZSLBA值升序排序。

3.4.2.2 Zone Management Receive Data Structures

3.4.2.2.1 Report Zones Data Structure

Figure 35 defines the Report Zones Data Structure.

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第29张图片

3.4.2.2.2 Extended Report Zones Data Structure

Figure 36 defines the Extended Report Zones Data Structure.

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第30张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第31张图片

3.4.2.2.3 Zone Descriptor Data Structure

Figure 37 defines the Zone Descriptor data structure.

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第32张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第33张图片

3.4.2.3 Command Completion

当命令完成时,控制器将一个completion queue entry(CQE)发送到相关的I/O Completion Queue,表明命令的状态。

3.4.3 Zone Management Send command

Zone Management Send命令请求对一个或多个Zone进行操作。该命令使用Data Pointer、Command Dword 10, Command Dword 11, and Command Dword 13字段。所有其他特定于命令的字段都保留。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第34张图片

如果命令成功执行,根据Zone Send Action字段和该命令指定的Zone的当前状态,该命令可能会以多种方式影响Zone,包括:

A)区域状态可能发生变化;

b)Zone Descriptor Extension数据可能会改变;和

c)Zone Descriptor Extension Valid zone attribute bit可能会改变。

如果控制器有多个未执行的Zone Management Send命令,指定一个或多个相同的zones,那么结果是未定义的。

如果包含指定zone的zoned namespace处于NVMe Base Specification“Namespace Write Protection”章节的write protected状态,则控制器将中止状态码为“Namespace is Write Protected”的命令。

如果没有足够的Active资源或Open资源可用,则命令将按照2.1.1.4节的定义中止,并且不会发生区域状态转换。

如果命令的SLBA字段没有指定分区命名空间中的分区的起始逻辑块,并且Select All bit被清除为' 0 ',那么控制器将中止命令,并在命令中显示Invalid Field的状态码。

如果“Zone Send Action”字段指定了“Set Zone Descriptor Extension Zone Send Action”,并且“Zoned Namespace Command Set specific Identify Namespace data structure”中的“Zone Descriptor Extension Size”字段值被清除为0h,那么控制器将在“Command”中以“Invalid field”的状态码中止命令。

For a shared zoned namespace, the method used by hosts to coordinate Zone Management Send commands is outside the scope of this specification.

3.4.3.1 Zone Send Actions

Zone Management Send命令Zone Send Action字段定义对一个或多个Zone执行什么操作。

3.4.3.1.1 Close Zone

如果命令Dword 13中的Select All bit 被清除为' 0 ',并且SLBA字段指定的区域在:

a) ZSIO:隐式打开状态或ZSEO:显式打开状态,则区域过渡到ZSC:关闭状态;

b) ZSC:关闭状态,此时不改变区域状态;和

c) ZSE:Empty状态,ZSF:Full状态,ZSRO:Read Only状态,ZSO:Offline状态,则控制器中止命令,状态码为Invalid Zone state Transition。

如果Select All位设置为“1”,则SLBA字段将被忽略,并且所有的区域在:

a) ZSIO:隐式打开状态;和

b) ZSEO:显式打开状态,

应过渡到ZSC:关闭状态。

3.4.3.1.2 Finish Zone

如果命令Dword 13中的Select All位被清除为' 0 ',并且SLBA字段指定的区域在:

a) ZSE:空状态,ZSIO:隐式打开状态,ZSEO:显式打开状态,或ZSC:关闭状态,则区域应过渡到ZSF:Full状态;

b) ZSF:Full状态,则不改变区域状态;和

c) ZSRO:Read Only状态或ZSO:Offline状态,则控制器中止命令,状态码为Invalid Zone state Transition。

如果Select All位设置为“1”,则SLBA字段将被忽略,并且所有的区域在:

a) ZSIO:Implicity Opened state;

b) ZSEO:Explicitly Opened state; and

c) ZSC:Closed state,

应转换到到ZSF:Full状态。

3.4.3.1.3 Open Zone

如果命令Dword 13中的Select All位被清除为' 0 ',并且SLBA字段指定的区域在:

a) ZSE:空状态,ZSIO:隐式打开状态或ZSC:关闭状态,则区域应过渡到ZSEO:显式打开状态;

b) ZSEO:显式打开状态,此时不改变区域状态;和

c) ZSF:Full状态,ZSRO:Read Only状态,ZSO:Offline状态,则控制器中止命令,状态码为Invalid Zone state Transition。

如果Select All位设置为“1”,那么SLBA字段将被忽略,并且所有处于ZSC:Closed状态的区域应该转换为ZSEO: explicit Opened状态。

如果没有足够的Active资源或Open资源可用,则该命令将按照2.1.1.4节的描述中止,并且不会发生区域状态转换。

3.4.3.1.4 Reset Zone

如果命令Dword 13中的Select All位被清除为' 0 ',并且SLBA字段指定的区域在:

a) ZSIO:隐式打开状态、ZSEO:显式打开状态、ZSC:关闭状态、ZSF:满状态,则指定区域过渡到ZSE:Empty状态;

b) ZSE:空状态,此时不改变区域状态;和

c) ZSRO:Read Only状态,或者ZSO:Offline状态,则控制器中止命令,状态码为Invalid Zone state Transition。

如果Select All位设置为“1”,则SLBA字段将被忽略,并且所有的区域在:

a) ZSIO:Implicity Opened state;

b) ZSEO:Explicitly Opened state;

c) ZSC:Closed state; and

d) the ZSF:Full state,

应过渡到ZSE:空状态。

如果命令成功完成,那么对于每个受影响的区域:

a)Zone Descriptor中的“写指针”区域属性设置为该区域的ZSLBA;和

b)以下Zone Descriptor中的zone attribute bits将被清除为' 0 ':

a) Zone Descriptor Extension Valid;

b) Finish Zone Recommended;

c) Reset Zone Recommended; and

d) Zone Finished by Controller.

如果在 Zoned Namespace Command Set specific identify Namespace 数据结构中的 Zone Operation Characteristics 字段中的 Variable Zone Capacity bit设置为“1”(参见图 48),则控制器可以更改每个受影响区域的区域描述符中的区域容量字段。 如果一个或多个区域的区域容量字段发生更改,则completion queue entry Dword 0 中的区域容量更改位应设置为“1”(请参阅第 3.4.3.2 节)。

3.4.3.1.5 Offline Zone

如果命令Dword 13中的Select All位被清除为' 0 ',并且SLBA字段指定的区域在:

a) ZSRO:Read Only状态,则指定区域过渡到ZSO:Offline状态;

b) ZSO:离线状态,此时不改变区域状态;和

c) ZSE:空状态、ZSIO:隐式打开状态、ZSEO:显式打开状态、ZSC:关闭状态、ZSF:满状态时,控制器中止命令,并提示Invalid Zone State Transition状态码。

如果Select All位设置为“1”,则SLBA字段将被忽略,并且所有处于ZSRO:Read Only状态的区域将被转换为ZSO:Offline状态。

3.4.3.1.6 Set Zone Descriptor Extension

如果命令Dword 13中的Select All位被清除为' 0 ',并且SLBA字段指定的区域在:

a) ZSE:空状态,此时区域过渡到ZSC:闭状态;和

b) ZSE:空状态以外的任何状态,则控制器中止命令,并输入Invalid Zone State Transition状态码。

如果Select All位设置为“1”,则命令将以“Invalid Field in Command”的状态码终止。

如果没有足够的Active资源可用,该命令将按照2.1.1.4节的描述中止,并且不会发生区域状态转换。

在成功完成命令后,区域的Zone Descriptor Extension应该设置为数据缓冲区中的数据。

3.4.3.2 Command Completion

当命令完成时,控制器将一个completion queue entry (CQE)发送到相关的I/O Completion Queue,表明命令的状态。图40定义了Zone Management Send命令特定的状态值。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第35张图片

completion queue entry的Dword 0指示指定区域的区域容量是否已更改。完成队列条目的Dword 0定义见图41。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第36张图片

如果发生了zone capacity更改,那么主机可以使用3.4.1节中定义的Zone Management Receive command来确定发生了哪些更改。

4 Admin Commands for the Zoned Namespace Command Set

4.1 Admin Command behavior for the Zoned Namespace Command Set

Admin Commands如 NVMe 基本规范中所定义。 本节定义了Admin Commands的分区命名空间命令集特定行为。

4.1.1 Asynchronous Event Request Command

异步事件请求命令Asynchronous Event Request command的操作与NVMe基本规范中定义的一致。除了NVMe基础规范和NVM命令集规范中定义的异步事件之外,分区命名空间命令集在本节中定义了异步事件。

图42定义了zoning Namespace命令集特定于异步事件Information – Notice的数据结构。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第37张图片

4.1.1.1 Command Completion

如果有异步事件要报告给主机,completion queue entry(CQE)将被发布到Admin Completion Queue。控制器实现了与NVMe基础规范中定义的Asynchronous Event Request command相同的逻辑,增加了以下内容:

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第38张图片

4.1.2 Format NVM command

Format NVM命令按照NVMe基本规范和NVM命令集规范中定义的操作。Format Index表示:

a)来自NVM Command Set Identify Namespace数据结构的LBA Format字段的有效User Data Format;

b) I/O Command Set Specific Identify Namespace Data Structure for the NVM Command Set中的有效Extended LBA Format;和

c) I/O Command Set Specific Identify Namespace Data Structure for the NVM Command Set中的有效LBA Format Extension。

4.1.3 Get Features and Set Features Commands

支持分区命名空间命令集的I/O控制器的Features support requirements在NVM命令集规范和本节中定义。

图44定义了Zoned Namespace命令集特定的Set Features Command Asynchronous Event Configuration – Command Dword 11数据结构(参考NVMe基础规范)。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第39张图片

4.1.4 Get Log Page Command

Get Log Page命令按照NVMe基础规范和NVM命令集规范中定义的操作。如果处理的Get Log Page命令指定了一个不支持的Log Identifier,那么控制器应该中止命令且返回状态为Invalid Field in Command。

除了NVMe基础规范和NVM命令集规范中定义的log pages外,分区命名空间命令集在本节中定义了log pages。

Log page scope在 NVMe 基本规范中定义,除非本规范进行了修改。

namespace identifier的使用规则在NVMe基本规范中定义。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第40张图片

4.1.4.1 Changed Zone List (Log Identifier BFh)

此log page指示一个或多个Zone是否发生了Zone Descriptor Changed事件。如果为特定Zone启用了Zone Descriptor Changed事件,则更改的 Changed Zone List包含该Zone的一个条目。

Changed Zone List log page大小为4096字节。它包含一个Zone Identifier List,最多包含511个Zone Identifier条目。Zone Identifier List在图46中定义。

一个Zone Identifier entry包含与更改的Zone Descriptor相关联的Zone的ZSLBA。每个ZSLBA在Zone Identifier List中不得出现超过一次。未使用的条目应填零。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第41张图片

控制器应将log page中的“Number of Zone Identifiers”字段设置为有效条目的数量。

为了确定更改,主机读取Changed Zone List log page,并且对于Zone Identifier entry中指定的每个ZSLBA,发出一个Zone Management Receive command,将Zone Receive Action设置为Report Zones或Extended Report Zones,并从该Zone Identifier entry指定ZSLBA。

主机应在 RAE 位清零的情况下读取整个页面。 此log page是动态的,当使用偏移量读取而没有header时,数据可能会从先前读取的页面更改。

对于给定的分区命名空间,如果控制器无法使用任何有效条目填充Changed Zone List log page,并且自上次读取log page以来至少存在一个Zone Descriptor Changed event,则控制器应将该log page中的Number of Zone Identifiers设置为 FFFFh,并且列表的其余部分应填零。 主机可以读取整个Report Zones数据结构或整个Extended Report Zones数据结构,以发现自上次读取信息以来哪些Zone Descriptor发生了变化。

在NVM子系统重置后,log page内容不应该被保留。

4.1.5 Identify Command

本规范实现了在NVMe基础规范和NVM命令集规范中定义的Identify Command和相关的Identify数据结构。另外,Zoned Namespace命令集定义了本节中定义的Identify数据结构。

每个I/O命令集由NVMe基本规范分配一个特定的Command Set Identifier(CSI)值。Zoned Namespace命令集的CSI值为02h。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第42张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第43张图片

4.1.5.1 I/O Command Set Specific Identify Namespace Data Structure for the Zoned Namespace Command Set (CNS 05h, CSI 02h)

Figure 48 defines the I/O Command Set specific Identify Namespace data structure for the Zoned Namespace Command Set.(图48为Zoned Namespace命令集定义了特定于I/O命令集的Identify Namespace数据结构。)

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第44张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第45张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第46张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第47张图片

图49定义了Identify LBA Format Extension数据结构。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第48张图片

LBAFormat 的数据结构,NVM Command Set Specific数据结构在NVM命令集规范中定义。数据结构通过LBA Format Extension数据结构进行扩展。

使用index来引用 NVM Command Set specific Identify Namespace data structure中的 LBA Format数据结构的命令(例如,格式 NVM 和命名空间管理),应使用相同的index来引用 LBA Format Extension数据结构,并在指定 LBA Format时处理 LBA Format数据结构和LBA Format Extension数据结构。

主机指定的命名空间管理字段与NVM命令集的定义一致。

4.1.5.2 I/O Command Set Specific Identify Controller Data Structure (CNS 06h, CSI 02h)

Figure 50 defines the I/O Command Set specific Identify Controller data structure for the Zoned Namespace Command Set.

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第49张图片

4.1.6 Namespace Management command

Namespace Management command的操作与NVM命令集规范中的定义一致。

4.1.7 Sanitize command

Sanitize 命令按照 NVMe 基本规范中的定义运行,对实现分区命名空间命令集的控制器的额外的要求定义在本节。

Sanitize Status(请参考NVMe基本规范中的Sanitize Status(Log Identifier 81h)部分)和支持分区命名空间命令集的分区命名空间的成功的sanitize operation所产生的zone state定义在图51中。

Sanitize命令的所有字段都在NVMe基本规范中定义。

sanitize操作成功后要报告的区域状态和事件取决于以下设置:

a) No Deallocate After Sanitize bit in the Sanitize command that requested the sanitize operation;

b) No-Deallocate Modifies Media After Sanitize field;

c) No-Deallocate Inhibited bit;

d) No-Deallocate Response Mode bit; and

e) Sanitize Action field.

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第50张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第51张图片

4.2 I/O Command Set Specific Admin commands

特定于I/O命令集的Admin commands在NVMe基础规范和NVM命令集规范中有定义。

5 Extended Capabilities

5.1 Reservations

Reservations按照 NVMe 基本规范和 NVM 命令集规范的定义运行,存在Reservations时的附加Command Behavior在图 52 中定义。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第52张图片

5.2 Directives

支持Directives的定义在NVM命令集规范中。

5.3 Zone Descriptor Extension

Zone Descriptor Extension特性允许主机软件将少量数据(例如UUID)关联到一个zone。该数据作为Zone Descriptor Extension附加到zone,可以通过发出Zone Receive Action of Extended Report Zones的Zone Management Receive command(参见3.4.2.2.2节)并指定该zone来访问。主机软件可以读取该Zone的Zone Descriptor Extension Valid zone attribute,以确定该Zone是否有关联的数据。

通过带有Zone Send Action of Set Zone Descriptor Extension的的Zone Management Send command(该命令指定区域和要在数据缓冲区中关联的数据(请参阅第 3.4.3.1.6 节)),当Zone从ZSE:空状态转换到ZSC:关闭状态时,一个Zone Descriptor Extension是与Zone相关联的。

成功完成Zone Management Receive命令之后:

a)数据缓冲区中的数据与该zone的 Zone Descriptor Extension相关联;和

b)Zone Descriptor Extension Valid zone attribute bit设置为“1”。

当数据被关联到一个Zone Descriptor Extension时,数据被关联到:

a)zone转换到ZSE:Empty状态或ZSO:Offline状态;和

b)Zone Descriptor Extension Valid zone attribute bit被清除为' 0 '。

5.4 Reset Zone Recommended

在一个处于ZSF:Full状态的zone上调度内部操作(例如,非易失性介质上的后台操作)的控制器可以通知主机软件启动一个zone reset操作(参见3.4.3.1.4节)。如果控制器在一个zone上调度这样的内部操作,控制器可以通过以下方式通知主机:

a)将特定区域的Reset Zone Recommended zone attribute设置为' 1 '(参见图37);

b)设置“Reset Zone Recommended Time Limit”区域属性信息,以表示控制器在指定区域执行内部操作之前的秒数;和

c)为特定区域生成Zone Descriptor Changed event 。

由于zone reset操作会销毁特定分区中的数据,所以对于“reset zone Recommended zone”属性设置为“1”的zone,主机软件也可以选择执行zone reset操作。如果主机没有对指定的zone执行reset操作,则可能会执行可能影响性能的内部操作。

如果控制器已处理内部操作或不再调度内部操作,控制器可以通过以下方式通知主机:

a)清除指定区域的Reset Zone Recommended zone attribute为“0”;和

b)为特定区域生成Zone Descriptor Changed event。

5.5 Finish Zone Recommended

在以下zone中的zone上调度内部操作(例如,非易失性介质上的后台操作)的控制器:

a) ZSIO:Implicitly Opened state:

b) ZSEO:Explicitly Opened state; or

c) ZSC:Closed state

may notify host software to either:

A)对该zone发起一个zone finish操作(参见3.4.3.1.2节);或

b)发起对该zone的写操作,使该zone转换到ZSF:Full状态。

由主机发起的操作可以使控制器取消调度的内部操作。

控制器可以通过以下方式通知主机软件:

a)将特定zone的Finish Zone Recommended zone attribute设置为' 1 '(参见图37);

b)设置“Finish Zone Recommended Time Limit”zone属性信息,以指示控制器在指定区域执行内部操作之前的秒数;和

c)为特定区域生成Zone Descriptor Changed event。

对于主机软件来说,对那些将Finish Zone Recommended Zone属性设置为' 1 '的区域处理上述缓解操作是可选的。如果主机没有对特定区域执行缓解操作,那么可能会执行可能会影响性能的内部操作。

如果控制器已处理内部操作或不再调度内部操作,控制器可以通过以下方式通知主机:

a)清除特定区域的Zone Recommended zone属性为' 0 ';和

b)为特定区域生成Zone Descriptor Changed event。

5.6 Zone Active Excursions

Zone Active Excursion是一个特定于供应商的操作,在以下zone:

a) ZSIO:Implicitly Opened state;

b) ZSEO:Explicitly Opened state; or

c) ZSC:Closed state,

并将区域转换为ZSF:Full状态。Zone Active Excursion与Finish Zone Recommended feature是正交的(参见章节5.5),当一个zone转换到列出的zone状态之一时,Zone Active Excursion可以在任何点发生。如果控制器在这样的zone上执行Zone Active Excursion,那么控制器应通过以下方式通知主机:

a)将该zone的zone属性Zone Finished by Controller bit设置为' 1 '(参见图37);和

b)为该zone生成一个Zone Descriptor Changed event。

Annex A. Zoned Namespaces Host Considerations (Normative)

A.1 Introduction

除了NVM Command Set中定义的要求外,分区命名空间命令集还定义了host management要求。

为了方便主机和NVM子系统之间更好的交互,本附录从主机的角度描述了分区名称空间特性。

A.2 Writing to Zones

在“Sequential Write Required”zone中,对一个zone的写需要从有效的写指针地址开始。

A.3 Open Zone Considerations

A.3.1 Overview

处于ZSIO:隐式打开状态或ZSEO:显式打开状态的每个zone都有关联的Active Resources and Open Resources。Active Resources和Open Resources的可用性限制以及这些zone状态允许的zone数量由Maximum Open Resources字段和Maximum Active Resources字段表示。

处于ZSC:关闭状态的每个区域只有关联的Active Resources。Active Resources的可用性和这个zone状态允许的zone的数量由Maximum Active Resources字段表示。

如果在 ZSE:Empty 状态或 ZSC:Closed 状态的zone中的 LBA 上处理写操作,则应管理该区域,就好像该区域被请求转换到 ZSIO:Implicitly Opened 状态并应考虑第 2.1.1.2 节中定义的Active Resources和Open Resources。

一个zone保持在ZSIO: implicit Opened状态或ZSEO: explicit Opened状态,直到:

A)对该zone进行写操作,导致该zone达到其zone容量;

b)zone状态为ZSIO:隐式打开状态,由控制器选择zone(选择的zone是厂商特定的)转变到ZSC:关闭状态;

c)向zone发出Zone Management Send command with Zone Send Action of Finish Zone;

d)向该zone发出带有Reset Zone Send动作的Zone Management Send命令;

e)向zone发出Zone Management Send command with Zone Send Action of Close Zone;

f)控制器将zone状态转换为ZSRO:Read Only状态或ZSO:Offline状态;

g)由于Zone Active Excursion,控制器将zone转换为ZSF:Full状态;和

h)发生NVM子系统重置(参见NVMe基础规范的Resets section)。

A.3.2 Zones in the ZSEO:Explicitly Opened Zones and the ZSIO:Implicitly Opened states

open zone是处于ZSIO:隐式打开状态或ZSEO:显式打开状态的zone。对于处于ZSE:Empty状态或ZSC:Closed状态的zone,控制器将该zone转换为:

a) ZSEO:Explicitly Opened state,这是通过Zone Send Action of Open Zone处理Zone Management Send命令的结果;或

b) ZSIO:Implicitly Opened state,是处理写操作的结果。

如果一个控制器在一个ZSC:Closed状态的Zone上处理一个Zone Send Action of Open Zone的Zone Management Send命令,那么控制器将该Zone转换为ZSEO: explicit Opened状态。

为了资源管理的目的,控制器可以将ZSIO: implicit Opened状态的一个zone转换为ZSC:Closed状态,以便将与该zone相关联的active resource移动到正在转换为ZSIO: implicit Opened状态的另一个zone。

A3.3 Opening and Closing Zones

主机可以使用以下技术来open一个用于写入的zone,并遵循该技术来close该zone:

a)发出带Zone Send Action of Open Zone的Zone Management Send命令将一个Zone转移到ZSEO:显式打开状态,随后主机可以发出带Zone Send Action of Close Zone的Zone Management Send命令将该Zone转移到ZSC:关闭状态;或

b)发出一个写操作打开一个Zone,然后主机可能会发出一个带有Zone Send Action of Close Zone的zone Management Send命令,将该Zone转换到ZSC:Closed状态。

控制器可以自主地将任何zone从ZSIO:隐式打开状态转换到ZSC:关闭状态。

主机可以使用多个带有Zone Send Action of Close Zone的Zone Management Send命令,来关闭比满足可能打开的 Zone number限制所需的数量更多的Zone。

A.3.4 Zone Send Action of Finish Zone Considerations

在处理带有Zone Send Action of Finish Zone的zone Management Send命令之前,可能先打开一个zone(例如,使用带有Zone Send Action of Open Zone的zone Management Send命令)。

不管在处理带有Zone Send Action of Finish Zone的zone Management Send命令之前如何打开一个zone,此命令将Zone转换到ZSF:Full状态,结果是Active和Open Resources变得可用。

A.4 Partial Failures

A.4.1 Overview

zone state ZSRO:Read Only为主机提供了在zone的部分容量停止操作后继续使用zoned namespace的能力(例如,控制器将一个区域转换为ZSRO:Read Only状态作为对介质故障的响应)。

当一个zone进入“ZSRO:Read Only”状态后,主机需要执行以下操作:

1)将数据从该zone转移到另一个位置(例如,使用Copy命令);和

2)通过发出带有Zone Send Action of Offline Zone的zone Management Send命令,将该区域转换为ZSO:Offline状态。

A.5 Capacity and Sizes

在size和capacity报告中涉及到几种数据结构:

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第53张图片

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第54张图片

一个区域有一个size(ZSZE)和一个capacity(ZCAP),这与可变zone capacity特性的可选支持有关。ZCAP可能会因为重新设置写指针而改变。参见图54。

在一个包含LBA = (ZSLBA + ZCAPcurrent - 1)的写操作成功完成,以及其他事件(例如,成功完成一个带有Zone Send Action of Finish Zone的zone Management Send命令)之后,zone 转换到ZSF:Full。

NVM Express Zoned Namespace Command Set Specification revision 1.1b_第55张图片

你可能感兴趣的:(linux内核,F2FS文件系统,SSD,linux)