Skip to content

Commit

Permalink
btrfs: account that we're waiting for DIO read
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kdave committed Aug 16, 2017
1 parent 4958aa6 commit 9c17f6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -8133,7 +8133,7 @@ static int __btrfs_correct_data_nocsum(struct inode *inode,
goto next;
}

wait_for_completion(&done.done);
wait_for_completion_io(&done.done);

if (!done.uptodate) {
/* We might have another mirror, so try again */
Expand Down Expand Up @@ -8247,7 +8247,7 @@ static blk_status_t __btrfs_subio_endio_read(struct inode *inode,
goto next;
}

wait_for_completion(&done.done);
wait_for_completion_io(&done.done);

if (!done.uptodate) {
/* We might have another mirror, so try again */
Expand Down

0 comments on commit 9c17f6c

Please sign in to comment.