diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2011-04-03 13:52:10 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2011-04-03 13:52:10 +0000 |
commit | 14ac38fcd93d0d22f3bd8743f823a36ae175dc4f (patch) | |
tree | a7eb96441e80f03e45c61a850344bcf081f13908 | |
parent | 194607b9af76ad8549cc04115b180b4459dd888d (diff) |
Clean up buf flags
ok thib@
-rw-r--r-- | sys/sys/buf.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 9f9e58cda6c..4f3a5a75b49 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.h,v 1.74 2010/09/22 01:18:57 matthew Exp $ */ +/* $OpenBSD: buf.h,v 1.75 2011/04/03 13:52:09 beck Exp $ */ /* $NetBSD: buf.h,v 1.25 1997/04/09 21:12:17 mycroft Exp $ */ /* @@ -189,6 +189,7 @@ struct buf { /* * These flags are kept in b_flags. */ +#define B_WRITE 0x00000000 /* Write buffer (pseudo flag). */ #define B_AGE 0x00000001 /* Move to age queue when I/O done. */ #define B_NEEDCOMMIT 0x00000002 /* Needs committing to stable storage */ #define B_ASYNC 0x00000004 /* Start I/O, do not wait. */ @@ -197,29 +198,28 @@ struct buf { #define B_CACHE 0x00000020 /* Bread found us in the cache. */ #define B_CALL 0x00000040 /* Call b_iodone from biodone. */ #define B_DELWRI 0x00000080 /* Delay I/O until buffer reused. */ -#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_INVAL 0x00002000 /* Does not contain valid info. */ -#define B_NOCACHE 0x00008000 /* Do not cache block after use. */ -#define B_PHYS 0x00040000 /* I/O to user memory. */ -#define B_RAW 0x00080000 /* Set by physio for raw transfers. */ -#define B_READ 0x00100000 /* Read buffer. */ -#define B_WANTED 0x00800000 /* Process wants this buffer. */ -#define B_WRITE 0x00000000 /* Write buffer (pseudo flag). */ -#define B_WRITEINPROG 0x01000000 /* Write in progress. */ -#define B_XXX 0x02000000 /* Debugging flag. */ -#define B_DEFERRED 0x04000000 /* Skipped over for cleaning */ -#define B_SCANNED 0x08000000 /* Block already pushed during sync */ -#define B_PDAEMON 0x10000000 /* I/O started by pagedaemon */ -#define B_RELEASED 0x20000000 /* free this buffer after its kvm */ -#define B_NOTMAPPED 0x40000000 /* BUSY, but not necessarily mapped */ - -#define B_BITS "\010\001AGE\002NEEDCOMMIT\003ASYNC\004BAD\005BUSY\006CACHE" \ - "\007CALL\010DELWRI\012DONE\013EINTR\014ERROR" \ - "\016INVAL\020NOCACHE\023PHYS\024RAW\025READ" \ - "\030WANTED\031WRITEINPROG\032XXX\033DEFERRED" \ - "\034SCANNED\035PDAEMON" +#define B_DONE 0x00000100 /* I/O completed. */ +#define B_EINTR 0x00000200 /* I/O was interrupted */ +#define B_ERROR 0x00000400 /* I/O error occurred. */ +#define B_INVAL 0x00000800 /* Does not contain valid info. */ +#define B_NOCACHE 0x00001000 /* Do not cache block after use. */ +#define B_PHYS 0x00002000 /* I/O to user memory. */ +#define B_RAW 0x00004000 /* Set by physio for raw transfers. */ +#define B_READ 0x00008000 /* Read buffer. */ +#define B_WANTED 0x00010000 /* Process wants this buffer. */ +#define B_WRITEINPROG 0x00020000 /* Write in progress. */ +#define B_XXX 0x00040000 /* Debugging flag. */ +#define B_DEFERRED 0x00080000 /* Skipped over for cleaning */ +#define B_SCANNED 0x00100000 /* Block already pushed during sync */ +#define B_PDAEMON 0x00200000 /* I/O started by pagedaemon */ +#define B_RELEASED 0x00400000 /* free this buffer after its kvm */ +#define B_NOTMAPPED 0x00800000 /* BUSY, but not necessarily mapped */ + +#define B_BITS "\20\001AGE\002NEEDCOMMIT\003ASYNC\004BAD\005BUSY" \ + "\006CACHE\007CALL\010DELWRI\011DONE\012EINTR\013ERROR" \ + "\014INVAL\015NOCACHE\016PHYS\017RAW\020READ" \ + "\021WANTED\022WRITEINPROG\023XXX(FORMAT)\024DEFERRED" \ + "\025SCANNED\026DAEMON\027RELEASED\030NOTMAPPED" /* * This structure describes a clustered I/O. It is stored in the b_saveaddr |