Btrfs: don't wait for ordered data outside desired range

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 22 17:59:04 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b52abf1e3b65b4fbd42b39412e040b561faec6a6
Commit:     b52abf1e3b65b4fbd42b39412e040b561faec6a6
Parent:     b1a06a4b574996692b72b742bf6e6aa0c711a948
Author:     Filipe David Borba Manana <fdmanana at gmail.com>
AuthorDate: Wed Nov 6 15:12:40 2013 +0000
Committer:  Chris Mason <chris.mason at fusionio.com>
CommitDate: Wed Nov 20 20:44:45 2013 -0500

    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 at gmail.com>
    Signed-off-by: Josef Bacik <jbacik at fusionio.com>
    Signed-off-by: Chris Mason <chris.mason at fusionio.com>
---
 fs/btrfs/ordered-data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index 25a8f38..c37124b 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)
 			btrfs_put_ordered_extent(ordered);
 			break;
 		}
-		if (ordered->file_offset + ordered->len < start) {
+		if (ordered->file_offset + ordered->len <= start) {
 			btrfs_put_ordered_extent(ordered);
 			break;
 		}



More information about the linux-mtd-cvs mailing list