REQ_OP_FLUSH:调用nvme_setup_flush配置 flush 命令。 REQ_OP_ZONE_RESET_ALL、REQ_OP_ZONE_RESET、REQ_OP_ZONE_OPEN、REQ_OP_ZONE_CLOSE和REQ_OP_ZONE_FINISH:调用nvme_setup_zone_mgmt_send配置 zone 管理命令。 REQ_OP_WRITE_ZEROES:调用nvme_setup_write_zeroes配置写零命令。 REQ_OP_DISCARD:调用nvme_...
set_capacity(disk, le64_to_cpup(&id->nsze) << (ns->lba_shift - 9)); /* 如果此nvme盘支持discard操作,则设置discard的一些初始参数,如discard必须以物理sector大小对齐 */ if (dev->oncs & NVME_CTRL_ONCS_DSM) nvme_config_discard(ns); return ns; out_free_queue: blk_cleanup_queue(ns-...
return 0; } Nvme_setup_prp_pools用来创建dma时所用的内存池,prp_page_pool是虚拟内核地址, static int nvme_setup_prp_pools(structnvme_dev *dev) { struct device *dmadev = &dev->pci_dev->dev; dev->prp_page_pool = dma_pool_create("prp listpage", dmadev, PAGE_SIZE,PAGE_SIZE, 0); if...
if (result)goto put_pci;result = nvme_setup_prp_pools(dev);//设置dma需要的prp内存池。if (result)goto release;kref_init(&dev->kref);result = nvme_dev_start(dev);//创建admin queue、 io queue 、request irqif (result)goto release_pools;if (dev->online_queues > 1)result = nvme_dev_...
}/*初始化nvme的io queue,此为nvme_queue,一个nvme设备至少一个admin queue,一个io queue*/result=nvme_setup_io_queues(dev);if(result && result != -EBUSY)gotodisable;returnresult; disable: nvme_disable_queue(dev,0); nvme_dev_list_remove(dev); ...
The drive must support Deallocate (Trim/Unmap/Discard) command. The test will send down Deallocate commands using DATA SET MANAGEMENT Trim command. Ensure that there is a separate drive available to be used as a logger drive. The test will automatically pick the logging drive. It is important...
@@ -813,6 +813,30 @@ static blk_status_t nvme_setup_discard(struct nvme_ns *ns, struct request *req, return BLK_STS_OK; }static void nvme_set_ref_tag(struct nvme_ns *ns, struct nvme_command *cmnd, struct request *req)
If you get the error message "The test drive does not support trim/unmap/deallocate/discard", try the following: Check the NVMe drive to make sure the VPD B2h page's LBPU bit is set to one. Try to send a Deallocate command via DATA SET MANAGEMENT's Trim command. Run the test a...
如表2-3所示,当以用户权限进入BIOS Setup后,仅支持对以下选项进行设置。 表2-3 用户权限可设置选项 一级菜单 子选项 Security User Password Save & Exit Save Changes and Exit Discard Changes and Exit Save Changes and Reset Discard Changes and Reset Save Changes Discard Changes 2.8.2 密码...
ERF_ASYNC_PROC, (void *)((longdev), NULL); break; case FIODISCARDGET: *(int *)pArg = 1; break; case FIODISCARD: { struct nvme_dsm_range* dsm_range = (struct nvme__range)ns->dsmBuf; SECTORRANGE * pSector = SECTOR_RANGE*)pArg; if (-...