提交 c81d5767 编写于 作者: G Gui Hecheng 提交者: Chris Mason

btrfs: replace EINVAL with EOPNOTSUPP for dev_replace raid56

To return EOPNOTSUPP is more user friendly than to return EINVAL,
and then user-space tool will show that the dev_replace operation
for raid56 is not currently supported rather than showing that
there is an invalid argument.
Signed-off-by: NGui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 93915584
...@@ -313,7 +313,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root, ...@@ -313,7 +313,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
if (btrfs_fs_incompat(fs_info, RAID56)) { if (btrfs_fs_incompat(fs_info, RAID56)) {
btrfs_warn(fs_info, "dev_replace cannot yet handle RAID5/RAID6"); btrfs_warn(fs_info, "dev_replace cannot yet handle RAID5/RAID6");
return -EINVAL; return -EOPNOTSUPP;
} }
switch (args->start.cont_reading_from_srcdev_mode) { switch (args->start.cont_reading_from_srcdev_mode) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册