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>
此提交包含在:
David Sterba
2018-04-05 01:41:06 +02:00
父節點 129827e300
當前提交 53176dde0a
共有 5 個檔案被更改,包括 6 行新增28 行删除

查看文件

@@ -379,8 +379,6 @@ struct btrfs_dev_replace {
struct mutex lock_finishing_cancel_unmount;
struct rw_semaphore rwsem;
atomic_t blocking_readers;
wait_queue_head_t read_lock_wq;
struct btrfs_scrub_progress scrub_progress;