Leave 16 lines in front of each component partition. It's now safe to

use sd87a or sd237e even if they start at the beginning of the slice.

You can also use sd85c if you prefer, although you need to change the
type field in the disklabel to "4.2BSD".
This commit is contained in:
Satoshi Asami 1996-05-13 08:38:15 +00:00
parent 61f20a4c29
commit 0d88ef072c
2 changed files with 20 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $Id: ccd.c,v 1.9 1996/03/26 02:29:11 asami Exp $ */
/* $Id: ccd.c,v 1.10 1996/04/24 09:42:22 asami Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
@ -228,6 +228,13 @@ int numccd = 0;
static int ccd_devsw_installed = 0;
/*
* Number of blocks to untouched in front of a component partition.
* This is to avoid violating its disklabel area when it starts at the
* beginning of the slice.
*/
#define CCD_OFFSET 16
/*
* Called by main() during pseudo-device attachment. All we need
* to do is allocate enough space for devices to be configured later, and
@ -375,7 +382,7 @@ ccdinit(ccd, cpaths, p)
maxsecsize =
((dpart.disklab->d_secsize > maxsecsize) ?
dpart.disklab->d_secsize : maxsecsize);
size = dpart.part->p_size;
size = dpart.part->p_size - CCD_OFFSET;
} else {
#ifdef DEBUG
if (ccddebug & (CCDB_FOLLOW|CCDB_INIT))
@ -879,7 +886,7 @@ ccdbuffer(cb, cs, bp, bn, addr, bcount)
cbp->cb_buf.b_iodone = (void (*)(struct buf *))ccdiodone;
cbp->cb_buf.b_proc = bp->b_proc;
cbp->cb_buf.b_dev = ci->ci_dev; /* XXX */
cbp->cb_buf.b_blkno = cbn + cboff;
cbp->cb_buf.b_blkno = cbn + cboff + CCD_OFFSET;
cbp->cb_buf.b_data = addr;
cbp->cb_buf.b_vp = ci->ci_vp;
if (cs->sc_ileave == 0)

View File

@ -1,4 +1,4 @@
/* $Id: ccd.c,v 1.9 1996/03/26 02:29:11 asami Exp $ */
/* $Id: ccd.c,v 1.10 1996/04/24 09:42:22 asami Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
@ -228,6 +228,13 @@ int numccd = 0;
static int ccd_devsw_installed = 0;
/*
* Number of blocks to untouched in front of a component partition.
* This is to avoid violating its disklabel area when it starts at the
* beginning of the slice.
*/
#define CCD_OFFSET 16
/*
* Called by main() during pseudo-device attachment. All we need
* to do is allocate enough space for devices to be configured later, and
@ -375,7 +382,7 @@ ccdinit(ccd, cpaths, p)
maxsecsize =
((dpart.disklab->d_secsize > maxsecsize) ?
dpart.disklab->d_secsize : maxsecsize);
size = dpart.part->p_size;
size = dpart.part->p_size - CCD_OFFSET;
} else {
#ifdef DEBUG
if (ccddebug & (CCDB_FOLLOW|CCDB_INIT))
@ -879,7 +886,7 @@ ccdbuffer(cb, cs, bp, bn, addr, bcount)
cbp->cb_buf.b_iodone = (void (*)(struct buf *))ccdiodone;
cbp->cb_buf.b_proc = bp->b_proc;
cbp->cb_buf.b_dev = ci->ci_dev; /* XXX */
cbp->cb_buf.b_blkno = cbn + cboff;
cbp->cb_buf.b_blkno = cbn + cboff + CCD_OFFSET;
cbp->cb_buf.b_data = addr;
cbp->cb_buf.b_vp = ci->ci_vp;
if (cs->sc_ileave == 0)