forked from luck/tmp_suning_uos_patched
btrfs: sink get_extent parameter to read_extent_buffer_pages
All callers pass btree_get_extent, which needs to be exported. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
4ef77695a0
commit
6af49dbde9
|
@ -220,7 +220,7 @@ void btrfs_set_buffer_lockdep_class(u64 objectid, struct extent_buffer *eb,
|
|||
* extents on the btree inode are pretty simple, there's one extent
|
||||
* that covers the entire device
|
||||
*/
|
||||
static struct extent_map *btree_get_extent(struct btrfs_inode *inode,
|
||||
struct extent_map *btree_get_extent(struct btrfs_inode *inode,
|
||||
struct page *page, size_t pg_offset, u64 start, u64 len,
|
||||
int create)
|
||||
{
|
||||
|
@ -455,7 +455,7 @@ static int btree_read_extent_buffer_pages(struct btrfs_fs_info *fs_info,
|
|||
io_tree = &BTRFS_I(fs_info->btree_inode)->io_tree;
|
||||
while (1) {
|
||||
ret = read_extent_buffer_pages(io_tree, eb, WAIT_COMPLETE,
|
||||
btree_get_extent, mirror_num);
|
||||
mirror_num);
|
||||
if (!ret) {
|
||||
if (!verify_parent_transid(io_tree, eb,
|
||||
parent_transid, 0))
|
||||
|
@ -1012,7 +1012,7 @@ void readahead_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr)
|
|||
if (IS_ERR(buf))
|
||||
return;
|
||||
read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree,
|
||||
buf, WAIT_NONE, btree_get_extent, 0);
|
||||
buf, WAIT_NONE, 0);
|
||||
free_extent_buffer(buf);
|
||||
}
|
||||
|
||||
|
@ -1031,7 +1031,7 @@ int reada_tree_block_flagged(struct btrfs_fs_info *fs_info, u64 bytenr,
|
|||
set_bit(EXTENT_BUFFER_READAHEAD, &buf->bflags);
|
||||
|
||||
ret = read_extent_buffer_pages(io_tree, buf, WAIT_PAGE_LOCK,
|
||||
btree_get_extent, mirror_num);
|
||||
mirror_num);
|
||||
if (ret) {
|
||||
free_extent_buffer(buf);
|
||||
return ret;
|
||||
|
|
|
@ -149,6 +149,9 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
|
|||
u64 objectid);
|
||||
int btree_lock_page_hook(struct page *page, void *data,
|
||||
void (*flush_fn)(void *));
|
||||
struct extent_map *btree_get_extent(struct btrfs_inode *inode,
|
||||
struct page *page, size_t pg_offset, u64 start, u64 len,
|
||||
int create);
|
||||
int btrfs_get_num_tolerated_disk_barrier_failures(u64 flags);
|
||||
int __init btrfs_end_io_wq_init(void);
|
||||
void btrfs_end_io_wq_exit(void);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "locking.h"
|
||||
#include "rcu-string.h"
|
||||
#include "backref.h"
|
||||
#include "disk-io.h"
|
||||
|
||||
static struct kmem_cache *extent_state_cache;
|
||||
static struct kmem_cache *extent_buffer_cache;
|
||||
|
@ -5248,8 +5249,7 @@ int extent_buffer_uptodate(struct extent_buffer *eb)
|
|||
}
|
||||
|
||||
int read_extent_buffer_pages(struct extent_io_tree *tree,
|
||||
struct extent_buffer *eb, int wait,
|
||||
get_extent_t *get_extent, int mirror_num)
|
||||
struct extent_buffer *eb, int wait, int mirror_num)
|
||||
{
|
||||
unsigned long i;
|
||||
struct page *page;
|
||||
|
@ -5309,7 +5309,7 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
|
|||
|
||||
ClearPageError(page);
|
||||
err = __extent_read_full_page(tree, page,
|
||||
get_extent, &bio,
|
||||
btree_get_extent, &bio,
|
||||
mirror_num, &bio_flags,
|
||||
REQ_META);
|
||||
if (err) {
|
||||
|
|
|
@ -435,7 +435,7 @@ void free_extent_buffer_stale(struct extent_buffer *eb);
|
|||
#define WAIT_PAGE_LOCK 2
|
||||
int read_extent_buffer_pages(struct extent_io_tree *tree,
|
||||
struct extent_buffer *eb, int wait,
|
||||
get_extent_t *get_extent, int mirror_num);
|
||||
int mirror_num);
|
||||
void wait_on_extent_buffer_writeback(struct extent_buffer *eb);
|
||||
|
||||
static inline unsigned long num_extent_pages(u64 start, u64 len)
|
||||
|
|
Loading…
Reference in New Issue
Block a user