• Jeff Mahoney's avatar
    btrfs: Add btrfs_panic() · 8c342930
    Jeff Mahoney authored
    As part of the effort to eliminate BUG_ON as an error handling
    technique, we need to determine which errors are actual logic errors,
    which are on-disk corruption, and which are normal runtime errors
    e.g. -ENOMEM.
    
    Annotating these error cases is helpful to understand and report them.
    
    This patch adds a btrfs_panic() routine that will either panic
    or BUG depending on the new -ofatal_errors={panic,bug} mount option.
    Since there are still so many BUG_ONs, it defaults to BUG for now but I
    expect that to change once the error handling effort has made
    significant progress.
    Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
    8c342930
ctree.h 96.7 KB