----- Original message ----- > > This cleans up the buffer flags so we can add a few later without > going stupid. i'm sure i already oked this as part of the larger diff (specifically this bit). So ok.
> > 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.hB B B 22 Sep 2010 01:18:57 -0000B B B 1.74 > +++ sys/buf.hB B B 3 Apr 2011 09:22:46 -0000 > @@ -189,6 +189,7 @@ >B /* >B B * These flags are kept in b_flags. >B B */ > +#defineB B B B_WRITEB B B B B B 0x00000000B B B /* Write buffer (pseudo > flag). */ >B #defineB B B B_AGEB B B B B B 0x00000001B B B /* Move to age queue >when I/O done. */ >B #defineB B B B_NEEDCOMMITB B B 0x00000002B B B /* Needs committing to >stable storage */ >B #defineB B B B_ASYNCB B B B B B 0x00000004B B B /* Start I/O, do not >wait. */ > @@ -197,29 +198,28 @@ >B #defineB B B B_CACHEB B B B B B 0x00000020B B B /* Bread found us in >the cache. */ >B #defineB B B B_CALLB B B B B B 0x00000040B B B /* Call b_iodone from >biodone. */ >B #defineB B B B_DELWRIB B B 0x00000080B B B /* Delay I/O until buffer >reused. */ > -#defineB B B B_DONEB B B B B B 0x00000200B B B /* I/O completed. */ > -#defineB B B B_EINTRB B B B B B 0x00000400B B B /* I/O was interrupted */ > -#defineB B B B_ERRORB B B B B B 0x00000800B B B /* I/O error occurred. */ > -#defineB B B B_INVALB B B B B B 0x00002000B B B /* Does not contain > valid info. */ > -#defineB B B B_NOCACHEB B B 0x00008000B B B /* Do not cache block after > use. */ > -#defineB B B B_PHYSB B B B B B 0x00040000B B B /* I/O to user memory. */ > -#defineB B B B_RAWB B B B B B 0x00080000B B B /* Set by physio for raw > transfers. */ > -#defineB B B B_READB B B B B B 0x00100000B B B /* Read buffer. */ > -#defineB B B B_WANTEDB B B 0x00800000B B B /* Process wants this buffer. > */ > -#defineB B B B_WRITEB B B B B B 0x00000000B B B /* Write buffer (pseudo > flag). */ > -#defineB B B B_WRITEINPROGB B B 0x01000000B B B /* Write in progress. */ > -#defineB B B B_XXXB B B B B B 0x02000000B B B /* Debugging flag. */ > -#defineB B B B_DEFERREDB B B 0x04000000B B B /* Skipped over for cleaning > */ > -#defineB B B B_SCANNEDB B B 0x08000000B B B /* Block already pushed > during sync */ > -#defineB B B B_PDAEMONB B B 0x10000000B B B /* I/O started by pagedaemon > */ > -#define B_RELEASEDB B B 0x20000000B B B /* free this buffer after its kvm > */ > -#define B_NOTMAPPEDB B B 0x40000000B B B /* BUSY, but not necessarily > mapped */ > +#defineB B B B_DONEB B B B B B 0x00000100B B B /* I/O completed. */ > +#defineB B B B_EINTRB B B B B B 0x00000200B B B /* I/O was interrupted */ > +#defineB B B B_ERRORB B B B B B 0x00000400B B B /* I/O error occurred. */ > +#defineB B B B_INVALB B B B B B 0x00000800B B B /* Does not contain > valid info. */ > +#defineB B B B_NOCACHEB B B 0x00001000B B B /* Do not cache block after > use. */ > +#defineB B B B_PHYSB B B B B B 0x00002000B B B /* I/O to user memory. */ > +#defineB B B B_RAWB B B B B B 0x00004000B B B /* Set by physio for raw > transfers. */ > +#defineB B B B_READB B B B B B 0x00008000B B B /* Read buffer. */ > +#defineB B B B_WANTEDB B B 0x00010000B B B /* Process wants this buffer. > */ > +#defineB B B B_WRITEINPROGB B B 0x00020000B B B /* Write in progress. */ > +#defineB B B B_XXXB B B B B B 0x00040000B B B /* Debugging flag. */ > +#defineB B B B_DEFERREDB B B 0x00080000B B B /* Skipped over for cleaning > */ > +#defineB B B B_SCANNEDB B B 0x00100000B B B /* Block already pushed > during sync */ > +#defineB B B B_PDAEMONB B B 0x00200000B B B /* I/O started by pagedaemon > */ > +#defineB B B B_RELEASEDB B B 0x00400000B B B /* free this buffer after > its kvm */ > +#defineB B B B_NOTMAPPEDB B B 0x00800000B B B /* BUSY, but not > necessarily mapped */ >B > -#defineB B B B_BITS > B B B "\010\001AGE\002NEEDCOMMIT\003ASYNC\004BAD\005BUSY\006CACHE" \ -B B > "\007CALL\010DELWRI\012DONE\013EINTR\014ERROR" \ -B B > "\016INVAL\020NOCACHE\023PHYS\024RAW\025READ" \ -B B > "\030WANTED\031WRITEINPROG\032XXX\033DEFERRED" \ -B B > "\034SCANNED\035PDAEMON" +#defineB B B B_BITS > B B B "\20\001AGE\002NEEDCOMMIT\003ASYNC\004BAD\005BUSY" \ +B B > "\006CACHE\007CALL\010DELWRI\011DONE\012EINTR\013ERROR" \ +B B > "\014INVAL\015NOCACHE\016PHYS\017RAW\020READ" \ +B B > "\021WANTED\022WRITEINPROG\023XXX(FORMAT)\024DEFERRED" \ +B B > "\025SCANNED\026DAEMON\027RELEASED\030NOTMAPPED" >B /* >B B * This structure describes a clustered I/O.B It is stored in the > b_saveaddr