aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/bio.h
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>1999-03-02 04:04:31 +0000
committerKirk McKusick <mckusick@FreeBSD.org>1999-03-02 04:04:31 +0000
commiteef33ce9bdc93d8fec1e9782602ba39ce04edf62 (patch)
tree917450209669050a93227a1ee6395decc2eb043f /sys/sys/bio.h
parentf6c2429116ed3baadae8a9796a9ba97c951907c8 (diff)
downloadsrc-eef33ce9bdc93d8fec1e9782602ba39ce04edf62.tar.gz
src-eef33ce9bdc93d8fec1e9782602ba39ce04edf62.zip
When fsync'ing a file on a filesystem using soft updates, we first try
to write all the dirty blocks. If some of those blocks have dependencies, they will be remarked dirty when the I/O completes. On systems with really fast I/O systems, it is possible to get in an infinite loop trying to flush the buffers, because the I/O finishes before we can get all the dirty buffers off the v_dirtyblkhd list and into the I/O queue. (The previous algorithm looped over the v_dirtyblkhd list writing out buffers until the list emptied.) So, now we mark each buffer that we try to write so that we can distinguish the ones that are being remarked dirty from those that we have not yet tried to flush. Once we have tried to push every buffer once, we then push any associated metadata that is causing the remaining buffers to be redirtied. Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Notes
Notes: svn path=/head/; revision=44391
Diffstat (limited to 'sys/sys/bio.h')
-rw-r--r--sys/sys/bio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index 58b309b232e3..5ce4039ce904 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.9 (Berkeley) 3/30/95
- * $Id: buf.h,v 1.62 1999/01/21 08:29:08 dillon Exp $
+ * $Id: buf.h,v 1.63 1999/01/21 13:41:12 peter Exp $
*/
#ifndef _SYS_BUF_H_
@@ -164,7 +164,7 @@ struct buf {
#define B_DONE 0x00000200 /* I/O completed. */
#define B_EINTR 0x00000400 /* I/O was interrupted */
#define B_ERROR 0x00000800 /* I/O error occurred. */
-#define B_AVAIL2 0x00001000 /* Available flag */
+#define B_SCANNED 0x00001000 /* VOP_FSYNC funcs mark written bufs */
#define B_INVAL 0x00002000 /* Does not contain valid info. */
#define B_LOCKED 0x00004000 /* Locked in core (not reusable). */
#define B_NOCACHE 0x00008000 /* Do not cache block after use. */