linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alain Kalker <a.c.kalker@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH V2] sd: Reduce log level to KERN_NOTICE for missing caching mode page
Date: Mon, 02 Jun 2014 21:08:17 +0200	[thread overview]
Message-ID: <538CCBA1.7060808@gmail.com> (raw)
In-Reply-To: <1401734883-9540-1-git-send-email-a.c.kalker@gmail.com>

On 06/02/2014 08:48 PM, Alain Kalker wrote:
> Reduce the lernel log level to KERN_NOTICE for messages related
> to a missing caching mode page.

There is an open bug report at kernel.org (dating all the way back to 
Linux 2.6.34.1) about this:
Bug 16490 – "Assuming drive cache: write through" messages probably have 
wrong loglevel : https://bugzilla.kernel.org/show_bug.cgi?id=16490

Also, many people are asking questions about this on internet fora, 
submitting bug reports to bugtrackers for their distributions, 
apparently the error log level makes them think their system is 
malfunctioning in some way.

> Reasons why I think this change is justified:
> - The condition is not an error; the existing workaround of assuming
>    a write through cache doesn't limit functionality in any way.
> - It doesn't warrant a warning either: as it is most likely
>    a hardware limitation, there is little that an ordinary user can do
>    about it besides replacing the affected hardware.
>    Making it a warning would still break quiet boot (kernel commandline
>    parameter 'quiet'), and may still trip log monitoring software
>    unneccessarily, either on every boot or whenever an affected
>    external device is plugged in.
> - It should be a notice, for it is a normal but significant condition,
>    as it may impact write performance. This would bring it on par with
>    the log messages in the same function.
>
> Signed-off-by: Alain Kalker <a.c.kalker@gmail.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 efcbcd1..5f0f6c6 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2442,7 +2442,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_NOTICE, sdkp, "No Caching mode page found\n");
>   		goto defaults;
>
>   	Page_found:
> @@ -2489,7 +2489,7 @@ defaults:
>   				"Assuming drive cache: write back\n");
>   		sdkp->WCE = 1;
>   	} else {
> -		sd_first_printk(KERN_ERR, sdkp,
> +		sd_first_printk(KERN_NOTICE, sdkp,
>   				"Assuming drive cache: write through\n");
>   		sdkp->WCE = 0;
>   	}
>

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-06-02 19:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 18:48 [PATCH V2] sd: Reduce log level to KERN_NOTICE for missing caching mode page Alain Kalker
2014-06-02 19:08 ` Alain Kalker [this message]
2014-06-02 19:14 ` James Bottomley
2014-06-02 19:31   ` Alain Kalker
  -- strict thread matches above, loose matches on Subject: below --
2014-06-02 11:51 [PATCH] " Alain Kalker
2014-06-02 12:10 ` [PATCH V2] " Alain Kalker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=538CCBA1.7060808@gmail.com \
    --to=a.c.kalker@gmail.com \
    --cc=JBottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).