Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Divide the list of struct buf ops into three categor...



details:   https://anonhg.NetBSD.org/src/rev/32f85b7d54a5
branches:  trunk
changeset: 342849:32f85b7d54a5
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Jan 11 01:08:09 2016 +0000

description:
Divide the list of struct buf ops into three categories:
  the ones that are part of bufferio(9) (or physio(9))
  the ones that are part of buffercache(9)
  the ones that aren't documented and thus aren't clear yet

diffstat:

 sys/sys/buf.h |  45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diffs (81 lines):

diff -r 240f7eac374a -r 32f85b7d54a5 sys/sys/buf.h
--- a/sys/sys/buf.h     Mon Jan 11 00:46:21 2016 +0000
+++ b/sys/sys/buf.h     Mon Jan 11 01:08:09 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.122 2016/01/11 00:46:21 dholland Exp $ */
+/*     $NetBSD: buf.h,v 1.123 2016/01/11 01:08:09 dholland Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -267,28 +267,44 @@
 extern struct bqueue bufqueues[BQUEUES];
 
 __BEGIN_DECLS
-int    allocbuf(buf_t *, int, int);
-void   bawrite(buf_t *);
-void   bdwrite(buf_t *);
+/*
+ * bufferio(9) ops
+ */
 void   biodone(buf_t *);
 int    biowait(buf_t *);
+buf_t  *getiobuf(struct vnode *, bool);
+void   putiobuf(buf_t *);
+void   nestiobuf_setup(buf_t *, buf_t *, int, size_t);
+void   nestiobuf_done(buf_t *, int, int);
+
+void   nestiobuf_iodone(buf_t *);
+int    physio(void (*)(buf_t *), buf_t *, dev_t, int,
+              void (*)(buf_t *), struct uio *);
+
+/*
+ * buffercache(9) ops
+ */
 int    bread(struct vnode *, daddr_t, int, int, buf_t **);
 int    breadn(struct vnode *, daddr_t, int, daddr_t *, int *, int,
               int, buf_t **);
+int    bwrite(buf_t *);
+void   bawrite(buf_t *);
+void   bdwrite(buf_t *);
+buf_t  *getblk(struct vnode *, daddr_t, int, int, int);
+buf_t  *geteblk(int);
+buf_t  *incore(struct vnode *, daddr_t);
+int    allocbuf(buf_t *, int, int);
 void   brelsel(buf_t *, int);
 void   brelse(buf_t *, int);
+
+/*
+ * So-far indeterminate ops that might belong to either
+ * bufferio(9) or buffercache(9).
+ */
 void   bremfree(buf_t *);
 void   bufinit(void);
 void   bufinit2(void);
-int    bwrite(buf_t *);
-buf_t  *getblk(struct vnode *, daddr_t, int, int, int);
-buf_t  *geteblk(int);
-buf_t  *incore(struct vnode *, daddr_t);
-
 void   minphys(buf_t *);
-int    physio(void (*)(buf_t *), buf_t *, dev_t, int,
-              void (*)(buf_t *), struct uio *);
-
 void   brelvp(buf_t *);
 void   reassignbuf(buf_t *, struct vnode *);
 void   bgetvp(struct vnode *, buf_t *);
@@ -300,15 +316,10 @@
 void   vfs_buf_print(buf_t *, int, void (*)(const char *, ...)
     __printflike(1, 2));
 #endif
-buf_t  *getiobuf(struct vnode *, bool);
-void   putiobuf(buf_t *);
 void   buf_init(buf_t *);
 void   buf_destroy(buf_t *);
 int    bbusy(buf_t *, bool, int, kmutex_t *);
 
-void   nestiobuf_iodone(buf_t *);
-void   nestiobuf_setup(buf_t *, buf_t *, int, size_t);
-void   nestiobuf_done(buf_t *, int, int);
 
 __END_DECLS
 #endif /* _KERNEL */



Home | Main Index | Thread Index | Old Index