Subject: Re: netbsd-4 LFS problems
To: Konrad Schroder <>
From: Chris Ross <>
List: current-users
Date: 07/16/2007 10:16:03
On Jul 10, 2007, at 19:07, Konrad Schroder wrote:
> Try revision 1.208 of sys/ufs/lfs/lfs_vnops.c, I think that should  
> fix it. I am having a hard time making my test system go into that  
> bit of code, so the fix is by inspection only; please let me know  
> how it works out for you (either way).

   There are a few changes between netbsd-4 and 1.208 of lfs_vnops.c,  
many of which won't work.  I left the pagedaemon_proc ->  
pagedaemon_lwp and preempt() calls et al alone, and just hand-applied:

diff -u -r1.193.2.2 -r1.208
--- lfs_vnops.c 5 Jun 2007 20:35:03 -0000
+++ lfs_vnops.c 10 Jul 2007 23:06:24 -0000      1.208
@@ -2283,7 +2285,6 @@
                 if (check_dirty(fs, vp, startoffset, endoffset, blkeof,
                                 ap->a_flags, 0, &busypg) < 0) {
-                       sp->vp = NULL;
                         write_and_wait(fs, vp, busypg, seglocked,  
@@ -2291,6 +2292,7 @@
+                       sp->vp = NULL;
                         goto get_seglock;

   I presume this is the relevant piece, yes?  I'm not sure why  
delaying setting vp to NULL would help, since the ASSERT that failed  
was that it *wasn't* NULL, but.  :-)  We'll see.

   I have been running the netbsd-4 LFS code for a couple weeks now  
without seeing that problem recur, so I'm not sure what sort of test  
I can perform.  And, it looks like IPF has changed since I last built  
the kernel, so I'm going to rebuild userland, at which point the new  
kernel with the above change should run.  (LFS seemed to work,  
networking just doesn't.  :-) )

   I'll let you know if I have any problems with it.  I'll just leave  
it running with the above line moved.  It'll either fail, or not, and  
if not I'm not 100% sure that tells us much, but...


                                 - Chris