Add B_ORDERED buffer flag and prototype for the bowrite function.

Bowrite guarantees that buffers queued after a call to bowrite will
be written after the specified buffer (to a particular device).
Bowrite does this either by taking advantage of hardware ordering support
(e.g. tagged queueing on SCSI devices) or by resorting to a synchronous write.
This commit is contained in:
Justin T. Gibbs 1996-09-06 05:35:00 +00:00
parent 619c58eea0
commit 2eb24859bc
2 changed files with 12 additions and 8 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.9 (Berkeley) 3/30/95
* $Id: buf.h,v 1.31 1996/05/01 02:15:29 bde Exp $
* $Id: buf.h,v 1.32 1996/05/03 20:56:09 phk Exp $
*/
#ifndef _SYS_BUF_H_
@ -145,6 +145,7 @@ struct buf {
#define B_WRITEINPROG 0x01000000 /* Write in progress. */
#define B_XXX 0x02000000 /* Debugging flag. */
#define B_PAGING 0x04000000 /* volatile paging I/O -- bypass VMIO */
#define B_ORDERED 0x08000000 /* Must guarantee I/O ordering */
#define B_VMIO 0x20000000 /* VMIO flag */
#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
#define B_BOUNCE 0x80000000 /* bounce buffer flag */
@ -205,6 +206,7 @@ int breadn __P((struct vnode *, daddr_t, int, daddr_t *, int *, int,
int bwrite __P((struct buf *));
void bdwrite __P((struct buf *));
void bawrite __P((struct buf *));
int bowrite __P((struct buf *));
void brelse __P((struct buf *));
void bqrelse __P((struct buf *));
int vfs_bio_awrite __P((struct buf *));

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.9 (Berkeley) 3/30/95
* $Id: buf.h,v 1.31 1996/05/01 02:15:29 bde Exp $
* $Id: buf.h,v 1.32 1996/05/03 20:56:09 phk Exp $
*/
#ifndef _SYS_BUF_H_
@ -145,6 +145,7 @@ struct buf {
#define B_WRITEINPROG 0x01000000 /* Write in progress. */
#define B_XXX 0x02000000 /* Debugging flag. */
#define B_PAGING 0x04000000 /* volatile paging I/O -- bypass VMIO */
#define B_ORDERED 0x08000000 /* Must guarantee I/O ordering */
#define B_VMIO 0x20000000 /* VMIO flag */
#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
#define B_BOUNCE 0x80000000 /* bounce buffer flag */
@ -205,6 +206,7 @@ int breadn __P((struct vnode *, daddr_t, int, daddr_t *, int *, int,
int bwrite __P((struct buf *));
void bdwrite __P((struct buf *));
void bawrite __P((struct buf *));
int bowrite __P((struct buf *));
void brelse __P((struct buf *));
void bqrelse __P((struct buf *));
int vfs_bio_awrite __P((struct buf *));