当前位置: 首页 > news >正文

UNH-IOL Reservation 一致性测试用例【7】- 清除Reservation

Reservation 系列导航

UNH-IOL Reservation 一致性测试用例【1】- Reservation Report 命令验证
UNH-IOL Reservation 一致性测试用例【2】- Reservation注册
UNH-IOL Reservation 一致性测试用例【3】- 取消注册
UNH-IOL Reservation 一致性测试用例【4】- Reservation Acquire 验证
UNH-IOL Reservation 一致性测试用例【5】- Reservation Release
UNH-IOL Reservation 一致性测试用例【6】- 抢占 Reservation
UNH-IOL Reservation 一致性测试用例【7】- 清除Reservation
UNH-IOL Reservation 一致性测试用例【8】- 在不同 Reservation Types 下的命令行为
UNH-IOL Reservation 一致性测试用例【9】- Reservation Notification Log Page(LID 0x80)

Test 7.7 – Clearing a Reservation (M, OF-FYI)

作为 Registrant 的 Host 可以通过执行一个 Reservation Release 命令来清除 reservation(强制解除对 namespace 的 reservation,并取消对所有 Registrants 的注册),其中 Reservation Release Action (RRELA) 字段设为 001b (Clear),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key

清除 reservation 时,会发生以下原子操作:

  1. 释放 namespace 上的保留
  2. 所有 registrants 都从 namespace 中注销

Case 1: Basic Operation with Reservation Release Command (M, OF-FYI)

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation
  2. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 active namespace:
      1. Host 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 namespace 的 registrant。
      2. Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前的 reservation key,并将 Reservation Type (RTYPE) 字段设为支持的 reservation type,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. Host 发送 Reservation Release 命令来清除 reservation,其中 Reservation Release Action (RRELA) 字段设为 001b (Clear),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. Host 向 Controller 发送 Reservation Report 命令。
        对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

在 Reservation Report 完成后,检查 Reservation Status data structure, host 成功从该 namespace 取消注册,并不再持有 reservation

注意事项

在支持NVMe 2.0 或以上的版本的 driver 中,当要设置 Host Identifier 时,如果它在测试开始时是非零值,set feature 将被 abort,Status Code 为 Command Sequence Error


Case 2: Error Conditions (M, OF-FYI)

如果 CRKEY 值与 Host 向 namespace 注册时使用的 CRKEY 值不匹配,则应终止命令,状态为 Reservation Conflict。 Host 可通过将命令中的 Ignore Existing Key(IEKEY) 位置为 "1",在不考虑当前 reservation key 值的情况下清除 reservation。

果 Host 不是 Registrant,则应终止该命令,并显示 Reservation Conflict 状态。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation
  2. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 active namespace:
      1. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),并提供一个随机的 reservation key 给 Current Reservation Key (CRKEY)。
      2. Host 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 namespace 的 registrant。
      3. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),并提供一个不是 Host 当前的 reservation key 给 Current Reservation Key (CRKEY)。
      4. Host 向 Controller 发送 Reservation Report 命令。
      5. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),提供一个不是 Host 当前的 reservation key 给 Current Reservation Key (CRKEY),将 IEKEY 置为 1。
      6. Host 向 Controller 发送 Reservation Report 命令。

预期结果

  1. 2.2.1 的 Reservation Release 命令失败,返回状态 Reservation Conflict
  2. 2.2.3 的 Reservation Release 命令失败,返回状态 Reservation Conflict
  3. 2.2.4 Reservation Report 返回的 Reservation Status data structure 表明:Host 依然是该 namespace 的 registrant
  4. 2.2.6 Reservation Report 返回的 Reservation Status data structure 表明:Host 不再是该 namespace 的 registrant,已成功取消注册

注意事项

  1. 在支持NVMe 2.0 或以上的版本的 driver 中,当要设置 Host Identifier 时,如果它在测试开始时是非零值,set feature 将被 abort,Status Code 为 Command Sequence Error
  2. 目前尚未确定进行此项检测的可靠方法。因此,这项测试不应纳入任何行业批准的一致性认定中。

http://www.lryc.cn/news/98339.html

相关文章:

  • Python 生成随机图片验证码
  • 一些有趣的 js 功能函数
  • 摄像头m2dock(MAIX-II DOCK)
  • SpringBoot 如何优雅的进行全局异常处理
  • OSPF路由协议(红茶三杯CCNA)
  • redis中使用bloomfilter判断元素是否存在
  • 互联网医院系统源码实现:打造现代化医疗服务平台
  • 每天100w次登陆请求, 8G 内存该如何设置JVM参数?
  • Fiddler Everywhere(TTP调试抓包工具) for Mac苹果电脑版
  • Paragon NTFS2023最新版Mac读写NTFS磁盘工具
  • vs2013 32位 编译的 dll,重新用vs2022 64位编译,所遇问题记录
  • Linux_CentOS_7.9部署Docker以及镜像加速配置等实操验证全过程手册
  • 强引用和弱引用
  • tp6 实现excel 导入功能
  • 【C++】类和对象(中篇)
  • 大数据处理架构详解:Lambda架构、Kappa架构、流批一体、Dataflow模型、实时数仓
  • 双指针解决n数之和问题
  • 安全学习DAY07_其他协议抓包技术
  • electron的electron-packager打包运行和electron-builder生产安装包过程,学透 Electron 自定义 Dock 图标
  • 【无标题】深圳卫视专访行云创新马洪喜:拥抱AI与云原生,深耕云智一体化创新
  • jenkins通过流水线进行构建jar包
  • Android开发:通过Tesseract第三方库实现OCR
  • 合并两个有序链表——力扣21
  • 企业数据,大语言模型和矢量数据库
  • LabVIEW使用支持向量机对脑磁共振成像进行图像分类
  • kafka面试题
  • 树的遍历(一题直接理解中序、后序、层序遍历,以及树的存储)
  • JVM系统优化实践(22):GC生产环境案例(五)
  • DevOps系列文章 之GitLabCI模板库的流水线
  • spring扩展点ApplicationContextAware解释