summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-04-03 10:24:03 +0000
committerjeff <jeff@FreeBSD.org>2005-04-03 10:24:03 +0000
commit3c5b12f96d65ec3bb22fd15b3de2833eadff0616 (patch)
tree77d8d1901027afba82412cf9792e6fc16ca5207e /sys/kern
parent650f7fc58c214ffc3cca1caac7128161fe1d6895 (diff)
downloadFreeBSD-src-3c5b12f96d65ec3bb22fd15b3de2833eadff0616.zip
FreeBSD-src-3c5b12f96d65ec3bb22fd15b3de2833eadff0616.tar.gz
- 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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_default.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 6552a1f..5202e9c 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -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 @@ loop1:
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 @@ loop2:
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);
OpenPOWER on IntegriCloud