]> asedeno.scripts.mit.edu Git - linux.git/commit
nvme: check admin passthru command effects
authorKeith Busch <keith.busch@intel.com>
Tue, 7 Nov 2017 17:28:32 +0000 (10:28 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Nov 2017 02:53:25 +0000 (19:53 -0700)
commit84fef62d135b6e47b52f4e9280b5dbc5bb0050ba
tree29e9c39af11ab36f064742b8f15d3b8f8632dc59
parentc627c487ec727350c6aaa1cf217b666099e83ee2
nvme: check admin passthru command effects

The NVMe standard provides a command effects log page so the host may
be aware of special requirements it may need to do for a particular
command. For example, the command may need to run with IO quiesced to
prevent timeouts or undefined behavior, or it may change the logical block
formats that determine how the host needs to construct future commands.

This patch saves the nvme command effects log page if the controller
supports it, and performs appropriate actions before and after an admin
passthrough command is completed. If the controller does not support the
command effects log page, the driver will define the effects for known
opcodes. The nvme format and santize are the only commands in this patch
with known effects.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
include/linux/nvme.h