summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-10-26 07:39:12 +0000
committerphk <phk@FreeBSD.org>2004-10-26 07:39:12 +0000
commitc66aa10c8e6167eefdae7f218765e3e5f146074a (patch)
tree99d735718c70e881e08ae2c1a8455ddc64133e68 /sys/ufs
parent343104d2b1da0fbfb5e5c9c1fe56d2669864ca17 (diff)
downloadFreeBSD-src-c66aa10c8e6167eefdae7f218765e3e5f146074a.zip
FreeBSD-src-c66aa10c8e6167eefdae7f218765e3e5f146074a.tar.gz
Put the I/O block size in bufobj->bo_bsize.
We keep si_bsize_phys around for now as that is the simplest way to pull the number out of disk device drivers in devfs_open(). The correct solution would be to do an ioctl(DIOCGSECTORSIZE), but the point is probably mooth when filesystems sit on GEOM, so don't bother for now.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_rawread.c2
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c
index 05f1577..2e15704 100644
--- a/sys/ufs/ffs/ffs_rawread.c
+++ b/sys/ufs/ffs/ffs_rawread.c
@@ -446,7 +446,7 @@ ffs_rawread(struct vnode *vp,
/* Only handle sector aligned reads */
ip = VTOI(vp);
- secsize = ip->i_devvp->v_rdev->si_bsize_phys;
+ secsize = ip->i_devvp->v_bufobj.bo_bsize;
if ((uio->uio_offset & (secsize - 1)) == 0 &&
(uio->uio_resid & (secsize - 1)) == 0) {
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index ad63665..259dc00 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1242,6 +1242,7 @@ ffs_vget(mp, ino, flags, vpp)
fs = ump->um_fs;
vp->v_vnlock->lk_flags |= LK_CANRECURSE;
vp->v_data = ip;
+ vp->v_bufobj.bo_bsize = fs->fs_bsize;
ip->i_vnode = vp;
ip->i_ump = ump;
ip->i_fs = fs;
OpenPOWER on IntegriCloud