Update the print mask for decoding b_flags. Add print masks for

b_vflags and b_xflags_t and print them as well.

MFC after:   1 week
This commit is contained in:
Konstantin Belousov 2012-06-02 18:44:40 +00:00
parent fa9f322df9
commit 705de7c19e
2 changed files with 9 additions and 3 deletions

View File

@ -3995,7 +3995,9 @@ DB_SHOW_COMMAND(buffer, db_show_buffer)
}
db_printf("buf at %p\n", bp);
db_printf("b_flags = 0x%b\n", (u_int)bp->b_flags, PRINT_BUF_FLAGS);
db_printf("b_flags = 0x%b b_xflags=0x%b b_vflags=0x%b\n",
(u_int)bp->b_flags, PRINT_BUF_FLAGS, (u_int)bp->b_xflags,
PRINT_BUF_XFLAGS, (u_int)bp->b_vflags, PRINT_BUF_VFLAGS);
db_printf(
"b_error = %d, b_bufsize = %ld, b_bcount = %ld, b_resid = %ld\n"
"b_bufobj = (%p), b_data = %p, b_blkno = %jd, b_lblkno = %jd, "

View File

@ -224,8 +224,8 @@ struct buf {
#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
#define B_REMFREE 0x80000000 /* Delayed bremfree */
#define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34b27" \
"\33paging\32b25\31b24\30b23\27relbuf\26dirty\25b20" \
#define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34managed" \
"\33paging\32needsgiant\31nocopy\30b23\27relbuf\26dirty\25b20" \
"\24b19\23b18\22clusterok\21malloc\20nocache\17b14\16inval" \
"\15b12\14b11\13eintr\12done\11persist\10delwri\7validsuspwrt" \
"\6cache\5deferred\4direct\3async\2needcommit\1age"
@ -239,6 +239,8 @@ struct buf {
#define BX_BKGRDMARKER 0x00000020 /* Mark buffer for splay tree */
#define BX_ALTDATA 0x00000040 /* Holds extended data */
#define PRINT_BUF_XFLAGS "\20\7altdata\6bkgrdmarker\5bkgrdwrite\2clean\1dirty"
#define NOOFFSET (-1LL) /* No buffer offset calculated yet */
/*
@ -249,6 +251,8 @@ struct buf {
#define BV_BKGRDWAIT 0x00000004 /* Background write waiting */
#define BV_INFREECNT 0x80000000 /* buf is counted in numfreebufs */
#define PRINT_BUF_VFLAGS "\20\40infreecnt\3bkrgwait\2bkgrdinprog\1scanned"
#ifdef _KERNEL
/*
* Buffer locking