diff options
author | 1998-10-11 06:33:11 +0000 | |
---|---|---|
committer | 1998-10-11 06:33:11 +0000 | |
commit | f7ff1031ace4b21adc85dd1c31f2e841da4efdcf (patch) | |
tree | 4b4a46b60c9177017151807edc0a206e74afbcb3 | |
parent | bad ioctls return EINVAL; garath@code.ridgefield.org (diff) | |
download | wireguard-openbsd-f7ff1031ace4b21adc85dd1c31f2e841da4efdcf.tar.xz wireguard-openbsd-f7ff1031ace4b21adc85dd1c31f2e841da4efdcf.zip |
Fix from Kirk McKusick to make sure that clustering works correctly across
the 2GB file boundary.
-rw-r--r-- | sys/kern/vfs_cluster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 6ed498fc751..6bba33ac324 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cluster.c,v 1.13 1998/02/20 14:51:58 niklas Exp $ */ +/* $OpenBSD: vfs_cluster.c,v 1.14 1998/10/11 06:33:11 csapuntz Exp $ */ /* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */ /*- @@ -511,7 +511,7 @@ cluster_write(bp, filesize) * Otherwise try reallocating to make it sequential. */ cursize = vp->v_lastw - vp->v_cstart + 1; - if ((lbn + 1) * bp->b_bcount != filesize || + if (((u_quad_t)(lbn + 1)) * bp->b_bcount != filesize || lbn != vp->v_lastw + 1 || vp->v_clen <= cursize) { cluster_wbuild(vp, NULL, bp->b_bcount, vp->v_cstart, cursize, lbn); |