update to track ufs_bmap.c:
don't call ufs_getlbns() for direct blocks.
This commit is contained in:
parent
5648feb374
commit
c237f81065
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ext2fs_bmap.c,v 1.8 2001/11/08 02:39:06 lukem Exp $ */
|
||||
/* $NetBSD: ext2fs_bmap.c,v 1.9 2001/11/10 17:46:23 chs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Manuel Bouyer.
|
||||
@ -43,7 +43,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ext2fs_bmap.c,v 1.8 2001/11/08 02:39:06 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ext2fs_bmap.c,v 1.9 2001/11/10 17:46:23 chs Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -145,14 +145,7 @@ ext2fs_bmaparray(vp, bn, bnp, ap, nump, runp)
|
||||
maxrun = MAXBSIZE / mp->mnt_stat.f_iosize - 1;
|
||||
}
|
||||
|
||||
xap = ap == NULL ? a : ap;
|
||||
if (!nump)
|
||||
nump = #
|
||||
if ((error = ufs_getlbns(vp, bn, xap, nump)) != 0)
|
||||
return (error);
|
||||
|
||||
num = *nump;
|
||||
if (num == 0) {
|
||||
if (bn >= 0 && bn < NDADDR) {
|
||||
*bnp = blkptrtodb(ump, fs2h32(ip->i_e2fs_blocks[bn]));
|
||||
if (*bnp == 0)
|
||||
*bnp = -1;
|
||||
@ -164,6 +157,13 @@ ext2fs_bmaparray(vp, bn, bnp, ap, nump, runp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
xap = ap == NULL ? a : ap;
|
||||
if (!nump)
|
||||
nump = #
|
||||
if ((error = ufs_getlbns(vp, bn, xap, nump)) != 0)
|
||||
return (error);
|
||||
|
||||
num = *nump;
|
||||
|
||||
/* Get disk address out of indirect block array */
|
||||
daddr = fs2h32(ip->i_e2fs_blocks[NDADDR + xap->in_off]);
|
||||
|
Loading…
Reference in New Issue
Block a user