bdev/nvme: Refer controller's flag directly when setting acwu of disk
This is a preparation for the next patch. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I20f7b03e15fe8cc74b22ff46040a4eba9cc63231 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5648 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
17a4826687
commit
6a76176a67
@ -1148,7 +1148,8 @@ nvme_bdev_create(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, struct nvme_bdev_ns *n
|
||||
}
|
||||
}
|
||||
|
||||
if (!bdev_nvme_io_type_supported(bdev, SPDK_BDEV_IO_TYPE_COMPARE_AND_WRITE)) {
|
||||
if (!(spdk_nvme_ctrlr_get_flags(ctrlr) &
|
||||
SPDK_NVME_CTRLR_COMPARE_AND_WRITE_SUPPORTED)) {
|
||||
bdev->disk.acwu = 0;
|
||||
} else if (nsdata->nsfeat.ns_atomic_write_unit) {
|
||||
bdev->disk.acwu = nsdata->nacwu;
|
||||
|
Loading…
Reference in New Issue
Block a user