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>
This commit is contained in:
Kirk McKusick 1998-12-05 06:12:14 +00:00
parent dadea2fa26
commit fcdfed00d5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41529

View File

@ -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);
}