btrfs: split dev-replace locking helpers for read and write