Subject: kern/18974: LFS panic "lfs_writefile: more than one fragment!"
To: None <gnats-bugs@gnats.netbsd.org>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 11/09/2002 01:36:45
>Number:         18974
>Category:       kern
>Synopsis:       LFS panic "lfs_writefile: more than one fragment!"
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 08 08:55:03 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        NetBSD 1.6K
>Organization:

>Environment:
	
	
System: NetBSD kaeru 1.6K NetBSD 1.6K (build.kaeru) #170: Sat Nov 9 00:41:22 JST 2002 takashi@kaeru:/usr/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
	lfs_ialloc (or lfs_vcreate) should initialize i_lfs_fragsize.
>How-To-Repeat:
	
>Fix:

Index: lfs_alloc.c
===================================================================
RCS file: /cvs/NetBSD/syssrc/sys/ufs/lfs/lfs_alloc.c,v
retrieving revision 1.56
diff -u -p -r1.56 lfs_alloc.c
--- lfs_alloc.c	2002/05/14 20:03:53	1.56
+++ lfs_alloc.c	2002/11/08 16:32:00
@@ -412,6 +414,8 @@ lfs_ialloc(struct lfs *fs, struct vnode 
 	ufs_vinit(vp->v_mount, lfs_specop_p, lfs_fifoop_p, &vp);
 	ip = VTOI(vp);
 	/* printf("lfs_ialloc[2]: ino %d vp %p\n", new_ino, vp);*/
+
+	memset(ip->i_lfs_fragsize, 0, NDADDR * sizeof(*ip->i_lfs_fragsize));
 
 	uvm_vnp_setsize(vp, 0);
 	*vpp = vp;
>Release-Note:
>Audit-Trail:
>Unformatted: