summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_vfs.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-04-02 15:12:31 +0000
committeravg <avg@FreeBSD.org>2010-04-02 15:12:31 +0000
commitad244906c74c0dab6b5a3c0aed3426a7b51f2f3c (patch)
tree5a2b2410777b589cd53eed7c16c4cae71b743245 /sys/geom/geom_vfs.c
parentc65335fc919d64806cca03d40485891ca2bbc851 (diff)
downloadFreeBSD-src-ad244906c74c0dab6b5a3c0aed3426a7b51f2f3c.zip
FreeBSD-src-ad244906c74c0dab6b5a3c0aed3426a7b51f2f3c.tar.gz
bo_bsize: revert r205860 and take an alternative approch in getblk
In r205860 I missed the fact that there is code that strongly assumes that devvp bo_bsize is equal to underlying provider's sectorsize. In those places it is hard to obtain the sectorsize in an alternative way if devvp bo_bsize is set to something else. So, I am reverting bo_bsize assigment in g_vfs_open. Instead, in getblk I use DEV_BSIZE block size for b_offset calculation if vp is a disk vp as reported by vn_isdisk. This should coinside with vp being a devvp. Reported by: Mykola Dzham <i@levsha.me> Tested by: Mykola Dzham <i@levsha.me> Pointyhat to: avg MFC after: 2 weeks X-ToDo: convert bread(devvp) in all fs to use bo_bsize-d blocks
Diffstat (limited to 'sys/geom/geom_vfs.c')
-rw-r--r--sys/geom/geom_vfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c
index 9bfa746..9d01f40 100644
--- a/sys/geom/geom_vfs.c
+++ b/sys/geom/geom_vfs.c
@@ -179,7 +179,7 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr
bo = &vp->v_bufobj;
bo->bo_ops = g_vfs_bufops;
bo->bo_private = cp;
- bo->bo_bsize = DEV_BSIZE;
+ bo->bo_bsize = pp->sectorsize;
gp->softc = bo;
return (error);
OpenPOWER on IntegriCloud