diff options
| author | chs <chs@NetBSD.org> | 2020-02-18 20:23:17 +0000 |
|---|---|---|
| committer | chs <chs@NetBSD.org> | 2020-02-18 20:23:17 +0000 |
| commit | 90b433544daf19c1f8af26e849938db15a249726 (patch) | |
| tree | ddcdc47f3302ea20e048a140f8a8f338ca86a862 /sys/ufs/lfs/lfs_segment.c | |
| parent | 7805f568b3645b48f84a42bc1e6bac5f7179292a (diff) | |
remove the aiodoned thread. I originally added this to provide a thread context
for doing page cache iodone work, but since then biodone() has changed to
hand off all iodone work to a softint thread, so we no longer need the
special-purpose aiodoned thread.
Diffstat (limited to 'sys/ufs/lfs/lfs_segment.c')
| -rw-r--r-- | sys/ufs/lfs/lfs_segment.c | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/sys/ufs/lfs/lfs_segment.c b/sys/ufs/lfs/lfs_segment.c index 5191ee5903b..026ad9bc7fa 100644 --- a/sys/ufs/lfs/lfs_segment.c +++ b/sys/ufs/lfs/lfs_segment.c @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_segment.c,v 1.281 2020/01/15 17:55:44 ad Exp $ */ +/* $NetBSD: lfs_segment.c,v 1.282 2020/02/18 20:23:17 chs Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.281 2020/01/15 17:55:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.282 2020/02/18 20:23:17 chs Exp $"); #ifdef DEBUG # define vndebug(vp, str) do { \ @@ -109,11 +109,8 @@ __KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.281 2020/01/15 17:55:44 ad Exp $") MALLOC_JUSTDEFINE(M_SEGMENT, "LFS segment", "Segment for LFS"); -static void lfs_generic_callback(struct buf *, void (*)(struct buf *)); -static void lfs_free_aiodone(struct buf *); static void lfs_super_aiodone(struct buf *); static void lfs_cluster_aiodone(struct buf *); -static void lfs_cluster_callback(struct buf *); /* * Determine if it's OK to start a partial in this segment, or if we need @@ -136,7 +133,6 @@ static void lfs_cluster_callback(struct buf *); int lfs_match_fake(struct lfs *, struct buf *); void lfs_newseg(struct lfs *); -void lfs_supercallback(struct buf *); void lfs_updatemeta(struct segment *); void lfs_writesuper(struct lfs *, daddr_t); int lfs_writevnodes(struct lfs *fs, struct mount *mp, @@ -2007,7 +2003,7 @@ lfs_newclusterbuf(struct lfs *fs, struct vnode *vp, daddr_t addr, bp = getiobuf(vp, true); bp->b_dev = NODEV; bp->b_blkno = bp->b_lblkno = addr; - bp->b_iodone = lfs_cluster_callback; + bp->b_iodone = lfs_cluster_aiodone; bp->b_private = cl; return bp; @@ -2430,7 +2426,7 @@ lfs_writesuper(struct lfs *fs, daddr_t daddr) bp->b_flags = (bp->b_flags & ~B_READ) | B_ASYNC; bp->b_oflags &= ~(BO_DONE | BO_DELWRI); bp->b_error = 0; - bp->b_iodone = lfs_supercallback; + bp->b_iodone = lfs_super_aiodone; if (fs->lfs_sp != NULL && fs->lfs_sp->seg_flags & SEGM_SYNC) BIO_SETPRIO(bp, BPRIO_TIMECRITICAL); @@ -2508,7 +2504,7 @@ lfs_match_tindir(struct lfs *fs, struct buf *bp) return (lbn < 0 && (-lbn - ULFS_NDADDR) % LFS_NINDIR(fs) == 2); } -static void +void lfs_free_aiodone(struct buf *bp) { struct lfs *fs; @@ -2675,43 +2671,6 @@ lfs_cluster_aiodone(struct buf *bp) pool_put(&fs->lfs_clpool, cl); } -static void -lfs_generic_callback(struct buf *bp, void (*aiodone)(struct buf *)) -{ - /* reset b_iodone for when this is a single-buf i/o. */ - bp->b_iodone = aiodone; - - workqueue_enqueue(uvm.aiodone_queue, &bp->b_work, NULL); -} - -static void -lfs_cluster_callback(struct buf *bp) -{ - - lfs_generic_callback(bp, lfs_cluster_aiodone); -} - -void -lfs_supercallback(struct buf *bp) -{ - - lfs_generic_callback(bp, lfs_super_aiodone); -} - -/* - * The only buffers that are going to hit these functions are the - * segment write blocks, or the segment summaries, or the superblocks. - * - * All of the above are created by lfs_newbuf, and so do not need to be - * released via brelse. - */ -void -lfs_callback(struct buf *bp) -{ - - lfs_generic_callback(bp, lfs_free_aiodone); -} - /* * Shellsort (diminishing increment sort) from Data Structures and * Algorithms, Aho, Hopcraft and Ullman, 1983 Edition, page 290; |
