diff options
author | phk <phk@FreeBSD.org> | 2004-03-11 18:50:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-03-11 18:50:33 +0000 |
commit | 5c532f7fd4286a2a53b4ac3a8381da5b89251557 (patch) | |
tree | 2b5985795bbbb2d7db3118632ad579bf98d8f94a /sys/fs | |
parent | 265fe61be82dff80c5b876620d07c8a8edcf4c25 (diff) | |
download | FreeBSD-src-5c532f7fd4286a2a53b4ac3a8381da5b89251557.zip FreeBSD-src-5c532f7fd4286a2a53b4ac3a8381da5b89251557.tar.gz |
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.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 97c3804..92094f0 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. |