From 5d9d81e7ea1188312976a9bb565517f1f46e799a Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 26 Oct 2004 07:39:12 +0000 Subject: 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. --- sys/kern/vfs_subr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern/vfs_subr.c') 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); -- cgit v1.2.3