diff options
author | julian <julian@FreeBSD.org> | 1999-09-09 19:08:44 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-09-09 19:08:44 +0000 |
commit | 5c78e7345a2fd91174249db5a41aec14e57f1fb3 (patch) | |
tree | e7d99a6be8ccf0086169fae4fdd8377ccf9252be /sys/dev | |
parent | d475da44561ed80c7ceb7e75432d70a726c7e751 (diff) | |
download | FreeBSD-src-5c78e7345a2fd91174249db5a41aec14e57f1fb3.zip FreeBSD-src-5c78e7345a2fd91174249db5a41aec14e57f1fb3.tar.gz |
Changes to centralise the default blocksize behaviour.
More likely to follow.
Submitted by: phk@freebsd.org
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ccd/ccd.c | 4 | ||||
-rw-r--r-- | sys/dev/fdc/fdc.c | 3 | ||||
-rw-r--r-- | sys/dev/mcd/mcd.c | 4 | ||||
-rw-r--r-- | sys/dev/scd/scd.c | 4 | ||||
-rw-r--r-- | sys/dev/vinum/vinum.c | 3 | ||||
-rw-r--r-- | sys/dev/vn/vn.c | 5 |
6 files changed, 5 insertions, 18 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index 7badacb..a889ca3 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -633,10 +633,6 @@ ccdopen(dev, flags, fmt, p) part = ccdpart(dev); pmask = (1 << part); - dev->si_bsize_phys = DEV_BSIZE; - dev->si_bsize_best = BLKDEV_IOSIZE; - dev->si_bsize_max = MAXBSIZE; - /* * If we're initialized, check to see if there are any other * open partitions. If not, then it's safe to update diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index ee74217..7e6b0b3 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -1279,9 +1279,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p) fd_p fd; fdc_p fdc; - dev->si_bsize_phys = DEV_BSIZE; - dev->si_bsize_best = BLKDEV_IOSIZE; - dev->si_bsize_max = MAXBSIZE; /* check bounds */ if ((fd = devclass_get_softc(fd_devclass, fdu)) == 0) return (ENXIO); diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 37bd508..19f35e6 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -296,8 +296,6 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p) if (!(cd->flags & MCDVALID) && cd->openflags) return ENXIO; - dev->si_bsize_phys = 2048; - dev->si_bsize_max = MAXBSIZE; if (mcd_getstat(unit,1) == -1) return EIO; @@ -352,6 +350,8 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p) MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n", part, cd->disksize, cd->blksize); + dev->si_bsize_phys = cd->blksize; + if (part == RAW_PART || (part < cd->dlabel.d_npartitions && cd->dlabel.d_partitions[part].p_fstype != FS_UNUSED)) { diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 1742fdd..719c86b 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -258,8 +258,6 @@ scdopen(dev_t dev, int flags, int fmt, struct proc *p) XDEBUG(1,("scd%d: DEBUG: status = 0x%x\n", unit, inb(cd->iobase+IREG_STATUS))); - dev->si_bsize_phys = 2048; - dev->si_bsize_max = MAXBSIZE; if ((rc = spin_up(unit)) != 0) { print_error(unit, rc); return EIO; @@ -281,6 +279,8 @@ scdopen(dev_t dev, int flags, int fmt, struct proc *p) } } + dev->si_bsize_phys = cd->blksize; + cd->openflag = 1; cd->flags |= SCDVALID; diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 2482185..c70b1c7 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -268,9 +268,6 @@ vinumopen(dev_t dev, int devminor; /* minor number */ devminor = minor(dev); - dev->si_bsize_phys = DEV_BSIZE; - dev->si_bsize_best = VINUM_BSIZE_BEST; /* kludge until we track drive block sizes */ - dev->si_bsize_max = MAXBSIZE; error = 0; /* First, decide what we're looking at */ switch (DEVTYPE(dev)) { diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c index f51efca..199c804 100644 --- a/sys/dev/vn/vn.c +++ b/sys/dev/vn/vn.c @@ -510,10 +510,7 @@ vniocattach_file(vn, vio, dev, flag, p) (void) vn_close(nd.ni_vp, flags, p->p_ucred, p); return(error); } - if (dev->si_bsize_phys < vn->sc_secsize) - dev->si_bsize_phys = vn->sc_secsize; - if (dev->si_bsize_best < vn->sc_secsize) - dev->si_bsize_best = vn->sc_secsize; + dev->si_bsize_phys = vn->sc_secsize; vn->sc_flags |= VNF_INITED; if (flags == FREAD) vn->sc_flags |= VNF_READONLY; |