Free the global softupdates lock prior to tsleep() in getdirtybuf().

This seems to be responsible for a bunch of panics where the process
sleeps and something else finds softupdates "locked" when it shouldn't
be.  This commit is unreviewed, but has been a big help here.
Previously my boxes would panic pretty much on the first fsync() that
wrote something to disk.
This commit is contained in:
Peter Wemm 2000-01-13 18:48:12 +00:00
parent ec9509a376
commit 7f473504e6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55928
2 changed files with 4 additions and 0 deletions

View File

@ -4563,7 +4563,9 @@ getdirtybuf(bpp, waitfor)
if (waitfor != MNT_WAIT)
return (0);
bp->b_xflags |= BX_BKGRDWAIT;
FREE_LOCK_INTERLOCKED(&lk);
tsleep(&bp->b_xflags, PRIBIO, "getbuf", 0);
ACQUIRE_LOCK_INTERLOCKED(&lk);
if (bp->b_xflags & BX_BKGRDINPROG)
panic("getdirtybuf: still writing");
continue;

View File

@ -4563,7 +4563,9 @@ getdirtybuf(bpp, waitfor)
if (waitfor != MNT_WAIT)
return (0);
bp->b_xflags |= BX_BKGRDWAIT;
FREE_LOCK_INTERLOCKED(&lk);
tsleep(&bp->b_xflags, PRIBIO, "getbuf", 0);
ACQUIRE_LOCK_INTERLOCKED(&lk);
if (bp->b_xflags & BX_BKGRDINPROG)
panic("getdirtybuf: still writing");
continue;