From c02a52006c34540dffe7ad7a69aa0a3750a4bba6 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 19 Jul 2017 19:26:45 +0200 Subject: btrfs: account that we're waiting for DIO read Correctly account for IO when waiting for a submitted DIO read, the case when we're retrying. This only for the accounting purposes and should not change other behaviour. Signed-off-by: David Sterba --- fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index eb495e956d53..2fde93548298 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8105,7 +8105,7 @@ next_block_or_try_again: goto next; } - wait_for_completion(&done.done); + wait_for_completion_io(&done.done); if (!done.uptodate) { /* We might have another mirror, so try again */ @@ -8219,7 +8219,7 @@ try_again: goto next; } - wait_for_completion(&done.done); + wait_for_completion_io(&done.done); if (!done.uptodate) { /* We might have another mirror, so try again */ -- cgit v1.2.3 From 26397a4ad1d57cf1e218fd197846bb05eb2b787b Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 19 Jul 2017 19:30:41 +0200 Subject: btrfs: account that we're waiting for IO in scrub_submit_raid56_bio_wait Correctly account for IO when waiting for a submitted bio in scrub. This only for the accounting purposes and should not change other behaviour. Signed-off-by: David Sterba --- fs/btrfs/scrub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 0cebeb5eb5d0..0e6daf0582a1 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -1704,7 +1704,7 @@ static int scrub_submit_raid56_bio_wait(struct btrfs_fs_info *fs_info, if (ret) return ret; - wait_for_completion(&done.event); + wait_for_completion_io(&done.event); if (done.error) return -EIO; -- cgit v1.2.3