diff options
author | phk <phk@FreeBSD.org> | 2005-02-19 11:44:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-02-19 11:44:57 +0000 |
commit | 66dfd6396149e353342cd31080e6b88469aec335 (patch) | |
tree | d9295850a39808606f8fe29612e510d2f3b4ef1a /sys/geom/geom_vfs.c | |
parent | 480b39e8f236038a1603ca2d67104be32bf2b696 (diff) | |
download | FreeBSD-src-66dfd6396149e353342cd31080e6b88469aec335.zip FreeBSD-src-66dfd6396149e353342cd31080e6b88469aec335.tar.gz |
Try to unbreak the vnode locking around vop_reclaim() (based mostly on
patch from kan@).
Pull bufobj_invalbuf() out of vinvalbuf() and make g_vfs call it on
close. This is not yet a generally safe function, but for this very
specific use it is safe. This solves the problem with buffers not
being flushed by unmount or after failed mount attempts.
Diffstat (limited to 'sys/geom/geom_vfs.c')
-rw-r--r-- | sys/geom/geom_vfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index c875897..d8f6c1d 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -153,6 +153,7 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; + gp->softc = bo; return (error); } @@ -161,9 +162,12 @@ void g_vfs_close(struct g_consumer *cp, struct thread *td) { struct g_geom *gp; + struct bufobj *bo; g_topology_assert(); gp = cp->geom; + bo = gp->softc; + bufobj_invalbuf(bo, V_SAVE, td, 0, 0); g_wither_geom_close(gp, ENXIO); } |