]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nvme: fold nvme_config_discard() into nvme_update_disk_info()
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 27 Feb 2026 20:23:47 +0000 (13:23 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 27 Mar 2026 14:35:04 +0000 (07:35 -0700)
commit9110b85244f142ca4bcaea27be408c778d3c48d0
treef2626d5ca7e24252cbbf1a09a0fd3a7929f5be30
parentac61e869bef13a43d624893559acbac3a4e2a341
nvme: fold nvme_config_discard() into nvme_update_disk_info()

The choice of what queue limits are set in nvme_update_disk_info() vs.
nvme_config_discard() seems a bit arbitrary. A subsequent commit will
compute the discard_granularity limit using struct nvme_id_ns, which is
only passed to nvme_update_disk_info() currently. So move the logic in
nvme_config_discard() to nvme_update_disk_info(). Replace several
instances of ns->ctrl in nvme_update_disk_info() with the ctrl variable
brought from nvme_config_discard().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c