Skip to contentSkip to conversation

sd: Reduce log level to KERN_NOTICE for missing caching mode page

PATCH Superseded Alain Kalker 1 participant 3 messages Jun 2, 2014 SCSI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sd: Reduce log level to KERN_NOTICE for missing caching mode page

Reduce the lernel log level to KERN_NOTICE for messages related to a missing caching mode page.

Reasons why I think this change is justified:
- The condition is non-fatal; the existing workaround assumes a write through cache. Although this reduces write performance, it doesn't limit functionality in any way.
- The current log level suggests that immediate action is required, however, as it is a hardware limitation, there is nothing much the user can do about it besides replacing the affected hardware.
- The current situation breaks quiet boot (kernel commandline parameter 'quiet'), and may trip log monitoring software unneccessarily, either on every boot or whenever an affected external device is plugged in.

---
 drivers/scsi/sd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/sd.c +2 -2
index efcbcd1..5f0f6c6 100644
@@ -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;
 	}
Signature · 1 line
2.0.0
#1 lore raw
Quoted 11 lines · Alain Kalker

Reduce the lernel log level to KERN_NOTICE for messages related to a missing caching mode page.

Reasons why I think this change is justified:
- The condition is non-fatal; the existing workaround assumes a write through cache. Although this reduces write performance, it doesn't limit functionality in any way.
- The current log level suggests that immediate action is required, however, as it is a hardware limitation, there is nothing much the user can do about it besides replacing the affected hardware.

whoops, confused that one with KERN_ALERT, sorry about that.

Will reword, rebase and repost.

Quoted 6 lines

- The current situation breaks quiet boot (kernel commandline parameter 'quiet'), and may trip log monitoring software unneccessarily, either on every boot or whenever an affected external device is plugged in.

#2 lore raw

PATCH v2 1/1 sd: Reduce log level to KERN_NOTICE for missing caching mode page

Reduce the lernel log level to KERN_NOTICE for messages related to a missing caching mode page.

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.

---
 drivers/scsi/sd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/sd.c +2 -2
index efcbcd1..5f0f6c6 100644
@@ -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;
 	}
Signature · 1 line
2.0.0