Subject: Re: ext2fs support broken in -current
To: None <kilbi@rad.rwth-aachen.de>
From: Kevin Lahey <kml@patheticgeek.net>
List: current-users
Date: 11/10/2004 16:35:44
In message <16773.28745.475481.946196@mogli.lke.rad.klinikum.rwth-aachen.de>Mar
kus W Kilbinger writes
>Hi,
>
>writing onto ext2 partitions on i386 and mipsel (qube2) produce
>
>  panic: kernel diagnostic assertion "vp->v_size == ip->i_size" failed:
>    file "../../../../ufs/ext2fs/ext2fs_readwrite.c", line 252
>  syncing disks... panic: lockmgr: locking against myself
>
>with -current kernel (and userland). Best way to reproduce this is to
>specify something like ' ... >/ext2-partition/file'.

Ummm, I managed to fix the problem with 'df', and rather
to my surprise, it seems to have fixed up my problem writing
to the filesystem as well.  The 'df' problem was that statvfs
was returning a logorithmic fragment size, rather than an explicit
fragment size in bytes:

Index: ext2fs_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ext2fs/ext2fs_vfsops.c,v
retrieving revision 1.76
diff -c -r1.76 ext2fs_vfsops.c
*** ext2fs_vfsops.c	21 Sep 2004 03:10:35 -0000	1.76
--- ext2fs_vfsops.c	11 Nov 2004 00:31:05 -0000
***************
*** 783,789 ****
  	overhead += ngroups * (1 + fs->e2fs_ngdb);
  
  	sbp->f_bsize = fs->e2fs_bsize;
! 	sbp->f_frsize = fs->e2fs.e2fs_fsize;
  	sbp->f_iosize = fs->e2fs_bsize;
  	sbp->f_blocks = fs->e2fs.e2fs_bcount - overhead;
  	sbp->f_bfree = fs->e2fs.e2fs_fbcount;
--- 783,789 ----
  	overhead += ngroups * (1 + fs->e2fs_ngdb);
  
  	sbp->f_bsize = fs->e2fs_bsize;
! 	sbp->f_frsize = 1024 << fs->e2fs.e2fs_fsize;
  	sbp->f_iosize = fs->e2fs_bsize;
  	sbp->f_blocks = fs->e2fs.e2fs_bcount - overhead;
  	sbp->f_bfree = fs->e2fs.e2fs_fbcount;

Kevin
kml@patheticgeek.net