Author: mckusick
Date: Fri Jan 25 21:24:09 2019
New Revision: 343457
URL: https://svnweb.freebsd.org/changeset/base/343457

Log:
  Add printing of b_ioflags to DDB `show buffer' command.
  
  Sponsored by: Netflix

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/sys/bio.h

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c     Fri Jan 25 20:54:18 2019        (r343456)
+++ head/sys/kern/vfs_bio.c     Fri Jan 25 21:24:09 2019        (r343457)
@@ -5329,9 +5329,12 @@ DB_SHOW_COMMAND(buffer, db_show_buffer)
        }
 
        db_printf("buf at %p\n", bp);
-       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_flags = 0x%b, b_xflags=0x%b\n",
+           (u_int)bp->b_flags, PRINT_BUF_FLAGS,
+           (u_int)bp->b_xflags, PRINT_BUF_XFLAGS);
+       db_printf("b_vflags=0x%b b_ioflags0x%b\n",
+           (u_int)bp->b_vflags, PRINT_BUF_VFLAGS,
+           (u_int)bp->b_ioflags, PRINT_BIO_FLAGS);
        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, "

Modified: head/sys/sys/bio.h
==============================================================================
--- head/sys/sys/bio.h  Fri Jan 25 20:54:18 2019        (r343456)
+++ head/sys/sys/bio.h  Fri Jan 25 21:24:09 2019        (r343457)
@@ -67,6 +67,9 @@
 #define        BIO_TRANSIENT_MAPPING   0x20
 #define        BIO_VLIST       0x40
 
+#define        PRINT_BIO_FLAGS "\20\7vlist\6transient_mapping\5unmapped" \
+       "\4ordered\3onqueue\2done\1error"
+
 #ifdef _KERNEL
 struct disk;
 struct bio;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to