Skip to content

Commit

Permalink
scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice
Browse files Browse the repository at this point in the history
The only user of scsi_prep_async_scan() is scsi_scan_host() and it
handles the situation correctly. Move 'called twice' reporting to debug
level as well.

The issue is observed on Hyper-V: on any device add/remove event storvsc
driver calls scsi_scan_host() and in case previous scan is still running
we get the message and stack dump on console.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Vitaly Kuznetsov authored and Martin K. Petersen committed Nov 12, 2015
1 parent abc01f7 commit a4cf30e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
@@ -1713,8 +1713,7 @@ static struct async_scan_data *scsi_prep_async_scan(struct Scsi_Host *shost)
return NULL;

if (shost->async_scan) {
shost_printk(KERN_INFO, shost, "%s called twice\n", __func__);
dump_stack();
shost_printk(KERN_DEBUG, shost, "%s called twice\n", __func__);
return NULL;
}

0 comments on commit a4cf30e

Please sign in to comment.