Making error-reporting bit friendier

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Fri, 4 Apr 1997 18:10:45 +0200


Hi!

This thing is pretty little patch that makes blk.h write device_name
when reporting I/O error. I think it would be very nice to include in
official kernel as it makes error reporting a bit friendier, and costs
only few bytes...

Pavel

--- /usr/src/linux/include/linux/blk.h Thu Apr 3 18:57:39 1997
+++ blk.h Fri Apr 4 18:04:20 1997
@@ -444,8 +455,13 @@

req->errors = 0;
if (!uptodate) {
+#ifdef DEVICE_NAME
+ printk("end_request: I/O error, dev %s (%s), sector %lu\n",
+ kdevname(req->rq_dev), DEVICE_NAME, req->sector);
+#else
printk("end_request: I/O error, dev %s, sector %lu\n",
kdevname(req->rq_dev), req->sector);
+#endif
if ((bh = req->bh) != NULL) {
nsect = bh->b_size >> 9;
req->nr_sectors--;