diff options
author | phk <phk@FreeBSD.org> | 1999-10-02 11:17:54 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-10-02 11:17:54 +0000 |
commit | 8d40c683c523becf9a62102cbbfa8a611c9b12e9 (patch) | |
tree | beb8e2a167d4ece68cbe6fa0d04ff06639360bf8 /sys/kern/subr_disk.c | |
parent | 00d6ea8520e791562db98f89fa12e9647e094879 (diff) | |
download | FreeBSD-src-8d40c683c523becf9a62102cbbfa8a611c9b12e9.zip FreeBSD-src-8d40c683c523becf9a62102cbbfa8a611c9b12e9.tar.gz |
Fix a problem relating to si_iosize_max which broke scsi devices.
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index bfa3d89..9c53bde 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -115,8 +115,10 @@ diskopen(dev_t dev, int oflags, int devtype, struct proc *p) if (!dp) return (ENXIO); - if (!dsisopen(dp->d_slice)) + if (!dsisopen(dp->d_slice)) { + pdev->si_iosize_max = dev->si_iosize_max; error = dp->d_devsw->d_open(pdev, oflags, devtype, p); + } /* Inherit properties from the whole/raw dev_t */ dev->si_disk = pdev->si_disk; @@ -163,12 +165,12 @@ diskstrategy(struct buf *bp) dp = bp->b_dev->si_disk; if (!dp) { pdev = dkmodpart(dkmodslice(bp->b_dev, WHOLE_DISK_SLICE), RAW_PART); - dp = pdev->si_disk; + dp = bp->b_dev->si_disk = pdev->si_disk; bp->b_dev->si_drv1 = pdev->si_drv1; bp->b_dev->si_drv2 = pdev->si_drv2; - /* XXX: don't set bp->b_dev->si_disk (?) */ - } else { - pdev = dp->d_dev; + bp->b_dev->si_iosize_max = pdev->si_iosize_max; + bp->b_dev->si_bsize_phys = pdev->si_bsize_phys; + bp->b_dev->si_bsize_best = pdev->si_bsize_best; } if (!dp) { |