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 b_private rather than b_saveaddr.
details: https://anonhg.NetBSD.org/src/rev/fcd8bfb13e4a
branches: trunk
changeset: 555919:fcd8bfb13e4a
user: yamt <yamt%NetBSD.org@localhost>
date: Thu Dec 04 14:57:47 2003 +0000
description:
use b_private rather than b_saveaddr.
XXX LFS_USE_B_INVAL
diffstat:
sys/ufs/lfs/lfs_bio.c | 6 +++---
sys/ufs/lfs/lfs_segment.c | 16 +++++++---------
sys/ufs/lfs/lfs_syscalls.c | 5 ++---
3 files changed, 12 insertions(+), 15 deletions(-)
diffs (132 lines):
diff -r 98f34528ba97 -r fcd8bfb13e4a sys/ufs/lfs/lfs_bio.c
--- a/sys/ufs/lfs/lfs_bio.c Thu Dec 04 14:39:09 2003 +0000
+++ b/sys/ufs/lfs/lfs_bio.c Thu Dec 04 14:57:47 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_bio.c,v 1.75 2003/10/03 15:35:54 yamt Exp $ */
+/* $NetBSD: lfs_bio.c,v 1.76 2003/12/04 14:57:47 yamt Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.75 2003/10/03 15:35:54 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.76 2003/12/04 14:57:47 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -684,7 +684,6 @@
bgetvp(vp, bp);
splx(s);
- bp->b_saveaddr = (caddr_t)fs;
bp->b_bufsize = size;
bp->b_bcount = size;
bp->b_lblkno = daddr;
@@ -693,6 +692,7 @@
bp->b_resid = 0;
bp->b_iodone = lfs_callback;
bp->b_flags |= B_BUSY | B_CALL | B_NOCACHE;
+ bp->b_private = fs;
return (bp);
}
diff -r 98f34528ba97 -r fcd8bfb13e4a sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Thu Dec 04 14:39:09 2003 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Thu Dec 04 14:57:47 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.143 2003/11/07 17:55:29 yamt Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.144 2003/12/04 14:57:47 yamt Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.143 2003/11/07 17:55:29 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.144 2003/12/04 14:57:47 yamt Exp $");
#define ivndebug(vp,str) printf("ino %d: %s\n",VTOI(vp)->i_number,(str))
@@ -1623,7 +1623,7 @@
bp->b_dev = NODEV;
bp->b_blkno = bp->b_lblkno = addr;
bp->b_iodone = lfs_cluster_callback;
- bp->b_saveaddr = (caddr_t)cl;
+ bp->b_private = cl;
bp->b_vp = vp;
return bp;
@@ -1912,7 +1912,7 @@
panic("devvp is NULL");
for (bpp = sp->bpp, i = nblocks; i;) {
cbp = lfs_newclusterbuf(fs, devvp, (*bpp)->b_blkno, i);
- cl = (struct lfs_cluster *)cbp->b_saveaddr;
+ cl = cbp->b_private;
cbp->b_dev = i_dev;
cbp->b_flags |= B_ASYNC | B_BUSY;
@@ -2061,8 +2061,6 @@
bp->b_flags |= B_BUSY | B_CALL | B_ASYNC;
bp->b_flags &= ~(B_DONE | B_ERROR | B_READ | B_DELWRI);
bp->b_iodone = lfs_supercallback;
- /* XXX KS - same nasty hack as above */
- bp->b_saveaddr = (caddr_t)fs;
vop_strategy_a.a_desc = VDESC(vop_strategy);
vop_strategy_a.a_bp = bp;
@@ -2140,7 +2138,7 @@
{
struct lfs *fs;
- fs = (struct lfs *)bp->b_saveaddr;
+ fs = bp->b_private;
lfs_freebuf(fs, bp);
}
@@ -2149,7 +2147,7 @@
{
struct lfs *fs;
- fs = (struct lfs *)bp->b_saveaddr;
+ fs = bp->b_private;
fs->lfs_sbactive = 0;
wakeup(&fs->lfs_sbactive);
if (--fs->lfs_iocount <= 1)
@@ -2170,7 +2168,7 @@
if (bp->b_flags & B_ERROR)
error = bp->b_error;
- cl = (struct lfs_cluster *)bp->b_saveaddr;
+ cl = bp->b_private;
fs = cl->fs;
devvp = VTOI(fs->lfs_ivnode)->i_devvp;
diff -r 98f34528ba97 -r fcd8bfb13e4a sys/ufs/lfs/lfs_syscalls.c
--- a/sys/ufs/lfs/lfs_syscalls.c Thu Dec 04 14:39:09 2003 +0000
+++ b/sys/ufs/lfs/lfs_syscalls.c Thu Dec 04 14:57:47 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_syscalls.c,v 1.99 2003/11/07 14:52:27 yamt Exp $ */
+/* $NetBSD: lfs_syscalls.c,v 1.100 2003/12/04 14:57:47 yamt Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.99 2003/11/07 14:52:27 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.100 2003/12/04 14:57:47 yamt Exp $");
#ifndef LFS
# define LFS /* for prototypes in syscallargs.h */
@@ -1188,7 +1188,6 @@
KDASSERT(bp->b_iodone == lfs_callback);
#if 0
- bp->b_saveaddr = (caddr_t)fs;
++fs->lfs_iocount;
#endif
bp->b_bufsize = size;
Home |
Main Index |
Thread Index |
Old Index