• Anand Jain's avatar
    btrfs: device delete to get errors from the kernel · 183860f6
    Anand Jain authored
    when user runs command btrfs dev del the raid requisite error if any
    goes to the /var/log/messages, its not good idea to clutter messages
    with these user (knowledge) errors, further user don't have to review
    the system messages to know problem with the cli it should be dropped
    to the user as part of the cli return.
    
    to bring this feature created a set of the ERROR defined
    BTRFS_ERROR_DEV* error codes and created their error string.
    
    I expect this enum to be added with other error which we might
    want to communicate to the user land
    
    v3:
    moved the code with in the file no logical change
    
    v1->v2:
    introduce error codes for the device mgmt usage
    
    v1:
    adds a parameter in the ioctl arg struct to carry the error string
    Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    183860f6
volumes.c 154 KB