- Now that writes to character devices supporting softupdates can

generate dirty bufs even with a locked vnode, 100 retries is not that
   many.  This should probably change from a retry count to an abort when
   we are no longer cleaning any buffers.
 - Don't call vprint() while we still hold the vnode locked.  Move the call
   to later in the function.
 - Clean up a comment.
This commit is contained in:
Jeff Roberson 2005-04-03 10:24:03 +00:00
parent 78dcb2aff0
commit f0ddc75ed0

View File

@ -383,7 +383,7 @@ vop_stdfsync(ap)
struct bufobj *bo;
struct buf *nbp;
int s, error = 0;
int maxretry = 100; /* large, arbitrarily chosen */
int maxretry = 1000; /* large, arbitrarily chosen */
VI_LOCK(vp);
loop1:
@ -398,7 +398,7 @@ vop_stdfsync(ap)
splx(s);
/*
* Flush all dirty buffers associated with a block device.
* Flush all dirty buffers associated with a vnode.
*/
loop2:
s = splbio();
@ -445,11 +445,12 @@ vop_stdfsync(ap)
splx(s);
goto loop1;
}
vprint("fsync: giving up on dirty", vp);
error = EAGAIN;
}
}
VI_UNLOCK(vp);
if (error == EAGAIN)
vprint("fsync: giving up on dirty", vp);
splx(s);
return (error);