Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ext2fs update to track ufs_bmap.c:
details: https://anonhg.NetBSD.org/src/rev/4b053ab0e568
branches: trunk
changeset: 517326:4b053ab0e568
user: chs <chs%NetBSD.org@localhost>
date: Sat Nov 10 17:46:23 2001 +0000
description:
update to track ufs_bmap.c:
don't call ufs_getlbns() for direct blocks.
diffstat:
sys/ufs/ext2fs/ext2fs_bmap.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (48 lines):
diff -r 5b59272c0ef0 -r 4b053ab0e568 sys/ufs/ext2fs/ext2fs_bmap.c
--- a/sys/ufs/ext2fs/ext2fs_bmap.c Sat Nov 10 17:35:54 2001 +0000
+++ b/sys/ufs/ext2fs/ext2fs_bmap.c Sat Nov 10 17:46:23 2001 +0000
@@ -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 @@
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 @@
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]);
Home |
Main Index |
Thread Index |
Old Index