diff options
| author | chs <chs@NetBSD.org> | 2000-11-20 08:24:08 +0000 |
|---|---|---|
| committer | chs <chs@NetBSD.org> | 2000-11-20 08:24:08 +0000 |
| commit | c62d17a5518e46fc84627f23639d8429e189f313 (patch) | |
| tree | 86b4ab91148a2335c6ca40286000c3a0c66bcf5d /sys/dev/raidframe | |
| parent | 18a623738197ad96781301b40c54b7abcc2a314e (diff) | |
rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 556d076728d..4374cca1b9a 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.99 2000/10/20 02:24:45 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.100 2000/11/20 08:24:24 chs Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -657,7 +657,7 @@ raidstrategy(bp) if ((rs->sc_flags & RAIDF_INITED) ==0) { bp->b_error = ENXIO; - bp->b_flags = B_ERROR; + bp->b_flags |= B_ERROR; bp->b_resid = bp->b_bcount; biodone(bp); return; @@ -2173,7 +2173,7 @@ raidread_component_label(dev, b_vp, clabel) /* get our ducks in a row for the read */ bp->b_blkno = RF_COMPONENT_INFO_OFFSET / DEV_BSIZE; bp->b_bcount = RF_COMPONENT_INFO_SIZE; - bp->b_flags = B_BUSY | B_READ; + bp->b_flags |= B_READ; bp->b_resid = RF_COMPONENT_INFO_SIZE / DEV_BSIZE; (*bdevsw[major(bp->b_dev)].d_strategy)(bp); @@ -2192,7 +2192,6 @@ raidread_component_label(dev, b_vp, clabel) #endif } - bp->b_flags = B_INVAL | B_AGE; brelse(bp); return(error); } @@ -2213,7 +2212,7 @@ raidwrite_component_label(dev, b_vp, clabel) /* get our ducks in a row for the write */ bp->b_blkno = RF_COMPONENT_INFO_OFFSET / DEV_BSIZE; bp->b_bcount = RF_COMPONENT_INFO_SIZE; - bp->b_flags = B_BUSY | B_WRITE; + bp->b_flags |= B_WRITE; bp->b_resid = RF_COMPONENT_INFO_SIZE / DEV_BSIZE; memset(bp->b_data, 0, RF_COMPONENT_INFO_SIZE ); @@ -2222,7 +2221,6 @@ raidwrite_component_label(dev, b_vp, clabel) (*bdevsw[major(bp->b_dev)].d_strategy)(bp); error = biowait(bp); - bp->b_flags = B_INVAL | B_AGE; brelse(bp); if (error) { #if 1 |
