Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Use the new IINFO in the rfw code, eliminating h...
details: https://anonhg.NetBSD.org/src/rev/20f02d4055d2
branches: trunk
changeset: 340811:20f02d4055d2
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Oct 03 08:27:55 2015 +0000
description:
Use the new IINFO in the rfw code, eliminating hardwired 32-bit values.
diffstat:
sys/ufs/lfs/lfs_rfw.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (58 lines):
diff -r 38940910e065 -r 20f02d4055d2 sys/ufs/lfs/lfs_rfw.c
--- a/sys/ufs/lfs/lfs_rfw.c Sat Oct 03 08:27:38 2015 +0000
+++ b/sys/ufs/lfs/lfs_rfw.c Sat Oct 03 08:27:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_rfw.c,v 1.31 2015/09/01 06:08:37 dholland Exp $ */
+/* $NetBSD: lfs_rfw.c,v 1.32 2015/10/03 08:27:55 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_rfw.c,v 1.31 2015/09/01 06:08:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_rfw.c,v 1.32 2015/10/03 08:27:55 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -411,7 +411,7 @@
SEGSUM *ssp;
u_long *dp = NULL, *datap = NULL; /* XXX u_int32_t */
daddr_t oldoffset;
- int32_t *iaddr; /* XXX ondisk32 */
+ IINFO *iip;
FINFO *fip;
SEGUSE *sup;
size_t size;
@@ -481,8 +481,7 @@
offset += lfs_btofsb(fs, lfs_sb_getsumsize(fs));
ninos = howmany(lfs_ss_getninos(fs, ssp), LFS_INOPB(fs));
- /* XXX ondisk32 */
- iaddr = (int32_t *)((char*)bp->b_data + lfs_sb_getsumsize(fs) - sizeof(int32_t));
+ iip = SEGSUM_IINFOSTART(fs, bp->b_data);
if (flags & CHECK_CKSUM) {
/* Count blocks */
nblocks = 0;
@@ -503,7 +502,7 @@
fip = SEGSUM_FINFOBASE(fs, (SEGSUM *)bp->b_data);
for (i = 0; i < lfs_ss_getnfinfo(fs, ssp) || ninos; ++i) {
/* Inode block? */
- if (ninos && *iaddr == offset) {
+ if (ninos && lfs_ii_getblock(fs, iip) == offset) {
if (flags & CHECK_CKSUM) {
/* Read in the head and add to the buffer */
error = bread(devvp, LFS_FSBTODB(fs, offset), lfs_sb_getbsize(fs),
@@ -524,9 +523,9 @@
}
}
offset += lfs_btofsb(fs, lfs_sb_getibsize(fs));
- --iaddr;
+ iip = NEXTLOWER_IINFO(fs, iip);
--ninos;
- --i; /* compensate */
+ --i; /* compensate for ++i in loop header */
continue;
}
size = lfs_sb_getbsize(fs);
Home |
Main Index |
Thread Index |
Old Index