Anand Jain 05c49e6bc1 btrfs: dev-replace: go back to suspend state if another EXCL_OP is running
In a secnario where balance and replace co-exists as below,

  - start balance
  - pause balance
  - start replace
  - reboot

and when system restarts, balance resumes first. Then the replace is
attempted to restart but will fail as the EXCL_OP lock is already held
by the balance. If so place the replace state back to
BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state.

Fixes: 010a47bde9420 ("btrfs: add proper safety check before resuming dev-replace")
CC: stable@vger.kernel.org # 4.18+
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-12-17 14:51:34 +01:00
..
2018-09-04 11:35:03 +08:00
2018-08-21 23:54:17 -04:00
2018-11-27 10:21:15 +01:00
2018-11-30 14:56:14 -08:00
2018-08-17 16:20:28 -07:00
2018-09-29 22:47:48 -04:00
2018-10-26 16:26:33 -07:00
2018-05-22 14:27:52 -04:00
2018-11-05 14:57:05 -05:00
2018-10-12 22:46:50 -04:00
2018-11-30 14:56:15 -08:00
2018-11-01 11:46:27 -07:00
2018-11-30 09:03:15 -08:00
2018-05-22 14:27:52 -04:00
2018-08-18 11:44:53 -07:00
2018-10-23 13:49:02 +02:00
2018-12-14 12:18:30 -08:00
2018-07-03 16:44:45 -04:00
2018-10-24 00:40:44 +01:00
2018-11-02 11:25:48 -07:00
2018-10-29 14:29:58 -07:00
2018-06-05 19:23:26 +02:00
2018-10-31 08:54:16 -07:00
2018-08-21 18:19:09 -07:00
2018-10-21 10:46:42 -04:00
2018-08-21 18:19:09 -07:00
2018-06-11 08:22:34 -07:00
2018-08-21 18:19:09 -07:00
2018-08-21 18:19:09 -07:00
2018-09-03 15:14:01 +02:00
2018-04-04 12:44:02 -07:00