Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys G/C unused breada() and bdirty().
details: https://anonhg.NetBSD.org/src/rev/09cca7afd62e
branches: trunk
changeset: 748934:09cca7afd62e
user: rmind <rmind%NetBSD.org@localhost>
date: Wed Nov 11 07:22:33 2009 +0000
description:
G/C unused breada() and bdirty().
diffstat:
sys/kern/vfs_bio.c | 40 ++--------------------------------------
sys/sys/buf.h | 8 ++------
2 files changed, 4 insertions(+), 44 deletions(-)
diffs (105 lines):
diff -r 813cc8ba9073 -r 09cca7afd62e sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c Wed Nov 11 05:19:34 2009 +0000
+++ b/sys/kern/vfs_bio.c Wed Nov 11 07:22:33 2009 +0000
@@ -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).
*/
diff -r 813cc8ba9073 -r 09cca7afd62e sys/sys/buf.h
--- a/sys/sys/buf.h Wed Nov 11 05:19:34 2009 +0000
+++ b/sys/sys/buf.h Wed Nov 11 07:22:33 2009 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index