* [PATCH] Btrfs: don't wait for ordered data outside desired range
@ 2013-11-06 15:12 Filipe David Borba Manana
2013-11-07 11:13 ` [PATCH v2] " Filipe David Borba Manana
0 siblings, 1 reply; 2+ messages in thread
From: Filipe David Borba Manana @ 2013-11-06 15:12 UTC (permalink / raw)
To: linux-btrfs; +Cc: Filipe David Borba Manana
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>
---
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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2] Btrfs: don't wait for ordered data outside desired range
2013-11-06 15:12 [PATCH] Btrfs: don't wait for ordered data outside desired range Filipe David Borba Manana
@ 2013-11-07 11:13 ` Filipe David Borba Manana
0 siblings, 0 replies; 2+ messages in thread
From: Filipe David Borba Manana @ 2013-11-07 11:13 UTC (permalink / raw)
To: linux-btrfs; +Cc: Filipe David Borba Manana
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 and all other extents
to the left of that extent, unnecessarily.
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
---
V2: Updated commit message.
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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-07 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 15:12 [PATCH] Btrfs: don't wait for ordered data outside desired range Filipe David Borba Manana
2013-11-07 11:13 ` [PATCH v2] " Filipe David Borba Manana
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).