btrfs: dev-replace: remove custom read/write blocking scheme
authorDavid Sterba <dsterba@suse.com>
Wed, 4 Apr 2018 23:41:06 +0000 (01:41 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:45 +0000 (14:51 +0100)
commit53176dde0acd8fa49c6c2e6097283acc6241480f
treefe42e45af2f699762556d58619b8365091ea445e
parent129827e3001fd1e6892a0629b48f9c7c91cbb8b6
btrfs: dev-replace: remove custom read/write blocking scheme

After the rw semaphore has been added, the custom blocking using
::blocking_readers and ::read_lock_wq is redundant.

The blocking logic in __btrfs_map_block is replaced by extending the
time the semaphore is held, that has the same blocking effect on writes
as the previous custom scheme that waited until ::blocking_readers was
zero.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/dev-replace.c
fs/btrfs/dev-replace.h
fs/btrfs/disk-io.c
fs/btrfs/volumes.c