]> git.hungrycats.org Git - linux/commitdiff
btrfs: device add must be sysloged
authorAnand Jain <Anand.Jain@oracle.com>
Mon, 30 Jun 2014 16:58:56 +0000 (00:58 +0800)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Wed, 3 Dec 2014 15:16:08 +0000 (10:16 -0500)
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>
(cherry picked from commit 43d207616886da1d93623ac40bd1d922a79e0d1b)

fs/btrfs/ioctl.c

index 2bc5d4200256dbb9ba4c174582f8776223c10e3c..d915f4e5fc534b8af38b4283299c317d926c09f4 100644 (file)
@@ -2670,6 +2670,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);