[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1476724750.2734.20.camel@linux.vnet.ibm.com>
Date: Mon, 17 Oct 2016 10:19:10 -0700
From: James Bottomley <jejb@...ux.vnet.ibm.com>
To: David Singleton <davsingl@...co.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Shikhar Dogra <shidogra@...co.com>, xe-kernel@...ernal.cisco.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sd: assign appropriate log level
On Mon, 2016-10-17 at 09:51 -0700, David Singleton wrote:
> From: Shikhar Dogra <shidogra@...co.com>
>
> Reduce chatter on console for usb hotplug.
> KERN_ERR is too high severity for these messages, moving them
> to KERN_WARNING
It's an error because we have several USB to IDE bridges that have
write back cache drives but report nothing to the caching mode page.
For them this is a serious error because their data integrity is at
risk. I'm open to other ways to fix your problem, but downgrading the
message severity because *you* don't have an issue would mask the
problem for others, so it's not really viable.
> USB devices never have a Caching Mode page, it doesn't make
> sense to make it an error when you have tons of USB devices where
> the print is useless, and not an error.
>
> For second message, the condition is not an error. The existing
> workaround of assuming a write through cache doesn't limit
> functionality in any way.
Yes, it does if the cache is actually write back ...
James
> Cc: xe-kernel@...ernal.cisco.com
> Signed-off-by: Shikhar Dogra <shidogra@...co.com>
> Signed-off-by: David Singleton <davsingl@...co.com>
> ---
> drivers/scsi/sd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 51e5629..ab7bfe3 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2540,7 +2540,7 @@ sd_read_cache_type(struct scsi_disk *sdkp,
> unsigned char *buffer)
> }
> }
>
> - sd_first_printk(KERN_ERR, sdkp, "No Caching mode
> page found\n");
> + sd_first_printk(KERN_WARNING, sdkp, "No Caching mode
> page found\n");
> goto defaults;
>
> Page_found:
> @@ -2594,7 +2594,7 @@ sd_read_cache_type(struct scsi_disk *sdkp,
> unsigned char *buffer)
> "Assuming drive cache: write
> back\n");
> sdkp->WCE = 1;
> } else {
> - sd_first_printk(KERN_ERR, sdkp,
> + sd_first_printk(KERN_WARNING, sdkp,
> "Assuming drive cache: write
> through\n");
> sdkp->WCE = 0;
> }
Powered by blists - more mailing lists