diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-10-18 15:45:06 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-19 21:40:51 +0300 |
commit | 9c3d29296fe4c297447d2055e7a9535c981a8370 (patch) | |
tree | 025c1b3d839589d2a52b1bac30a24f890d33db40 /drivers/nvme/host/zns.c | |
parent | 86d46fdaa12ae5befc16b8d73fc85a3ca0399ea6 (diff) | |
download | linux-9c3d29296fe4c297447d2055e7a9535c981a8370.tar.xz |
nvme: move command clear into the various setup helpers
We don't have to worry about doing extra memsets by moving it outside
the protection of RQF_DONTPREP, as nvme doesn't do partial completions.
This is in preparation for making the read/write fast path not do a full
memset of the command.
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/zns.c')
-rw-r--r-- | drivers/nvme/host/zns.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/zns.c b/drivers/nvme/host/zns.c index d95010481fce..bfc259e0d7b8 100644 --- a/drivers/nvme/host/zns.c +++ b/drivers/nvme/host/zns.c @@ -233,6 +233,8 @@ out_free: blk_status_t nvme_setup_zone_mgmt_send(struct nvme_ns *ns, struct request *req, struct nvme_command *c, enum nvme_zone_mgmt_action action) { + memset(c, 0, sizeof(*c)); + c->zms.opcode = nvme_cmd_zone_mgmt_send; c->zms.nsid = cpu_to_le32(ns->head->ns_id); c->zms.slba = cpu_to_le64(nvme_sect_to_lba(ns, blk_rq_pos(req))); |