• Qu Wenruo's avatar
    btrfs: Enhance error output for write time tree checker · c06631b0
    Qu Wenruo authored
    Unlike read time tree checker errors, write time error can't be
    inspected by "btrfs inspect dump-tree", so we need extra information to
    determine what's going wrong.
    
    The patch will add the following output for write time tree checker
    error:
    
    - The content of the offending tree block
      To help determining if it's a false alert.
    
    - Kernel WARN_ON() for debug build
      This is helpful for us to detect unexpected write time tree checker
      error, especially fstests could catch the dmesg.
      Since the WARN_ON() is only triggered for write time tree checker,
      test cases utilizing dm-error won't trigger this WARN_ON(), thus no
      extra noise.
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    c06631b0
disk-io.c 125 KB