From ceb58ca58f899443dec185367f2a02e0d789703a Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 11 Mar 2004 18:50:33 +0000 Subject: When I was a kid my work table was one cluttered mess an cleaning it up were a rather overwhelming task. I soon learned that if you don't know where you're going to store something, at least try to pile it next to something slightly related in the hope that a pattern emerges. Apply the same principle to the ffs/snapshot/softupdates code which have leaked into specfs: Add yet a buf-quasi-method and call it from the only two places I can see it can make a difference and implement the magic in ffs_softdep.c where it belongs. It's not pretty, but at least it's one less layer violated. --- sys/fs/specfs/spec_vnops.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'sys/fs') diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 97c3804d994e..92094f058044 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -463,7 +463,6 @@ static int spec_xstrategy(struct vnode *vp, struct buf *bp) { struct mount *mp; - int error; struct cdevsw *dsw; struct thread *td = curthread; @@ -481,25 +480,6 @@ spec_xstrategy(struct vnode *vp, struct buf *bp) PPAUSE | PCATCH | PDROP, "ioslow", td->td_ksegrp->kg_nice); } - if (bp->b_iocmd == BIO_WRITE) { - if ((bp->b_flags & B_VALIDSUSPWRT) == 0 && - bp->b_vp != NULL && bp->b_vp->v_mount != NULL && - (bp->b_vp->v_mount->mnt_kern_flag & MNTK_SUSPENDED) != 0) - panic("spec_strategy: bad I/O"); - bp->b_flags &= ~B_VALIDSUSPWRT; - if (LIST_FIRST(&bp->b_dep) != NULL) - buf_start(bp); - mp_fixme("This should require the vnode lock."); - if ((vp->v_vflag & VV_COPYONWRITE) && - vp->v_rdev->si_copyonwrite && - (error = (*vp->v_rdev->si_copyonwrite)(vp, bp)) != 0 && - error != EOPNOTSUPP) { - bp->b_io.bio_error = error; - bp->b_io.bio_flags |= BIO_ERROR; - biodone(&bp->b_io); - return (0); - } - } /* * Collect statistics on synchronous and asynchronous read * and write counts for disks that have associated filesystems. -- cgit v1.3