From c66aa10c8e6167eefdae7f218765e3e5f146074a Mon Sep 17 00:00:00 2001 From: phk 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/vm/vnode_pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/vm') diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 30bd8c7..84aa6b4 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -798,7 +798,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage) * round up physical size for real devices. */ if (dp->v_type == VBLK || dp->v_type == VCHR) { - int secmask = dp->v_rdev->si_bsize_phys - 1; + int secmask = dp->v_bufobj.bo_bsize - 1; KASSERT(secmask < PAGE_SIZE, ("vnode_pager_generic_getpages: sector size %d too large\n", secmask + 1)); size = (size + secmask) & ~secmask; } -- cgit v1.1