summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-04-19 19:34:19 +0000
committerbde <bde@FreeBSD.org>1996-04-19 19:34:19 +0000
commit8831d940d641207c23a7b238e997e1ed9afd3cd7 (patch)
tree96bd3a1887d0dcafc0776064996e82f702720786 /sys/ufs
parente5094c363b1436aeb588582a651b6ac88751d0b7 (diff)
downloadFreeBSD-src-8831d940d641207c23a7b238e997e1ed9afd3cd7.zip
FreeBSD-src-8831d940d641207c23a7b238e997e1ed9afd3cd7.tar.gz
Yet more b_flags fixes. The previous ones broke the clearing of B_DONE
and B_READ before writing. This was was fatal. They also broke the clearing of B_INVAL before doing i/o. This didn't actually matter. Submitted by: mostly by joerg
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_disksubr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_disksubr.c b/sys/ufs/ufs/ufs_disksubr.c
index ee88940..19bf0ad 100644
--- a/sys/ufs/ufs/ufs_disksubr.c
+++ b/sys/ufs/ufs/ufs_disksubr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94
- * $Id: ufs_disksubr.c,v 1.20 1995/11/23 07:24:32 dyson Exp $
+ * $Id: ufs_disksubr.c,v 1.22 1996/03/02 01:49:51 dyson Exp $
*/
#include <sys/param.h>
@@ -254,6 +254,7 @@ readdisklabel(dev, strat, lp)
bp->b_dev = dev;
bp->b_blkno = LABELSECTOR;
bp->b_bcount = lp->d_secsize;
+ bp->b_flags &= ~B_INVAL;
bp->b_flags |= B_BUSY | B_READ;
bp->b_cylinder = LABELSECTOR / lp->d_secpercyl;
(*strat)(bp);
@@ -363,6 +364,7 @@ writedisklabel(dev, strat, lp)
* Note that you can't write a label out over a corrupted label!
* (also stupid.. how do you write the first one? by raw writes?)
*/
+ bp->b_flags &= ~B_INVAL;
bp->b_flags |= B_BUSY | B_READ;
(*strat)(bp);
error = biowait(bp);
@@ -375,6 +377,7 @@ writedisklabel(dev, strat, lp)
if (dlp->d_magic == DISKMAGIC && dlp->d_magic2 == DISKMAGIC &&
dkcksum(dlp) == 0) {
*dlp = *lp;
+ bp->b_flags &= ~(B_DONE | B_READ);
bp->b_flags |= B_BUSY | B_WRITE;
(*strat)(bp);
error = biowait(bp);
@@ -387,6 +390,7 @@ done:
bzero(bp->b_data, lp->d_secsize);
dlp = (struct disklabel *)bp->b_data;
*dlp = *lp;
+ bp->b_flags &= ~B_INVAL;
bp->b_flags |= B_BUSY | B_WRITE;
(*strat)(bp);
error = biowait(bp);
OpenPOWER on IntegriCloud