git: 1f83483d7392 - main - ctl_backend_block: Correct value of NVME nsdata nuse field
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 10 May 2024 16:41:43 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=1f83483d73924de5fa2d5915676f6b2cd350d986
commit 1f83483d73924de5fa2d5915676f6b2cd350d986
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-05-10 16:09:53 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-05-10 16:13:40 +0000
ctl_backend_block: Correct value of NVME nsdata nuse field
Reported by: Coverity Scan
CID: 1545043
Sponsored by: Chelsio Communications
---
sys/cam/ctl/ctl_backend_block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
index 714ed57b5652..55a5ce0d047a 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -1339,7 +1339,7 @@ ctl_be_block_namespace_data(struct ctl_be_block_lun *be_lun,
memset(nsdata, 0, sizeof(*nsdata));
nsdata->nsze = htole64(be_lun->size_blocks);
nsdata->ncap = nsdata->nsze;
- nsdata->nuse = nsdata->nuse;
+ nsdata->nuse = nsdata->nsze;
nsdata->nlbaf = 1 - 1;
nsdata->dlfeat = NVMEM(NVME_NS_DATA_DLFEAT_DWZ) |
NVMEF(NVME_NS_DATA_DLFEAT_READ, NVME_NS_DATA_DLFEAT_READ_00);