nvmet: don't defer passthrough commands with trivial effects to the workqueue
authorChristoph Hellwig <hch@lst.de>
Wed, 21 Dec 2022 08:51:19 +0000 (09:51 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 28 Dec 2022 16:26:18 +0000 (06:26 -1000)
commit2a459f6933e1c459bffb7cc73fd6c900edc714bd
tree163b559700f4abbf1ba629d465828fba3ece715c
parentf2d1421391bba0b15684d2379a47a089f0e561d0
nvmet: don't defer passthrough commands with trivial effects to the workqueue

Mask out the "Command Supported" and "Logical Block Content Change" bits
and only defer execution of commands that have non-trivial effects to
the workqueue for synchronous execution.  This allows to execute admin
commands asynchronously on controllers that provide a Command Supported
and Effects log page, and will keep allowing to execute Write commands
asynchronously once command effects on I/O commands are taken into
account.

Fixes: c1fef73f793b ("nvmet: add passthru code to process commands")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
drivers/nvme/target/passthru.c