Module Name: src Committed By: rmind Date: Wed Nov 11 07:22:34 UTC 2009
Modified Files: src/sys/kern: vfs_bio.c src/sys/sys: buf.h Log Message: G/C unused breada() and bdirty(). To generate a diff of this commit: cvs rdiff -u -r1.219 -r1.220 src/sys/kern/vfs_bio.c cvs rdiff -u -r1.113 -r1.114 src/sys/sys/buf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/vfs_bio.c diff -u src/sys/kern/vfs_bio.c:1.219 src/sys/kern/vfs_bio.c:1.220 --- src/sys/kern/vfs_bio.c:1.219 Thu Nov 5 16:15:51 2009 +++ src/sys/kern/vfs_bio.c Wed Nov 11 07:22:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.219 2009/11/05 16:15:51 pooka Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.220 2009/11/11 07:22:33 rmind Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -107,7 +107,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.219 2009/11/05 16:15:51 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.220 2009/11/11 07:22:33 rmind Exp $"); #include "fs_ffs.h" #include "opt_bufcache.h" @@ -762,20 +762,6 @@ } /* - * Read with single-block read-ahead. Defined in Bach (p.55), but - * implemented as a call to breadn(). - * XXX for compatibility with old file systems. - */ -int -breada(struct vnode *vp, daddr_t blkno, int size, daddr_t rablkno, - int rabsize, kauth_cred_t cred, int flags, buf_t **bpp) -{ - - return (breadn(vp, blkno, size, &rablkno, &rabsize, 1, - cred, flags, bpp)); -} - -/* * Block write. Described in Bach (p.56) */ int @@ -957,28 +943,6 @@ } /* - * Same as first half of bdwrite, mark buffer dirty, but do not release it. - * Call with the buffer interlock held. - */ -void -bdirty(buf_t *bp) -{ - - KASSERT(mutex_owned(&bufcache_lock)); - KASSERT(bp->b_objlock == &bp->b_vp->v_interlock); - KASSERT(mutex_owned(bp->b_objlock)); - KASSERT(ISSET(bp->b_cflags, BC_BUSY)); - - CLR(bp->b_cflags, BC_AGE); - - if (!ISSET(bp->b_oflags, BO_DELWRI)) { - SET(bp->b_oflags, BO_DELWRI); - curlwp->l_ru.ru_oublock++; - reassignbuf(bp, bp->b_vp); - } -} - -/* * Release a buffer on to the free lists. * Described in Bach (p. 46). */ Index: src/sys/sys/buf.h diff -u src/sys/sys/buf.h:1.113 src/sys/sys/buf.h:1.114 --- src/sys/sys/buf.h:1.113 Sun Aug 16 10:57:17 2009 +++ src/sys/sys/buf.h Wed Nov 11 07:22:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.113 2009/08/16 10:57:17 yamt Exp $ */ +/* $NetBSD: buf.h,v 1.114 2009/11/11 07:22:34 rmind Exp $ */ /*- * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc. @@ -225,7 +225,7 @@ #define B_METAONLY 0x04 /* Return indirect block buffer. */ #define B_CONTIG 0x08 /* Allocate file contiguously. */ -/* Flags to bread(), breadn() and breada(). */ +/* Flags to bread() and breadn(). */ #define B_MODIFY 0x01 /* Hint: caller might modify buffer */ #ifdef _KERNEL @@ -259,18 +259,14 @@ }; extern struct bqueue bufqueues[BQUEUES]; -extern struct simplelock bqueue_slock; __BEGIN_DECLS int allocbuf(buf_t *, int, int); void bawrite(buf_t *); -void bdirty(buf_t *); void bdwrite(buf_t *); void biodone(buf_t *); int biowait(buf_t *); int bread(struct vnode *, daddr_t, int, struct kauth_cred *, int, buf_t **); -int breada(struct vnode *, daddr_t, int, daddr_t, int, struct kauth_cred *, - int, buf_t **); int breadn(struct vnode *, daddr_t, int, daddr_t *, int *, int, struct kauth_cred *, int, buf_t **); void brelsel(buf_t *, int);