NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"

as "this" handle.
This commit is contained in:
phk 2003-02-21 23:25:43 +00:00
parent f679a32416
commit 8f9640b59b
3 changed files with 11 additions and 11 deletions

View File

@ -107,7 +107,7 @@ struct ccdbuf {
static dev_t ccdctldev;
static d_strategy_t ccdstrategy;
static disk_strategy_t ccdstrategy;
static d_ioctl_t ccdctlioctl;
#define NCCDFREEHIWAT 16
@ -537,7 +537,7 @@ ccdstrategy(struct bio *bp)
int pbn; /* in sc_secsize chunks */
long sz; /* in sc_secsize chunks */
cs = bp->bio_dev->si_drv1;
cs = bp->bio_disk->d_drv1;
pbn = bp->bio_blkno / (cs->sc_geom.ccg_secsize / DEV_BSIZE);
sz = howmany(bp->bio_bcount, cs->sc_geom.ccg_secsize);
@ -1133,9 +1133,9 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
cs->sc_size * (off_t)ccg->ccg_secsize;
cs->sc_disk->d_fwsectors = ccg->ccg_nsectors;
cs->sc_disk->d_fwheads = ccg->ccg_ntracks;
cs->sc_dev = disk_create(unit, cs->sc_disk, 0, NULL, NULL);
cs->sc_dev->si_drv1 = cs;
cs->sc_dev->si_iosize_max = MAXPHYS;
cs->sc_disk->d_drv1 = cs;
cs->sc_disk->d_maxsize = MAXPHYS;
disk_create(unit, cs->sc_disk, 0, NULL, NULL);
ccdunlock(cs);

View File

@ -107,7 +107,7 @@ struct ccdbuf {
static dev_t ccdctldev;
static d_strategy_t ccdstrategy;
static disk_strategy_t ccdstrategy;
static d_ioctl_t ccdctlioctl;
#define NCCDFREEHIWAT 16
@ -537,7 +537,7 @@ ccdstrategy(struct bio *bp)
int pbn; /* in sc_secsize chunks */
long sz; /* in sc_secsize chunks */
cs = bp->bio_dev->si_drv1;
cs = bp->bio_disk->d_drv1;
pbn = bp->bio_blkno / (cs->sc_geom.ccg_secsize / DEV_BSIZE);
sz = howmany(bp->bio_bcount, cs->sc_geom.ccg_secsize);
@ -1133,9 +1133,9 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
cs->sc_size * (off_t)ccg->ccg_secsize;
cs->sc_disk->d_fwsectors = ccg->ccg_nsectors;
cs->sc_disk->d_fwheads = ccg->ccg_ntracks;
cs->sc_dev = disk_create(unit, cs->sc_disk, 0, NULL, NULL);
cs->sc_dev->si_drv1 = cs;
cs->sc_dev->si_iosize_max = MAXPHYS;
cs->sc_disk->d_drv1 = cs;
cs->sc_disk->d_maxsize = MAXPHYS;
disk_create(unit, cs->sc_disk, 0, NULL, NULL);
ccdunlock(cs);

View File

@ -173,7 +173,7 @@ struct ccd_s {
int sc_pick; /* side of mirror picked */
daddr_t sc_blk[2]; /* mirror localization */
struct disk *sc_disk;
struct cdev *sc_dev;
struct cdev *__remove00; /* XXX: remove when convenient */
};
/* sc_flags */