• Qu Wenruo's avatar
    btrfs: qgroup: show more meaningful qgroup_rescan_init error message · 9593bf49
    Qu Wenruo authored
    Error message from qgroup_rescan_init() mostly looks like:
    
      BTRFS info (device nvme0n1p1): qgroup_rescan_init failed with -115
    
    Which is far from meaningful, and sometimes confusing as for above
    -EINPROGRESS it's mostly (despite the init race) harmless, but sometimes
    it can also indicate problem if the return value is -EINVAL.
    
    Change it to some more meaningful messages like:
    
      BTRFS info (device nvme0n1p1): qgroup rescan is already in progress
    
    And
    
      BTRFS err(device nvme0n1p1): qgroup rescan init failed, qgroup is not enabled
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
    [ update the messages and level ]
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    9593bf49
qgroup.c 83.7 KB