nvmet: set WZDS and DRB if device enables unmap write zeroes operation
authorZhang Yi <yi.zhang@huawei.com>
Thu, 19 Jun 2025 11:18:00 +0000 (19:18 +0800)
committerChristian Brauner <brauner@kernel.org>
Mon, 23 Jun 2025 10:45:13 +0000 (12:45 +0200)
commit50634366de8629fdb96c5dd7ea595f9b61835dfc
tree1b67de95984644c344f08bc452a7505c7ae0d16e
parent545fb46e5bc6ffaa303181bd3878db506a0f0fa6
nvmet: set WZDS and DRB if device enables unmap write zeroes operation

Set the WZDS and DRB bits to the namespace dlfeat if the underlying
block device enables the unmap write zeroes operation, make the nvme
target device supports the unmap write zeroes command.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://lore.kernel.org/20250619111806.3546162-4-yi.zhang@huaweicloud.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
drivers/nvme/target/io-cmd-bdev.c