summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>1998-12-05 06:12:14 +0000
committermckusick <mckusick@FreeBSD.org>1998-12-05 06:12:14 +0000
commitf6e1dfa6868a552b068c5454f8059fcd3f7d1b2f (patch)
treebec130840cf4d3666dc64b080c5ed3ee61e76605 /sys/kern/vfs_cluster.c
parent9211082416b34f680b83f8fa85ec4b12cb8e0cbb (diff)
downloadFreeBSD-src-f6e1dfa6868a552b068c5454f8059fcd3f7d1b2f.zip
FreeBSD-src-f6e1dfa6868a552b068c5454f8059fcd3f7d1b2f.tar.gz
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 <luoqi@watermarkgroup.com>
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 7632fa0..1e4d7b8 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);
}
OpenPOWER on IntegriCloud