]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/btrfs/ioctl.c
btrfs: device delete to get errors from the kernel
authorAnand Jain <Anand.Jain@oracle.com>
Fri, 17 May 2013 10:52:45 +0000 (10:52 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 14 Jun 2013 15:29:53 +0000 (11:29 -0400)
commit183860f6a0646b876645ecce0553a7ef2dd71254
tree252059667b87d7f83487f444dd0efa36c97e075c
parentc73e293678fc3ec8ee9e5e275ee77dec98c4f2f1
btrfs: device delete to get errors from the kernel

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: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ioctl.c
fs/btrfs/volumes.c
include/uapi/linux/btrfs.h