Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936657AbcJQRT3 (ORCPT ); Mon, 17 Oct 2016 13:19:29 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36853 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936277AbcJQRTU (ORCPT ); Mon, 17 Oct 2016 13:19:20 -0400 Subject: Re: [PATCH] sd: assign appropriate log level From: James Bottomley To: David Singleton , "Martin K. Petersen" Cc: Shikhar Dogra , xe-kernel@external.cisco.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 17 Oct 2016 10:19:10 -0700 In-Reply-To: <20161017165108.29718-4-davsingl@cisco.com> References: <20161017165108.29718-4-davsingl@cisco.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16101717-8235-0000-0000-000009694B05 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005929; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000187; SDB=6.00769407; UDB=6.00368617; IPR=6.00545820; BA=6.00004812; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013018; XFM=3.00000011; UTC=2016-10-17 17:19:17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16101717-8236-0000-0000-000035B57E28 Message-Id: <1476724750.2734.20.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-17_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610170298 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2011 Lines: 62 On Mon, 2016-10-17 at 09:51 -0700, David Singleton wrote: > From: Shikhar Dogra > > 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@external.cisco.com > Signed-off-by: Shikhar Dogra > Signed-off-by: David Singleton > --- > 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; > }