summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2011-07-20 03:46:35 +0000
committerChris Mason <chris.mason@oracle.com>2011-08-01 14:30:42 -0400
commitb6973aa62253f3791ef6fa5e9f9de099645fc2bd (patch)
treeeb4fe689723dc89e803a139d0d873dc4c9cd205d /fs/btrfs/inode.c
parentb532402e4d147e4f409c4e7f50d4413e8450101d (diff)
downloadop-kernel-dev-b6973aa62253f3791ef6fa5e9f9de099645fc2bd.zip
op-kernel-dev-b6973aa62253f3791ef6fa5e9f9de099645fc2bd.tar.gz
Btrfs: fix readahead in file defrag
We passed the wrong value to btrfs_force_ra(). Fix this by changing the argument of btrfs_force_ra() from last_index to nr_page. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5da43ae..69e448e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6697,19 +6697,6 @@ int btrfs_create_subvol_root(struct btrfs_trans_handle *trans,
return 0;
}
-/* helper function for file defrag and space balancing. This
- * forces readahead on a given range of bytes in an inode
- */
-unsigned long btrfs_force_ra(struct address_space *mapping,
- struct file_ra_state *ra, struct file *file,
- pgoff_t offset, pgoff_t last_index)
-{
- pgoff_t req_size = last_index - offset + 1;
-
- page_cache_sync_readahead(mapping, ra, file, offset, req_size);
- return offset + req_size;
-}
-
struct inode *btrfs_alloc_inode(struct super_block *sb)
{
struct btrfs_inode *ei;
OpenPOWER on IntegriCloud