[PATCH 0/5] block: udpate debug messages with blk_op_str()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This patch-series uses newly introduced blk_op_str() to improve
existing REQ_OP_XXX messages. The first two patches we change the
bio_check_ro() and submit_bio() and make debugging more clear and
get rid of the 1:M mapping of the REQ_OP_XXX to debug string
(such as printing "READ" and "WRITE") with the help of blk_op_str().

Later 3 patches are focused on changing the block_dump in submit_bio(),
so we can log all the operations and update the respective
documentation.

This is needed as we are adding more REQ_OP_XXX with last bit set 
as a part of newly introduced Zone Block Device Zone Open, Zone Close
and Zone Finish operations which are mapped to new REQ_OP_ZONE_OPEN,
REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH respectively [1].

With this patch-series, we can see the following output with respective
commands which are clear including the special REQ_OP_XXX
(Write-zeroes and Discard) :-

# blkzone reset /dev/nullb0			# Reset all the zones 
# blkdiscard -o 0 -l 4096 /dev/nullb0		# discard 8 sectors 
# blkdiscard -o 0 -l 40960 /dev/nullb0		# disacrd 80 sectors  
# blkdiscard -z -o 0 -l 40960 /dev/nullb0	# write-zero 80 sectors
# dmesg  -c 

<snip>
[ 1161.922707] blkzone(10803): ZONE_RESET block 0 on nullb0 (0 sectors)
[ 1161.922735] blkzone(10803): ZONE_RESET block 524288 on nullb0 (0 sectors)
[ 1161.922750] blkzone(10803): ZONE_RESET block 1048576 on nullb0 (0 sectors)
[ 1161.922762] blkzone(10803): ZONE_RESET block 1572864 on nullb0 (0 sectors)
[ 1186.949689] blkdiscard(10834): DISCARD block 0 on nullb0 (8 sectors)
[ 1195.145731] blkdiscard(10844): DISCARD block 0 on nullb0 (80 sectors)
[ 1212.490633] blkdiscard(10854): WRITE_ZEROES block 0 on nullb0 (80 sectors)
<snip>

Regards,
Chaitanya

To: linux-mm@xxxxxxxxx
To; linux-block@ linux-block@xxxxxxxxxxxxxxx
Cc: Bart Van Assche <bvanassche@xxxxxxx>
Cc: Jenx Axboe <axboe@xxxxxxxxx>

[1] https://www.spinics.net/lists/linux-block/msg41884.html.

Chaitanya Kulkarni (5):
  block: update error message for bio_check_ro()
  block: update error message in submit_bio()
  block: allow block_dump to print all REQ_OP_XXX
  mm: update block_dump comment
  Documentation/laptop: add block_dump documentation

 Documentation/laptops/laptop-mode.txt | 16 ++++++++--------
 block/blk-core.c                      | 27 +++++++++++++--------------
 mm/page-writeback.c                   |  2 +-
 3 files changed, 22 insertions(+), 23 deletions(-)

-- 
2.21.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux