On Wed, 2017-01-25 at 14:32 -0800, Omar Sandoval wrote: > From: Omar Sandoval <osandov@xxxxxx> > > This is useful debugging information that will be used in the blk-mq > debugfs directory. > > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> > Signed-off-by: Omar Sandoval <osandov@xxxxxx> > --- > Jens took offense to me making the bitmap dumps binary, so this turns them into > nicely formatted hex dumps, like this one: > > # cat /sys/kernel/debug/block/nvme0n1/mq/0/tags_bitmap > 00000000: 0000 0000 0000 0000 0000 0000 0000 0000 > 00000010: 0000 2000 0000 0000 0000 0000 0000 0000 > 00000020: 0000 0000 0000 0000 0000 0000 0000 0000 > 00000030: 0000 0000 0000 0000 0000 0000 0000 0000 > 00000040: 0000 0000 0000 0000 0000 0000 0000 0000 > 00000050: 0000 0000 0000 0000 0000 0000 0000 0000 > 00000060: 0000 0000 0000 0000 0000 0000 0000 0000 > 00000070: 0000 0000 0000 0000 0000 0000 0000 0000 > > I decided to go with this format because 1) it's consistent with > print_hex_dump() already in the kernel, and 2) it's much easier to read > than a string of bits or hex values. In the example above, it's easy to > see that byte 0x12 is set to 0x20 (and do some arithmetic from there to > figure out that the stuck bit is 149). Hello Omar, Have you considered to convert the bitmap into a contiguous bitmap first and to format that bitmap with snprintf(..., "%*pb", ...)? I think that will result in even easier to read output. Bart.-- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html