Displaying 1 result from an estimated 1 matches for "is_tgtdev_for_dev_replace".
2013 Mar 02
1
[PATCH] btrfs: return EPERM in btrfs_rm_device()
...&& num_devices <= 2) {
printk(KERN_ERR "btrfs: unable to go below two "
"devices on raid1\n");
- ret = -EINVAL;
+ ret = -EPERM;
goto out;
}
@@ -1449,14 +1449,14 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
if (device->is_tgtdev_for_dev_replace) {
pr_err("btrfs: unable to remove the dev_replace target dev\n");
- ret = -EINVAL;
+ ret = -EPERM;
goto error_brelse;
}
if (device->writeable && root->fs_info->fs_devices->rw_devices == 1) {
printk(KERN_ERR "btrfs: unable to remove the only write...