public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] btrfs: fix arguments to btrfs_wait_on_page_writeback_range
@ 2009-09-30 19:59 Christoph Hellwig
  2009-09-30 19:59 ` [PATCH 2/2] btrfs: remove duplicates of filemap_ helpers Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2009-09-30 19:59 UTC (permalink / raw)
  To: linux-btrfs

wait_on_page_writeback_range/btrfs_wait_on_page_writeback_range takes
a pagecache offset, not a byte offset into the file.  Shift the arguments
around to wait for the correct range

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/btrfs/disk-io.c
===================================================================
--- linux-2.6.orig/fs/btrfs/disk-io.c	2009-09-30 13:54:10.101028559 -0300
+++ linux-2.6/fs/btrfs/disk-io.c	2009-09-30 13:55:25.396005824 -0300
@@ -829,7 +829,9 @@ int btrfs_write_tree_block(struct extent
 int btrfs_wait_tree_block_writeback(struct extent_buffer *buf)
 {
 	return btrfs_wait_on_page_writeback_range(buf->first_page->mapping,
-				  buf->start, buf->start + buf->len - 1);
+				  buf->start >> PAGE_CACHE_SHIFT,
+				  (buf->start + buf->len - 1) >>
+				   PAGE_CACHE_SHIFT);
 }
 
 struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-30 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 19:59 [PATCH 1/2] btrfs: fix arguments to btrfs_wait_on_page_writeback_range Christoph Hellwig
2009-09-30 19:59 ` [PATCH 2/2] btrfs: remove duplicates of filemap_ helpers Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox