bdev/nvme: account for ACWU values being 0-based
ACWU and NACWU are 0-based values. But spdk_bdev_get_acwu() specifies the compare-and-write-unit in terms of blocks (i.e. 1-based). So the bdev/nvme module needs to add 1 to this value before registering the bdev. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I7c19975a2bd8c09bb65374838fe20aad690d1ecf Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12384 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
370df805b2
commit
ab9c7a6a81
@ -2847,9 +2847,9 @@ nvme_disk_create(struct spdk_bdev *disk, const char *base_name,
|
||||
SPDK_NVME_CTRLR_COMPARE_AND_WRITE_SUPPORTED)) {
|
||||
disk->acwu = 0;
|
||||
} else if (nsdata->nsfeat.ns_atomic_write_unit) {
|
||||
disk->acwu = nsdata->nacwu;
|
||||
disk->acwu = nsdata->nacwu + 1; /* 0-based */
|
||||
} else {
|
||||
disk->acwu = cdata->acwu;
|
||||
disk->acwu = cdata->acwu + 1; /* 0-based */
|
||||
}
|
||||
|
||||
disk->ctxt = ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user