* Copyright (c) 1991 Regents of the University of California.
* %sccs.include.redist.c%
* @(#)lfs_bio.c 7.3 (Berkeley) %G%
#include <sys/resourcevar.h>
#include <ufs/lfs/lfs_extern.h>
* LFS version of bawrite, bdwrite, bwrite. Set the delayed write
* flag and use reassignbuf to move the buffer from the clean list
* to the dirty one, then unlock the buffer. Note, we set the
* B_LOCKED flag, which causes brelse to move the buffer onto the
* LOCKED free list. This is necessary, otherwise getnewbuf() would
* try to reclaim them using bawrite, which isn't going to work.
* No accounting for the cost of the write is currently done.
* This is almost certainly wrong for synchronous operations, i.e. NFS.
bp
->b_flags
|= B_DELWRI
| B_LOCKED
;
bp
->b_flags
&= ~(B_READ
| B_DONE
| B_ERROR
);
reassignbuf(bp
, bp
->b_vp
);