summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorAnand Jain <Anand.Jain@oracle.com>2014-07-01 00:58:56 +0800
committerChris Mason <clm@fb.com>2014-09-17 13:37:20 -0700
commit43d207616886da1d93623ac40bd1d922a79e0d1b (patch)
tree97f97fbdfff66fae35a8ef45bad30b46f7a06cf9 /fs/btrfs/ioctl.c
parent4027e0f4c4b2df28d564560a3c65c179bebae4c8 (diff)
downloadlinux-43d207616886da1d93623ac40bd1d922a79e0d1b.tar.bz2
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: Anand Jain <Anand.Jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 8eecfcce56ed..aa73884025b3 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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';
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);
out:
mutex_unlock(&root->fs_info->volume_mutex);