diff options
| author | reinoud <reinoud@NetBSD.org> | 2008-06-17 14:53:10 +0000 |
|---|---|---|
| committer | reinoud <reinoud@NetBSD.org> | 2008-06-17 14:53:10 +0000 |
| commit | f6a70673bad0abc8d7e9407f9e3b68cb2be3fa28 (patch) | |
| tree | 9774efc6ee641e880a6dc04b9c8b866c34372732 /sys/dev | |
| parent | a61f3416a64f2aa4024dfe3485b7461ff5d0a3d3 (diff) | |
Mark a buffer `busy` in getnewbuf() when it came from the pool_cache since
its not on a free list.
Also change buf_init() to not automatically mark buffers `busy' since this
only makes sense for bufcache buffers.
Mark all buf_init'd buffers 'busy' on the places where they ought to be
flagged as such to not confuse the buffer cache.
Fixes PR 38923.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ata/ata_raid.c | 5 | ||||
| -rw-r--r-- | sys/dev/dkwedge/dk.c | 5 | ||||
| -rw-r--r-- | sys/dev/fss.c | 5 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_diskqueue.c | 5 |
4 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/ata/ata_raid.c b/sys/dev/ata/ata_raid.c index 54e8b990cac..5a876bb1b73 100644 --- a/sys/dev/ata/ata_raid.c +++ b/sys/dev/ata/ata_raid.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata_raid.c,v 1.28 2008/05/06 11:07:24 yamt Exp $ */ +/* $NetBSD: ata_raid.c,v 1.29 2008/06/17 14:53:10 reinoud Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.28 2008/05/06 11:07:24 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.29 2008/06/17 14:53:10 reinoud Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -300,6 +300,7 @@ ata_raid_config_block_rw(struct vnode *vp, daddr_t blkno, void *tbuf, bp->b_flags = bflags; bp->b_proc = curproc; bp->b_data = tbuf; + SET(bp->b_cflags, BC_BUSY); /* mark buffer busy */ VOP_STRATEGY(vp, bp); error = biowait(bp); diff --git a/sys/dev/dkwedge/dk.c b/sys/dev/dkwedge/dk.c index fb658bcf322..9f0d88a1619 100644 --- a/sys/dev/dkwedge/dk.c +++ b/sys/dev/dkwedge/dk.c @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.41 2008/06/03 12:14:08 ad Exp $ */ +/* $NetBSD: dk.c,v 1.42 2008/06/17 14:53:10 reinoud Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.41 2008/06/03 12:14:08 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.42 2008/06/17 14:53:10 reinoud Exp $"); #include "opt_dkwedge.h" @@ -862,6 +862,7 @@ dkwedge_read(struct disk *pdk, struct vnode *vp, daddr_t blkno, bp->b_resid = len; bp->b_flags = B_READ; bp->b_data = tbuf; + SET(bp->b_cflags, BC_BUSY); /* mark buffer busy */ VOP_STRATEGY(vp, bp); result = biowait(bp); diff --git a/sys/dev/fss.c b/sys/dev/fss.c index ccb084c91fa..cbb3299a2ca 100644 --- a/sys/dev/fss.c +++ b/sys/dev/fss.c @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.45 2008/04/28 20:23:46 martin Exp $ */ +/* $NetBSD: fss.c,v 1.46 2008/06/17 14:53:10 reinoud Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.45 2008/04/28 20:23:46 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.46 2008/06/17 14:53:10 reinoud Exp $"); #include "fss.h" @@ -1150,6 +1150,7 @@ fss_bs_thread(void *arg) nbp->b_blkno = bp->b_blkno; nbp->b_proc = bp->b_proc; nbp->b_dev = sc->sc_bdev; + SET(nbp->b_cflags, BC_BUSY); /* mark buffer busy */ bdev_strategy(nbp); diff --git a/sys/dev/raidframe/rf_diskqueue.c b/sys/dev/raidframe/rf_diskqueue.c index 5f557b039e5..e0ed68a45c6 100644 --- a/sys/dev/raidframe/rf_diskqueue.c +++ b/sys/dev/raidframe/rf_diskqueue.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.c,v 1.50 2008/01/02 11:48:38 ad Exp $ */ +/* $NetBSD: rf_diskqueue.c,v 1.51 2008/06/17 14:53:11 reinoud Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -66,7 +66,7 @@ ****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.50 2008/01/02 11:48:38 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.51 2008/06/17 14:53:11 reinoud Exp $"); #include <dev/raidframe/raidframevar.h> @@ -464,6 +464,7 @@ rf_CreateDiskQueueData(RF_IoType_t typ, RF_SectorNum_t ssect, pool_put(&rf_pools.dqd, p); return (NULL); } + SET(p->bp->b_cflags, BC_BUSY); /* mark buffer busy */ p->sectorOffset = ssect + rf_protectedSectors; p->numSector = nsect; |
