This cleans up the buffer flags so we can add a few later without going stupid.
Index: sys/buf.h =================================================================== RCS file: /cvs/src/sys/sys/buf.h,v retrieving revision 1.74 diff -u -r1.74 buf.h --- sys/buf.h 22 Sep 2010 01:18:57 -0000 1.74 +++ sys/buf.h 3 Apr 2011 09:22:46 -0000 @@ -189,6 +189,7 @@ /* * 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 @@ #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_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 "\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_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