Subject: Re: LFS panic
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Konrad Schroder <perseant@hhhh.org>
List: current-users
Date: 02/07/2003 14:12:58
On Fri, 7 Feb 2003, Manuel Bouyer wrote:

> lfs_updatemeta: negative bytes (segment 4194303 short by 8192)
> lfs_updatemeta: ino 383, lbn 12, addr=0xfffffffe
> lfs_updatemeta: ndupino=0

addr can't be negative in the section that produces this code, but that
sure looks negative---so this is probably another 64-bit daddr_t bug.
I'll try to take a look at this this evening, but if you want to try
something in the meantime, maybe this will do the trick:

Index: ufs_bmap.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ufs/ufs_bmap.c,v
retrieving revision 1.18
diff -u -r1.18 ufs_bmap.c
--- ufs_bmap.c	2003/01/24 21:55:30	1.18
+++ ufs_bmap.c	2003/02/07 22:08:55
@@ -233,7 +233,7 @@
 	if (bp)
 		brelse(bp);

-	daddr = blkptrtodb(ump, daddr);
+	daddr = blkptrtodb(ump, (int32_t)daddr); /* XXX ondisk32 */
 	*bnp = daddr == 0 ? -1 : daddr;
 	return (0);
 }

						Konrad Schroder
						perseant@hhhh.org