Skip to content
Commit f8c5d0b4 authored by Liu Bo's avatar Liu Bo Committed by Josef Bacik
Browse files

Btrfs: fix wrong error returned by adding a device



Reproduce:
$ mkfs.btrfs /dev/sdb7
$ mount /dev/sdb7 /mnt/btrfs -o ro
$ btrfs dev add /dev/sdb8 /mnt/btrfs
ERROR: error adding the device '/dev/sdb8' - Invalid argument

Since we mount with readonly options, and /dev/sdb7 is not a seeding one,
a readonly notification is preferred.

Signed-off-by: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
Reviewed-by: default avatarJosef Bacik <josef@redhat.com>
parent 5fd02043
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