scsi: target: Detect UNMAP support post configuration
authorMike Christie <michael.christie@oracle.com>
Tue, 28 Jun 2022 20:02:30 +0000 (15:02 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Jul 2022 20:53:53 +0000 (16:53 -0400)
commit34bd1dcacf0dd86ab8c35f703bc237723fee354c
treeee24bed56d02547cf85e16f3b11d7a9efe74c5bb
parent33efaaf6e24b68c15e08a12477c8610b5e1334d7
scsi: target: Detect UNMAP support post configuration

On our backend we can do something similar to LIO where we can enable and
disable UNMAP support on the fly. In the SCSI/block layer we can detect
this by just doing a rescan. However, LIO cannot detect this change because
we only check during the initial configuration. This patch allows UNMAP
detection to also happen when the user tries to turn it on.

Link: https://lore.kernel.org/r/20220628200230.15052-6-michael.christie@oracle.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_configfs.c