[linux-lvm] reiserfs panic

Chris Mason mason at suse.com
Fri Nov 30 07:55:03 UTC 2001


On Friday, November 30, 2001 10:24:23 AM +0000 Patrick Caulfield
<patrick at tykepenguin.com> wrote:

> I'm posting this here partly because I hope Chris Mason is reading(!) and
> partly because it may be of some use to others on the list.

;-)

> 
> There seems to be a problem when reading from a deactivated snapshot of a
> reiserfs volume that causes a panic.
> 
> The problem is caused by the fact that when a snapshot becomes full, LVM
> returns I/O errors for the volume and when reiserfs hits an I/O error it
> panics.
> 
> The solution is, of course, to make your snapshots large enough that this
> never happens :-) but just in case this is not possible the following patch
> may be of use:
> 
> 
> diff -u fs/reiserfs/namei.c.orig fs/reiserfs/namei.c
> --- fs/reiserfs/namei.c.orig    Thu Nov 29 16:13:28 2001
> +++ fs/reiserfs/namei.c Thu Nov 29 16:34:49 2001
> @@ -320,9 +320,10 @@
>  
>      while (1) {
>         retval = search_by_entry_key (dir->i_sb, &key_to_search,
> path_to_entry, de); -       if (retval == IO_ERROR)
> +       if (retval == IO_ERROR) 
> +           return NAME_NOT_FOUND;

The problem here is that NAME_NOT_FOUND does not mean error.  It means it is
safe to insert something with that name, which isn't what we want.  For
snapshots though, it will work fine.

Now that 2.5.x is out I expect more of these to get cleaned up, and I'm
workin on patches to turn reiserfs_panic into a forced readonly mount.

-chris





More information about the linux-lvm mailing list