From 8f9640b59b8e96419f4a29f1d543688c4725ad15 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 21 Feb 2003 23:25:43 +0000 Subject: [PATCH] NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t" as "this" handle. --- sys/dev/ccd/ccd.c | 10 +++++----- sys/geom/geom_ccd.c | 10 +++++----- sys/sys/ccdvar.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index 5fb49c584592..4fe4f985ab02 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -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); diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 5fb49c584592..4fe4f985ab02 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -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); diff --git a/sys/sys/ccdvar.h b/sys/sys/ccdvar.h index 63c17fd283fe..1ceb32659ce0 100644 --- a/sys/sys/ccdvar.h +++ b/sys/sys/ccdvar.h @@ -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 */