diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-10-26 07:39:12 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-10-26 07:39:12 +0000 |
commit | 5d9d81e7ea1188312976a9bb565517f1f46e799a (patch) | |
tree | 99d735718c70e881e08ae2c1a8455ddc64133e68 /sys/kern/vfs_subr.c | |
parent | cd9c0da80556c43666942b576531d037e5c70546 (diff) | |
download | src-5d9d81e7ea1188312976a9bb565517f1f46e799a.tar.gz src-5d9d81e7ea1188312976a9bb565517f1f46e799a.zip |
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.
Notes
Notes:
svn path=/head/; revision=136966
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a233c5ae3f42..a7d3fc8b9ba2 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -863,8 +863,10 @@ getnewvnode(tag, mp, vops, vpp) printf("NULL mp in getnewvnode()\n"); #endif delmntque(vp); - if (mp != NULL) + if (mp != NULL) { insmntque(vp, mp); + bo->bo_bsize = mp->mnt_stat.f_iosize; + } return (0); } @@ -1812,6 +1814,7 @@ bdevvp(dev, vpp) } vp = nvp; vp->v_type = VCHR; + vp->v_bufobj.bo_bsize = DEV_BSIZE; addalias(vp, dev); *vpp = vp; return (0); |