Commit 43d20761 authored by Anand Jain's avatar Anand Jain Committed by Chris Mason

btrfs: device add must be sysloged

when we add a new disk to the mounted btrfs we don't record it
as of now, disk add is a critical change of btrfs configuration,
it must be recorded in the syslog to help offline investigations
of customer problems when reported.
Signed-off-by: default avatarAnand Jain <Anand.Jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 4027e0f4
...@@ -2633,6 +2633,9 @@ static long btrfs_ioctl_add_dev(struct btrfs_root *root, void __user *arg) ...@@ -2633,6 +2633,9 @@ static long btrfs_ioctl_add_dev(struct btrfs_root *root, void __user *arg)
vol_args->name[BTRFS_PATH_NAME_MAX] = '\0'; vol_args->name[BTRFS_PATH_NAME_MAX] = '\0';
ret = btrfs_init_new_device(root, vol_args->name); ret = btrfs_init_new_device(root, vol_args->name);
if (!ret)
btrfs_info(root->fs_info, "disk added %s",vol_args->name);
kfree(vol_args); kfree(vol_args);
out: out:
mutex_unlock(&root->fs_info->volume_mutex); mutex_unlock(&root->fs_info->volume_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment