From fcdfed00d57f745bdca5f6f2036c8da4155b58cc Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Sat, 5 Dec 1998 06:12:14 +0000 Subject: Even the most recently allocated buffer may not have its b_blkno field properly filled in, so we must do a VOP_BMAP on that buffer as well if it is not resolved. Submitted by: Luoqi Chen --- sys/kern/vfs_cluster.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/kern/vfs_cluster.c') diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 7632fa0c1e39..1e4d7b87fd63 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.73 1998/11/15 14:11:06 bde Exp $ + * $Id: vfs_cluster.c,v 1.74 1998/11/17 00:31:12 mckusick Exp $ */ #include "opt_debug_cluster.h" @@ -839,7 +839,10 @@ cluster_collectbufs(vp, last_bp) VOP_BMAP(bp->b_vp, bp->b_lblkno, NULL, &bp->b_blkno, NULL, NULL); } - buflist->bs_children[i] = last_bp; + buflist->bs_children[i] = bp = last_bp; + if (bp->b_blkno == bp->b_lblkno) + VOP_BMAP(bp->b_vp, bp->b_lblkno, NULL, &bp->b_blkno, + NULL, NULL); buflist->bs_nchildren = i + 1; return (buflist); } -- cgit v1.2.3