]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jan 2023 10:26:24 +0000 (11:26 +0100)
commit8decc88d9a8221a6815dc3633084967b2aa01b52
treec7760d9dd003dceb749a84b50b2bfc99550dbc8a
parent235cc9ae7b94a2c33359b05c8a44bcf7cf7488ef
nvmet: don't defer passthrough commands with trivial effects to the workqueue

[ Upstream commit 2a459f6933e1c459bffb7cc73fd6c900edc714bd ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/target/passthru.c