diff options
author | Filipe David Borba Manana <fdmanana@gmail.com> | 2013-11-06 10:12:40 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-20 20:44:45 -0500 |
commit | b52abf1e3b65b4fbd42b39412e040b561faec6a6 (patch) | |
tree | 3cf4063b81a42bec54879a8c893495682ac6c097 /fs/btrfs/ordered-data.c | |
parent | b1a06a4b574996692b72b742bf6e6aa0c711a948 (diff) |
Btrfs: don't wait for ordered data outside desired range
In btrfs_wait_ordered_range(), if we found an extent to the left
of the start of our desired wait range and the last byte of that
extent is 1 less than the desired range's start, we would would
wait for the IO completion of that extent unnecessarily.
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r-- | fs/btrfs/ordered-data.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 25a8f3812f14..c37124bccf17 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -803,7 +803,7 @@ int btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len) | |||
803 | btrfs_put_ordered_extent(ordered); | 803 | btrfs_put_ordered_extent(ordered); |
804 | break; | 804 | break; |
805 | } | 805 | } |
806 | if (ordered->file_offset + ordered->len < start) { | 806 | if (ordered->file_offset + ordered->len <= start) { |
807 | btrfs_put_ordered_extent(ordered); | 807 | btrfs_put_ordered_extent(ordered); |
808 | break; | 808 | break; |
809 | } | 809 | } |