From: Christoph Hellwig <hch@lst.de>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 1/2] btrfs: fix arguments to btrfs_wait_on_page_writeback_range
Date: Wed, 30 Sep 2009 21:59:20 +0200 [thread overview]
Message-ID: <20090930195920.GA16396@lst.de> (raw)
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,
next reply other threads:[~2009-09-30 19:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 19:59 Christoph Hellwig [this message]
2009-09-30 19:59 ` [PATCH 2/2] btrfs: remove duplicates of filemap_ helpers Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090930195920.GA16396@lst.de \
--to=hch@lst.de \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox