diff options
author | phk <phk@FreeBSD.org> | 2004-10-26 07:39:12 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-26 07:39:12 +0000 |
commit | c66aa10c8e6167eefdae7f218765e3e5f146074a (patch) | |
tree | 99d735718c70e881e08ae2c1a8455ddc64133e68 /sys/kern/vfs_bio.c | |
parent | 343104d2b1da0fbfb5e5c9c1fe56d2669864ca17 (diff) | |
download | FreeBSD-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.c | 9 |
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); |