Removed all references to b_cylinder (aka b_cylin). It was evil and
hasn't been used for a year or two since disksort() started sorting on b_pblkno.
This commit is contained in:
parent
4958bbd175
commit
4eb73cdaff
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.214 1996/11/29 13:19:26 bde Exp $
|
||||
* $Id: machdep.c,v 1.215 1996/12/01 15:46:40 dyson Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -1478,7 +1478,7 @@ Debugger(const char *msg)
|
||||
#endif /* no DDB */
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#define b_cylin b_resid
|
||||
|
||||
/*
|
||||
* Determine the size of the transfer, and make sure it is
|
||||
* within the boundaries of the partition. Adjust transfer
|
||||
@ -1528,9 +1528,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
|
||||
bp->b_bcount = sz << DEV_BSHIFT;
|
||||
}
|
||||
|
||||
/* calculate cylinder for disksort to order transfers with */
|
||||
bp->b_pblkno = bp->b_blkno + p->p_offset;
|
||||
bp->b_cylin = bp->b_pblkno / lp->d_secpercyl;
|
||||
return(1);
|
||||
|
||||
bad:
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.214 1996/11/29 13:19:26 bde Exp $
|
||||
* $Id: machdep.c,v 1.215 1996/12/01 15:46:40 dyson Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -1478,7 +1478,7 @@ Debugger(const char *msg)
|
||||
#endif /* no DDB */
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#define b_cylin b_resid
|
||||
|
||||
/*
|
||||
* Determine the size of the transfer, and make sure it is
|
||||
* within the boundaries of the partition. Adjust transfer
|
||||
@ -1528,9 +1528,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
|
||||
bp->b_bcount = sz << DEV_BSHIFT;
|
||||
}
|
||||
|
||||
/* calculate cylinder for disksort to order transfers with */
|
||||
bp->b_pblkno = bp->b_blkno + p->p_offset;
|
||||
bp->b_cylin = bp->b_pblkno / lp->d_secpercyl;
|
||||
return(1);
|
||||
|
||||
bad:
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.119 1996/10/17 21:18:42 phk Exp $
|
||||
* $Id: wd.c,v 1.120 1996/11/11 15:57:40 bde Exp $
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
@ -501,7 +501,7 @@ wdstrategy(register struct buf *bp)
|
||||
}
|
||||
|
||||
/*
|
||||
* Do bounds checking, adjust transfer, set b_cylin and b_pbklno.
|
||||
* Do bounds checking, adjust transfer, and set b_pblkno.
|
||||
*/
|
||||
if (dscheck(bp, du->dk_slices) <= 0)
|
||||
goto done;
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: ufs_disksubr.c,v 1.26 1996/09/20 17:39:44 bde Exp $
|
||||
* $Id: ufs_disksubr.c,v 1.27 1996/12/01 11:25:10 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -62,13 +62,6 @@
|
||||
* allocated.
|
||||
*/
|
||||
|
||||
/*
|
||||
* For portability with historic industry practice, the
|
||||
* cylinder number has to be maintained in the `b_resid'
|
||||
* field.
|
||||
*/
|
||||
#define b_cylinder b_resid
|
||||
|
||||
void
|
||||
tqdisksort(ap, bp)
|
||||
struct buf_queue_head *ap;
|
||||
@ -186,7 +179,6 @@ readdisklabel(dev, strat, lp)
|
||||
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);
|
||||
if (biowait(bp))
|
||||
msg = "I/O error";
|
||||
|
@ -43,7 +43,7 @@
|
||||
* from: wd.c,v 1.55 1994/10/22 01:57:12 phk Exp $
|
||||
* 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: subr_diskslice.c,v 1.30 1996/10/29 13:15:30 bde Exp $
|
||||
* $Id: subr_diskslice.c,v 1.31 1996/12/01 11:25:00 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -65,8 +65,6 @@
|
||||
|
||||
#include <ufs/ffs/fs.h>
|
||||
|
||||
#define b_cylinder b_resid
|
||||
|
||||
#define TRACE(str) do { if (ds_debug) printf str; } while (0)
|
||||
|
||||
typedef u_char bool_t;
|
||||
@ -185,12 +183,7 @@ if (labelsect != 0) Debugger("labelsect != 0 in dscheck()");
|
||||
bp->b_bcount = sz << DEV_BSHIFT;
|
||||
}
|
||||
|
||||
/* calculate cylinder for disksort to order transfers with */
|
||||
bp->b_pblkno = blkno + sp->ds_offset;
|
||||
if (lp == NULL)
|
||||
bp->b_cylinder = 0; /* XXX always 0 would be better */
|
||||
else
|
||||
bp->b_cylinder = bp->b_pblkno / lp->d_secpercyl;
|
||||
|
||||
/*
|
||||
* Snoop on label accesses if the slice offset is nonzero. Fudge
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.12 1996/11/02 10:38:57 asami Exp $
|
||||
* $Id: machdep.c,v 1.13 1996/11/13 02:00:17 asami Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -1507,7 +1507,7 @@ Debugger(const char *msg)
|
||||
#endif /* no DDB */
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#define b_cylin b_resid
|
||||
|
||||
/*
|
||||
* Determine the size of the transfer, and make sure it is
|
||||
* within the boundaries of the partition. Adjust transfer
|
||||
@ -1557,9 +1557,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
|
||||
bp->b_bcount = sz << DEV_BSHIFT;
|
||||
}
|
||||
|
||||
/* calculate cylinder for disksort to order transfers with */
|
||||
bp->b_pblkno = bp->b_blkno + p->p_offset;
|
||||
bp->b_cylin = bp->b_pblkno / lp->d_secpercyl;
|
||||
return(1);
|
||||
|
||||
bad:
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.12 1996/11/02 10:38:57 asami Exp $
|
||||
* $Id: machdep.c,v 1.13 1996/11/13 02:00:17 asami Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -1507,7 +1507,7 @@ Debugger(const char *msg)
|
||||
#endif /* no DDB */
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#define b_cylin b_resid
|
||||
|
||||
/*
|
||||
* Determine the size of the transfer, and make sure it is
|
||||
* within the boundaries of the partition. Adjust transfer
|
||||
@ -1557,9 +1557,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
|
||||
bp->b_bcount = sz << DEV_BSHIFT;
|
||||
}
|
||||
|
||||
/* calculate cylinder for disksort to order transfers with */
|
||||
bp->b_pblkno = bp->b_blkno + p->p_offset;
|
||||
bp->b_cylin = bp->b_pblkno / lp->d_secpercyl;
|
||||
return(1);
|
||||
|
||||
bad:
|
||||
|
@ -90,7 +90,6 @@ extern short dmapageport[];
|
||||
#define SBIC_INIT_WAIT 50000 /* wait per step (both) during init */
|
||||
#define SBIC_RESET_TIMEOUT 2000
|
||||
|
||||
#define b_cylin b_resid
|
||||
#define SBIC_WAIT(sbic, until, timeo) sbicwait(sbic, until, timeo, __LINE__)
|
||||
#define SBIC_ENABLE_INT(iobase) { \
|
||||
u_char tmp; \
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.9 1996/10/23 07:25:35 asami Exp $
|
||||
* $Id: wd.c,v 1.10 1996/11/02 10:40:07 asami Exp $
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
@ -599,7 +599,7 @@ wdstrategy(register struct buf *bp)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Do bounds checking, adjust transfer, set b_cylin and b_pbklno.
|
||||
* Do bounds checking, adjust transfer, and set b_pblkno.
|
||||
*/
|
||||
if (dscheck(bp, du->dk_slices) <= 0)
|
||||
goto done;
|
||||
|
@ -28,7 +28,7 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: od.c,v 1.23 1996/11/06 17:31:14 joerg Exp $
|
||||
* $Id: od.c,v 1.24 1996/12/01 11:25:17 sos Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -487,7 +487,7 @@ od_strategy(struct buf *bp, struct scsi_link *sc_link)
|
||||
}
|
||||
|
||||
/*
|
||||
* Do bounds checking, adjust transfer, set b_cylin and b_pbklno.
|
||||
* Do bounds checking, adjust transfer, and set b_pblkno.
|
||||
*/
|
||||
{
|
||||
int status;
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
|
||||
*
|
||||
* $Id: sd.c,v 1.95 1996/09/14 04:31:09 bde Exp $
|
||||
* $Id: sd.c,v 1.96 1996/12/01 11:25:18 sos Exp $
|
||||
*/
|
||||
|
||||
#include "opt_bounce.h"
|
||||
@ -435,7 +435,7 @@ sd_strategy(struct buf *bp, struct scsi_link *sc_link)
|
||||
goto bad;
|
||||
}
|
||||
/*
|
||||
* Do bounds checking, adjust transfer, set b_cylin and b_pbklno.
|
||||
* Do bounds checking, adjust transfer, and set b_pblkno.
|
||||
*/
|
||||
if (dscheck(bp, sd->dk_slices) <= 0)
|
||||
goto done; /* XXX check b_resid */
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: ufs_disksubr.c,v 1.26 1996/09/20 17:39:44 bde Exp $
|
||||
* $Id: ufs_disksubr.c,v 1.27 1996/12/01 11:25:10 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -62,13 +62,6 @@
|
||||
* allocated.
|
||||
*/
|
||||
|
||||
/*
|
||||
* For portability with historic industry practice, the
|
||||
* cylinder number has to be maintained in the `b_resid'
|
||||
* field.
|
||||
*/
|
||||
#define b_cylinder b_resid
|
||||
|
||||
void
|
||||
tqdisksort(ap, bp)
|
||||
struct buf_queue_head *ap;
|
||||
@ -186,7 +179,6 @@ readdisklabel(dev, strat, lp)
|
||||
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);
|
||||
if (biowait(bp))
|
||||
msg = "I/O error";
|
||||
|
Loading…
Reference in New Issue
Block a user