Re: linux-kernel-digest V1 #118

Theodore Ts'o (
Wed, 19 Jul 1995 16:22:42 +0200

From: (Rob Janssen reading Linux mailinglist)
Date: Tue, 18 Jul 1995 09:18:15 +0200 (MET DST)

Resilience to disk errors certainly isn't Linux's best point...
I while ago I had some bad sectors on my SCSI disk (which does not have
automatic re-allocation of those bad sectors), and it was quite difficult
to recover from that.

It would be nice to allow filesystems to automatically move bad sectors
to the bad block list, and possibly rewrite a block buffer to a newly
reallocated block when it is discovered that a newly allocated block is
bad. This would probably require a callback from the device driver to
the filesystem layer to notify the filesystem that a particular block is

It's not done yet; but it would be a good thing to do.

It would be nice if you could get the messages printed on a fixed device
directly by the kernel, so that you could send them to the first console
(instead of the current one), to a terminal on a serial port, to a
printer, etc. That would make them less dependent on complex stuff like
syslogd and X.

This doesn't require kernel changes; you just need to make source
changes to klogd. This would work in most cases, where process
scheduling is still working. It certainly works in the disk i/o error
case mentioned above; you just have to instruct klogd to write kernel
log messages to a device, instead of or in addition to forwarding the
kernel message to syslogd.

In the case where I'm doing kernel work, and where I'm afraid a device
driver bug that I'm working on might cause the system to hang at the
interrupt level, i generally avoid working using X11 at all; I'll then
kill off klogd, or run klogd -c 8, so that all kernel messages go to the
current console, where I'm guaranteed to get the message even if the
system is hung.

- Ted