Btrfs: do not add extra mirror when dev_replace target dev is not available
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 14 Mar 2017 20:33:59 +0000 (13:33 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:25 +0000 (14:07 +0200)
commit6fad823f4998cdff49c443891a0acc9f1bc289f9
tree4af0d1f863fa09a4880c8883e84e4869e0cb7bcd
parent73c0f228250ff7fc1d662b64123f2aea9d04ca7e
Btrfs: do not add extra mirror when dev_replace target dev is not available

With this, we can avoid allocating memory for dev replace copies if the
target dev is not available.

Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c