Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2013 10:40:47 -0700
From:      Dieter BSD <dieterbsd@gmail.com>
To:        freebsd-amd64@freebsd.org
Subject:   Re: amd64/180894: rm -rf causes kernel panic
Message-ID:  <CAA3ZYrCD8=rfY3BBdNqB9fK3Yg8afsn3qUX5rcNMW-fBoDkOag@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
David writes:
> I also don't think it's reasonable for the kernel to bomb
> when it encounters corruption on a disk.

Agreed. Perhaps do a forced umount of the fs to prevent further
damage (and send a message to syslog), but processes not using that
fs should not be impacted. (For example, those processes might be
logging data that will not be available again.)

> The trouble is that it's tricky to test properly without finding a
> good way to corrupt the link count :-)

Doesn't sound tooooo hard.  Find a scratch partition, newfs a fs.
Make a few directories. Umount. Find a disk sector in that partition
with inodes for one of the directories.  Edit the link count for
a directory, write the sector out to disk.  Optional: fsck -p
to verify the problem.  Mount the fs.  Test your fix.

This problem is, of course, not limited to a bad link count.
There are lots of problems with a fs, disk, whatever,
that cause a panic but shouldn't.  :-(



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAA3ZYrCD8=rfY3BBdNqB9fK3Yg8afsn3qUX5rcNMW-fBoDkOag>