This series gets rid of the volume mutex. The fstests do not pass cleanly, 2 or more tests fail so this needs to be fixed, but otherwise majority of the work ready for review.
The merge target is 4.18 and I'll probably not get back to this pathset during merge window (nor add it to next), so there should be enough time for review. David Sterba (16): btrfs: squeeze btrfs_dev_replace_continue_on_mount to its caller btrfs: make success path out of btrfs_init_dev_replace_tgtdev more clear btrfs: export and rename free_device btrfs: move btrfs_init_dev_replace_tgtdev to dev-replace.c and make static btrfs: move volume_mutex to callers of btrfs_rm_device btrfs: move clearing of EXCL_OP out of __cancel_balance btrfs: add proper safety check before resuming dev-replace btrfs: add sanity check when resuming balance after mount btrfs: cleanup helpers that reset balance state btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start btrfs: kill btrfs_fs_info::volume_mutex btrfs: track running balance in a simpler way btrfs: remove redundant read-only check from btrfs_cancel_balance btrfs: drop lock parameter from update_ioctl_balance_args and rename btrfs: use mutex in btrfs_resume_balance_async btrfs: open code set_balance_control fs/btrfs/ctree.h | 9 +- fs/btrfs/dev-replace.c | 135 +++++++++++++++++++++----- fs/btrfs/disk-io.c | 2 - fs/btrfs/extent-tree.c | 2 +- fs/btrfs/ioctl.c | 41 ++++---- fs/btrfs/volumes.c | 252 +++++++++++++------------------------------------ fs/btrfs/volumes.h | 5 +- 7 files changed, 205 insertions(+), 241 deletions(-) -- 2.16.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html