version 1.218, 2006/10/08 22:57:51 |
version 1.219, 2006/10/08 23:22:26 |
Line 211 static void KernelWakeupFunc(struct buf |
|
Line 211 static void KernelWakeupFunc(struct buf |
|
static void InitBP(struct buf *, struct vnode *, unsigned, |
static void InitBP(struct buf *, struct vnode *, unsigned, |
dev_t, RF_SectorNum_t, RF_SectorCount_t, caddr_t, void (*) (struct buf *), |
dev_t, RF_SectorNum_t, RF_SectorCount_t, caddr_t, void (*) (struct buf *), |
void *, int, struct proc *); |
void *, int, struct proc *); |
static void raidinit(RF_Raid_t *, int); |
static void raidinit(RF_Raid_t *); |
|
|
void raidattach(int); |
void raidattach(int); |
static int raid_match(struct device *, struct cfdata *, void *); |
static int raid_match(struct device *, struct cfdata *, void *); |
Line 978 raidioctl(dev_t dev, u_long cmd, caddr_t |
|
Line 978 raidioctl(dev_t dev, u_long cmd, caddr_t |
|
this RAID device */ |
this RAID device */ |
raidPtr->openings = RAIDOUTSTANDING; |
raidPtr->openings = RAIDOUTSTANDING; |
|
|
raidinit(raidPtr, 0); |
raidinit(raidPtr); |
rf_markalldirty(raidPtr); |
rf_markalldirty(raidPtr); |
} |
} |
/* free the buffers. No return code here. */ |
/* free the buffers. No return code here. */ |
Line 1657 raidioctl(dev_t dev, u_long cmd, caddr_t |
|
Line 1657 raidioctl(dev_t dev, u_long cmd, caddr_t |
|
|
|
|
|
static void |
static void |
raidinit(RF_Raid_t *raidPtr, int autoconf) |
raidinit(RF_Raid_t *raidPtr) |
{ |
{ |
struct cfdata *cf; |
struct cfdata *cf; |
struct raid_softc *rs; |
struct raid_softc *rs; |
Line 1692 raidinit(RF_Raid_t *raidPtr, int autocon |
|
Line 1692 raidinit(RF_Raid_t *raidPtr, int autocon |
|
/* disk_attach actually creates space for the CPU disklabel, among |
/* disk_attach actually creates space for the CPU disklabel, among |
* other things, so it's critical to call this *BEFORE* we try putzing |
* other things, so it's critical to call this *BEFORE* we try putzing |
* with disklabels. */ |
* with disklabels. */ |
if (autoconf) |
|
pseudo_disk_init(&rs->sc_dkdev); |
|
|
|
pseudo_disk_attach(&rs->sc_dkdev); |
disk_attach(&rs->sc_dkdev); |
|
|
/* XXX There may be a weird interaction here between this, and |
/* XXX There may be a weird interaction here between this, and |
* protectedSectors, as used in RAIDframe. */ |
* protectedSectors, as used in RAIDframe. */ |
Line 3331 rf_auto_config_set(RF_ConfigSet_t *cset, |
|
Line 3329 rf_auto_config_set(RF_ConfigSet_t *cset, |
|
|
|
if (retcode == 0) { |
if (retcode == 0) { |
|
|
raidinit(raidPtrs[raidID], 1); |
raidinit(raidPtrs[raidID]); |
|
|
rf_markalldirty(raidPtrs[raidID]); |
rf_markalldirty(raidPtrs[raidID]); |
raidPtrs[raidID]->autoconfigure = 1; /* XXX do this here? */ |
raidPtrs[raidID]->autoconfigure = 1; /* XXX do this here? */ |
Line 3427 raid_attach(struct device *parent, struc |
|
Line 3425 raid_attach(struct device *parent, struc |
|
{ |
{ |
struct raid_softc *rs = (struct raid_softc *)self; |
struct raid_softc *rs = (struct raid_softc *)self; |
|
|
pseudo_disk_init(&rs->sc_dkdev); |
|
} |
} |
|
|
|
|