]> git.baikalelectronics.ru Git - kernel.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)
commit13329f5e27492a01ba37907262b73e1e88a735bf
tree29e9c39af11ab36f064742b8f15d3b8f8632dc59
parent754ea2d3fe08223a9dfdcae0df5199b50718307d
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