Commit dc335a99 authored by Mike Christie's avatar Mike Christie Committed by Martin K. Petersen

scsi: tcmu: unmap if dev is configured

The tcmu dev is added to the list of tcmu devices during configuration.  At
this time the tcmu setup has completed, but lio core has not completed its
setup. The device is not yet usable so do not try to unmap blocks from it
Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a30b0473
......@@ -2581,6 +2581,11 @@ static void find_free_blocks(void)
list_for_each_entry(udev, &root_udev, node) {
mutex_lock(&udev->cmdr_lock);
if (!target_dev_configured(&udev->se_dev)) {
mutex_unlock(&udev->cmdr_lock);
continue;
}
/* Try to complete the finished commands first */
tcmu_handle_completions(udev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment