public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Erik Andersen <andersen@codepoet.org>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: Simon Turvey <turveysp@ntlworld.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Re: IDE error on 2.4.17
Date: Wed, 27 Feb 2002 03:25:44 -0700	[thread overview]
Message-ID: <20020227102544.GA3226@codepoet.org> (raw)
In-Reply-To: <E16fmJt-0001Xi-00@the-village.bc.nu> <006e01c1bef6$6dd78e40$030ba8c0@mistral> <20020227104735.A29316@ucw.cz>
In-Reply-To: <20020227104735.A29316@ucw.cz>

On Wed Feb 27, 2002 at 10:47:35AM +0100, Vojtech Pavlik wrote:
> That won't help, this indeed is a media error. The drive is heading to
> hell. You have about another six months of life before it goes belly up
> completely.
> 
> Any chance it's one of those fast IBM 30 or 45 gig drives? They seem to
> be dying pretty fast ...

I expect a patch like this would help avoid these sort of
questions...

diff -urN linux/drivers/ide.orig/hd.c linux/drivers/ide/hd.c
--- linux/drivers/ide.orig/hd.c	Mon Oct 15 14:27:42 2001
+++ linux/drivers/ide/hd.c	Wed Feb 27 03:16:16 2002
@@ -201,6 +201,12 @@
 				printk(", sector=%ld", CURRENT->sector);
 		}
 		printk("\n");
+		/* Make sure people realize that very bad things are
+		 * happening, so they can do something about it before
+		 * it is too late... */
+		if (hd_error & ECC_ERR) {
+		    printk("hd%c: You should make a backup, this drive may fail soon!\n", devc);
+		}
 	}
 #else
 	printk("hd%c: %s: status=0x%02x.\n", devc, msg, stat & 0xff);
@@ -209,6 +215,9 @@
 	} else {
 		hd_error = inb(HD_ERROR);
 		printk("hd%c: %s: error=0x%02x.\n", devc, msg, hd_error & 0xff);
+		if (hd_error & ECC_ERR) {
+		    printk("hd%c: You should make a backup, this drive may fail soon!\n", devc);
+		}
 	}
 #endif	/* verbose errors */
 	restore_flags (flags);
diff -urN linux/drivers/ide.orig/ide.c linux/drivers/ide/ide.c
--- linux/drivers/ide.orig/ide.c	Fri Feb 22 16:20:13 2002
+++ linux/drivers/ide/ide.c	Wed Feb 27 03:20:12 2002
@@ -832,6 +832,13 @@
 				if (HWGROUP(drive) && HWGROUP(drive)->rq)
 					printk(", sector=%ld", HWGROUP(drive)->rq->sector);
 			}
+			if (hd_error & ECC_ERR) {
+			    printk("\nhd%c: You should make a backup, this drive may fail soon!", devc);
+			}
+		}
+#else
+		if (drive->media == ide_disk && hd_error & ECC_ERR) {
+		    printk("\nhd%c: You should make a backup, this drive may fail soon!", devc);
 		}
 #endif	/* FANCY_STATUS_DUMPS */
 		printk("\n");
 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

  reply	other threads:[~2002-02-27 10:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-26 17:38 IDE error on 2.4.17 Simon Turvey
2002-02-26 17:58 ` André Dahlqvist
2002-02-26 18:20 ` Mohammad A. Haque
2002-02-26 18:27 ` Alan Cox
2002-02-26 18:50   ` Simon Turvey
2002-02-26 19:01     ` David Rees
2002-02-26 19:12       ` Simon Turvey
2002-02-26 20:48         ` Chris Friesen
2002-02-26 19:10     ` Alan Cox
2002-02-26 19:09       ` Simon Turvey
2002-02-26 20:03     ` Hans-Christian Armingeon
2002-02-26 20:05     ` Skip Ford
2002-02-27  9:47     ` Vojtech Pavlik
2002-02-27 10:25       ` Erik Andersen [this message]
2002-02-27 14:59         ` [PATCH] " Alan Cox
2002-02-27 18:47           ` Jan Niehusmann
2002-02-27 18:53             ` Andre Hedrick
2002-02-27 19:26               ` Jan Niehusmann
2002-02-27 19:54             ` Chris Friesen

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=20020227102544.GA3226@codepoet.org \
    --to=andersen@codepoet.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=turveysp@ntlworld.com \
    --cc=vojtech@suse.cz \
    /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