summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
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/kern/vfs_bio.c
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/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 2c015b2..4b23f51 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2560,15 +2560,8 @@ loop:
splx(s);
return NULL;
}
- if (vn_isdisk(vp, NULL))
- bsize = DEV_BSIZE;
- else if (vp->v_mountedhere)
- bsize = vp->v_mountedhere->mnt_stat.f_iosize;
- else if (vp->v_mount)
- bsize = vp->v_mount->mnt_stat.f_iosize;
- else
- bsize = size;
+ bsize = bo->bo_bsize;
offset = blkno * bsize;
vmio = (VOP_GETVOBJECT(vp, NULL) == 0) &&
(vp->v_vflag & VV_OBJBUF);
OpenPOWER on IntegriCloud