From f6a70673bad0abc8d7e9407f9e3b68cb2be3fa28 Mon Sep 17 00:00:00 2001 From: reinoud Date: Tue, 17 Jun 2008 14:53:10 +0000 Subject: 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. --- sys/dev/raidframe/rf_diskqueue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev/raidframe/rf_diskqueue.c') 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 -__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 @@ -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; -- cgit