diff options
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_disksubr.c | 6 |
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); |