diff options
author | bde <bde@FreeBSD.org> | 1998-05-01 16:29:27 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-05-01 16:29:27 +0000 |
commit | 004d5369f31edf63be2c9b9d130d294b4dca447b (patch) | |
tree | 36e38fb9292e475d405061f88124fe00e4cb875e /sys/kern/vfs_cluster.c | |
parent | 23e7859bb44f754d0f10ab90ab9bec24a5727ad0 (diff) | |
download | FreeBSD-src-004d5369f31edf63be2c9b9d130d294b4dca447b.zip FreeBSD-src-004d5369f31edf63be2c9b9d130d294b4dca447b.tar.gz |
Partially fixed write clustering for cases where cluster_wbuild() is
called from vfs_bio_awrite() without going through cluster_write()
or ufs_bmaparray(), in particular for all writes to block disk devices.
Only ufs_bmaparray() sets vp->v_maxio in a correct way, and it doesn't
seem to be called early enough even for regular files.
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r-- | sys/kern/vfs_cluster.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index db76f2a..128940c 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 - * $Id: vfs_cluster.c,v 1.59 1998/03/16 18:39:41 julian Exp $ + * $Id: vfs_cluster.c,v 1.60 1998/03/19 22:48:13 dyson Exp $ */ #include "opt_debug_cluster.h" @@ -648,6 +648,9 @@ cluster_wbuild(vp, size, start_lbn, len) int i, j, s; int totalwritten = 0; int dbsize = btodb(size); + + if (vp->v_maxio == 0) + vp->v_maxio = DFLTPHYS; while (len > 0) { s = splbio(); if (((tbp = gbincore(vp, start_lbn)) == NULL) || |