diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-27 16:51:03 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-22 00:44:18 -0400 |
commit | 5e6c81ff988688c566bd8c09af321db29a9833fe (patch) | |
tree | 3794ba449403f6a905898d4c75ba67a6a8e942d5 | |
parent | c37101792786a50468fe64b911a80953374cfc29 (diff) |
bcachefs: allow evacuate off offline RW devices
-rw-r--r-- | fs/bcachefs/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 61acff4c873f..a7ae8e07eed0 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -1651,7 +1651,8 @@ int bch2_dev_evacuate(struct bch_fs *c, struct bch_dev *ca) mutex_lock(&c->state_lock); - if (ca->mi.state == BCH_MEMBER_STATE_RW) { + if (ca->mi.state == BCH_MEMBER_STATE_RW && + bch2_dev_is_online(ca)) { bch_err(ca, "Cannot migrate data off RW device"); ret = -EINVAL; goto err; |