mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-23 10:14:55 +00:00
Fix a bug that b_flags was getting unnecessarily modified by
the slice code. The effect up to now has been insignficant, but improved buffer allocation code will break with this problem.
This commit is contained in:
parent
47f8b1da86
commit
f5d1e6dae6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14312
|
@ -35,7 +35,7 @@
|
|||
*
|
||||
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
|
||||
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
|
||||
* $Id: diskslice_machdep.c,v 1.16 1995/08/23 11:43:45 jkh Exp $
|
||||
* $Id: diskslice_machdep.c,v 1.17 1995/10/28 15:38:55 phk Exp $
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -221,7 +221,7 @@ dsinit(dname, dev, strat, lp, sspp)
|
|||
if (bootverbose)
|
||||
printf(
|
||||
"%s: Found \"Ontrack Disk Manager\" on this disk.\n", sname);
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
mbr_offset = 63;
|
||||
goto reread_mbr;
|
||||
|
@ -342,7 +342,7 @@ dsinit(dname, dev, strat, lp, sspp)
|
|||
max_nsectors, max_ntracks, mbr_offset);
|
||||
|
||||
done:
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
if (error == EINVAL)
|
||||
error = 0;
|
||||
|
@ -447,6 +447,6 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset,
|
|||
mbr_offset);
|
||||
|
||||
done:
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: ufs_disksubr.c,v 1.19 1995/09/16 17:04:06 bde Exp $
|
||||
* $Id: ufs_disksubr.c,v 1.20 1995/11/23 07:24:32 dyson Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -275,7 +275,7 @@ readdisklabel(dev, strat, lp)
|
|||
break;
|
||||
}
|
||||
}
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
return (msg);
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ writedisklabel(dev, strat, lp)
|
|||
(*strat)(bp);
|
||||
error = biowait(bp);
|
||||
#endif
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
*
|
||||
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
|
||||
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
|
||||
* $Id: diskslice_machdep.c,v 1.16 1995/08/23 11:43:45 jkh Exp $
|
||||
* $Id: diskslice_machdep.c,v 1.17 1995/10/28 15:38:55 phk Exp $
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -221,7 +221,7 @@ dsinit(dname, dev, strat, lp, sspp)
|
|||
if (bootverbose)
|
||||
printf(
|
||||
"%s: Found \"Ontrack Disk Manager\" on this disk.\n", sname);
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
mbr_offset = 63;
|
||||
goto reread_mbr;
|
||||
|
@ -342,7 +342,7 @@ dsinit(dname, dev, strat, lp, sspp)
|
|||
max_nsectors, max_ntracks, mbr_offset);
|
||||
|
||||
done:
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
if (error == EINVAL)
|
||||
error = 0;
|
||||
|
@ -447,6 +447,6 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset,
|
|||
mbr_offset);
|
||||
|
||||
done:
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ readbad144(dev, strat, lp, bdp)
|
|||
msg = "bad sector table I/O error";
|
||||
} while ((bp->b_flags & B_ERROR) && (i += 2) < 10 &&
|
||||
i < lp->d_nsectors);
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
return (msg);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: ufs_disksubr.c,v 1.19 1995/09/16 17:04:06 bde Exp $
|
||||
* $Id: ufs_disksubr.c,v 1.20 1995/11/23 07:24:32 dyson Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -275,7 +275,7 @@ readdisklabel(dev, strat, lp)
|
|||
break;
|
||||
}
|
||||
}
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
return (msg);
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ writedisklabel(dev, strat, lp)
|
|||
(*strat)(bp);
|
||||
error = biowait(bp);
|
||||
#endif
|
||||
bp->b_flags = B_INVAL | B_AGE;
|
||||
bp->b_flags |= B_INVAL | B_AGE;
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue