diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2020-03-30 23:10:13 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2020-09-02 08:48:50 +0200 |
commit | 69265150aa53f0e1dbc85809800df40ffc9e7d67 (patch) | |
tree | 3fdaadd397b154bdbcdf3eaf3b15490c97b53d2e /hw/block | |
parent | e137d20e7dfff00d0662b3d2d256e9c92f7a7f4a (diff) | |
download | qemu-69265150aa53f0e1dbc85809800df40ffc9e7d67.zip qemu-69265150aa53f0e1dbc85809800df40ffc9e7d67.tar.gz qemu-69265150aa53f0e1dbc85809800df40ffc9e7d67.tar.bz2 |
hw/block/nvme: be consistent about zeros vs zeroes
The NVM Express specification generally uses 'zeroes' and not 'zeros',
so let us align with it.
Cc: Fam Zheng <fam@euphon.net>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/nvme.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 30b42e2..20cb174 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -631,7 +631,7 @@ static uint16_t nvme_flush(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd, return NVME_NO_COMPLETE; } -static uint16_t nvme_write_zeros(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd, +static uint16_t nvme_write_zeroes(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd, NvmeRequest *req) { NvmeRwCmd *rw = (NvmeRwCmd *)cmd; @@ -731,8 +731,8 @@ static uint16_t nvme_io_cmd(NvmeCtrl *n, NvmeCmd *cmd, NvmeRequest *req) switch (cmd->opcode) { case NVME_CMD_FLUSH: return nvme_flush(n, ns, cmd, req); - case NVME_CMD_WRITE_ZEROS: - return nvme_write_zeros(n, ns, cmd, req); + case NVME_CMD_WRITE_ZEROES: + return nvme_write_zeroes(n, ns, cmd, req); case NVME_CMD_WRITE: case NVME_CMD_READ: return nvme_rw(n, ns, cmd, req); @@ -2352,7 +2352,7 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev) id->sqes = (0x6 << 4) | 0x6; id->cqes = (0x4 << 4) | 0x4; id->nn = cpu_to_le32(n->num_namespaces); - id->oncs = cpu_to_le16(NVME_ONCS_WRITE_ZEROS | NVME_ONCS_TIMESTAMP | + id->oncs = cpu_to_le16(NVME_ONCS_WRITE_ZEROES | NVME_ONCS_TIMESTAMP | NVME_ONCS_FEATURES); subnqn = g_strdup_printf("nqn.2019-08.org.qemu:%s", n->params.serial); |