* [PATCH] sd: use consistant printk prefixes
@ 2006-01-06 17:00 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2006-01-06 17:00 UTC (permalink / raw)
To: jejb; +Cc: linux-kernel
Always use the gendisk name as prink prefix as we already do in most
places. This makes the messages a lot more readable, especially during
bootup where sd is quite verbose.
Index: scsi-misc-2.6/drivers/scsi/sd.c
===================================================================
--- scsi-misc-2.6.orig/drivers/scsi/sd.c 2005-12-16 16:14:35.000000000 +0100
+++ scsi-misc-2.6/drivers/scsi/sd.c 2006-01-06 17:52:58.000000000 +0100
@@ -298,7 +298,8 @@
*/
if (sdp->sector_size == 1024) {
if ((block & 1) || (rq->nr_sectors & 1)) {
- printk(KERN_ERR "sd: Bad block number requested");
+ printk(KERN_ERR "%s: Bad block number requested",
+ disk->disk_name);
return 0;
} else {
block = block >> 1;
@@ -307,7 +308,8 @@
}
if (sdp->sector_size == 2048) {
if ((block & 3) || (rq->nr_sectors & 3)) {
- printk(KERN_ERR "sd: Bad block number requested");
+ printk(KERN_ERR "%s: Bad block number requested",
+ disk->disk_name);
return 0;
} else {
block = block >> 2;
@@ -316,7 +318,8 @@
}
if (sdp->sector_size == 4096) {
if ((block & 7) || (rq->nr_sectors & 7)) {
- printk(KERN_ERR "sd: Bad block number requested");
+ printk(KERN_ERR "%s: Bad block number requested",
+ disk->disk_name);
return 0;
} else {
block = block >> 3;
@@ -333,7 +336,8 @@
SCpnt->cmnd[0] = READ_6;
SCpnt->sc_data_direction = DMA_FROM_DEVICE;
} else {
- printk(KERN_ERR "sd: Unknown command %lx\n", rq->flags);
+ printk(KERN_ERR "%s: Unknown command %lx\n",
+ disk->disk_name, rq->flags);
/* overkill panic("Unknown sd command %lx\n", rq->flags); */
return 0;
}
@@ -703,7 +707,8 @@
break;
}
- if (res) { printk(KERN_WARNING "FAILED\n status = %x, message = %02x, "
+ if (res) {
+ printk(KERN_WARNING "FAILED\n status = %x, message = %02x, "
"host = %d, driver = %02x\n ",
status_byte(res), msg_byte(res),
host_byte(res), driver_byte(res));
@@ -1267,8 +1272,7 @@
mb -= sz - 974;
sector_div(mb, 1950);
- printk(KERN_NOTICE "SCSI device %s: "
- "%llu %d-byte hdwr sectors (%llu MB)\n",
+ printk(KERN_NOTICE "%s: %llu %d-byte hdwr sectors (%llu MB)\n",
diskname, (unsigned long long)sdkp->capacity,
hard_sector, (unsigned long long)mb);
}
@@ -1429,9 +1433,8 @@
ct = sdkp->RCD + 2*sdkp->WCE;
- printk(KERN_NOTICE "SCSI device %s: drive cache: %s\n",
+ printk(KERN_NOTICE "%s: drive cache: %s\n",
diskname, types[ct]);
-
return;
}
@@ -1688,7 +1691,7 @@
return; /* this can happen */
if (sdkp->WCE) {
- printk(KERN_NOTICE "Synchronizing SCSI cache for disk %s: \n",
+ printk(KERN_NOTICE "%s: Synchronizing disk cache\n",
sdkp->disk->disk_name);
sd_sync_cache(sdp);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-06 17:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-06 17:00 [PATCH] sd: use consistant printk prefixes Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox