diff options
author | David Sterba <dsterba@suse.com> | 2018-04-05 02:41:06 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 16:51:45 +0300 |
commit | 53176dde0acd8fa49c6c2e6097283acc6241480f (patch) | |
tree | fe42e45af2f699762556d58619b8365091ea445e /fs/btrfs/disk-io.c | |
parent | 129827e3001fd1e6892a0629b48f9c7c91cbb8b6 (diff) | |
download | linux-53176dde0acd8fa49c6c2e6097283acc6241480f.tar.xz |
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>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index eca66ac52c7a..cbb7cf4a993d 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2142,9 +2142,7 @@ static void btrfs_init_dev_replace_locks(struct btrfs_fs_info *fs_info) { mutex_init(&fs_info->dev_replace.lock_finishing_cancel_unmount); init_rwsem(&fs_info->dev_replace.rwsem); - atomic_set(&fs_info->dev_replace.blocking_readers, 0); init_waitqueue_head(&fs_info->dev_replace.replace_wait); - init_waitqueue_head(&fs_info->dev_replace.read_lock_wq); } static void btrfs_init_qgroup(struct btrfs_fs_info *fs_info) |