diff mbox

[Wily,SRU] scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice

Message ID 1447982129-22329-1-git-send-email-tim.gardner@canonical.com
State New
Headers show

Commit Message

Tim Gardner Nov. 20, 2015, 1:15 a.m. UTC
From: Vitaly Kuznetsov <vkuznets@redhat.com>

BugLink: http://bugs.launchpad.net/bugs/1517942

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>
(cherry picked from commit a4cf30e15ccea82a07fa5870e8af787b9ea1a672)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 drivers/scsi/scsi_scan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Kamal Mostafa Nov. 20, 2015, 4:32 p.m. UTC | #1
Harmless.

 -Kamal
Brad Figg Nov. 23, 2015, 5:25 p.m. UTC | #2
On Thu, Nov 19, 2015 at 06:15:29PM -0700, tim.gardner@canonical.com wrote:
> From: Vitaly Kuznetsov <vkuznets@redhat.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1517942
> 
> 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>
> (cherry picked from commit a4cf30e15ccea82a07fa5870e8af787b9ea1a672)
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  drivers/scsi/scsi_scan.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> index f9f3f82..01ad016 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -1712,8 +1712,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;
>  	}
>  
> -- 
> 1.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Good cherry-pick
Kamal Mostafa Nov. 23, 2015, 5:30 p.m. UTC | #3

diff mbox

Patch

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index f9f3f82..01ad016 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1712,8 +1712,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;
 	}