Source-Changes-HG archive

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

[src/trunk]: src/sys/kern - Implement bowrite() -- perform an asynchronous, o...



details:   https://anonhg.NetBSD.org/src/rev/8041d357014e
branches:  trunk
changeset: 480858:8041d357014e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jan 21 23:22:24 2000 +0000

description:
- Implement bowrite() -- perform an asynchronous, ordered write.

diffstat:

 sys/kern/vfs_bio.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 3481093c6bef -r 8041d357014e sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c        Fri Jan 21 23:21:46 2000 +0000
+++ b/sys/kern/vfs_bio.c        Fri Jan 21 23:22:24 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_bio.c,v 1.62 1999/12/03 21:43:20 ragge Exp $       */
+/*     $NetBSD: vfs_bio.c,v 1.63 2000/01/21 23:22:24 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -451,6 +451,18 @@
 }
 
 /*
+ * Ordered block write; asynchronous, but I/O will occur in order queued.
+ */
+void
+bowrite(bp)
+       struct buf *bp;
+{
+
+       SET(bp->b_flags, B_ASYNC | B_ORDERED);
+       VOP_BWRITE(bp);
+}
+
+/*
  * Same as first half of bdwrite, mark buffer dirty, but do not release it.
  */
 void
@@ -563,7 +575,7 @@
 
 already_queued:
        /* Unlock the buffer. */
-       CLR(bp->b_flags, B_AGE|B_ASYNC|B_BUSY|B_NOCACHE);
+       CLR(bp->b_flags, B_AGE|B_ASYNC|B_BUSY|B_NOCACHE|B_ORDERED);
 
        /* Allow disk interrupts. */
        splx(s);



Home | Main Index | Thread Index | Old Index