Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 21:34:20 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Kirk McKusick <mckusick@beastie.mckusick.com>
Cc:        Kris Kennaway <kris@obsecurity.org>, Robert Watson <rwatson@tislabs.com>, fs@FreeBSD.ORG
Subject:   Re: panic: ffs_vfree: range: dev = ad4s1c, ino = -1690809896, fs = /mnt2 
Message-ID:  <Pine.BSF.4.21.0212052133000.38887-100000@InterJet.elischer.org>
In-Reply-To: <200212060135.gB61Zk59092119@beastie.mckusick.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is one of the reasons that I think such fields should all be
defined as unsigned to start with..


On Thu, 5 Dec 2002, Kirk McKusick wrote:

> Well it is not at all clear how the dirpref routine came up with
> such an out of whack inode preference (2604157400 when the filesystem
> has only 3538944 inodes), but the following fix should catch it and
> make it harmless. I have submitted the patch to release engineering.
> 
> 	Kirk McKusick
> 
> =-=-=-=-=
> 
> Index: ffs_alloc.c
> ===================================================================
> RCS file: /usr/ncvs/src/sys/ufs/ffs/ffs_alloc.c,v
> retrieving revision 1.102
> diff -c -r1.102 ffs_alloc.c
> *** ffs_alloc.c	2002/09/19 03:55:30	1.102
> --- ffs_alloc.c	2002/12/06 01:15:50
> ***************
> *** 841,847 ****
>   		ipref = ffs_dirpref(pip);
>   	else
>   		ipref = pip->i_number;
> ! 	if (ipref >= fs->fs_ncg * fs->fs_ipg)
>   		ipref = 0;
>   	cg = ino_to_cg(fs, ipref);
>   	/*
> --- 841,847 ----
>   		ipref = ffs_dirpref(pip);
>   	else
>   		ipref = pip->i_number;
> ! 	if ((unsigned)ipref >= fs->fs_ncg * fs->fs_ipg)
>   		ipref = 0;
>   	cg = ino_to_cg(fs, ipref);
>   	/*
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0212052133000.38887-100000>