Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a86c12c7
Commit
a86c12c7
authored
Feb 07, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Create larger bios for btree blocks
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
961d0232
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+6
-4
fs/btrfs/extent_io.c
fs/btrfs/extent_io.c
+9
-3
fs/btrfs/extent_io.h
fs/btrfs/extent_io.h
+2
-1
No files found.
fs/btrfs/disk-io.c
View file @
a86c12c7
...
...
@@ -197,7 +197,8 @@ int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
WARN_ON
(
1
);
}
eb
=
alloc_extent_buffer
(
tree
,
start
,
len
,
page
,
GFP_NOFS
);
read_extent_buffer_pages
(
tree
,
eb
,
start
+
PAGE_CACHE_SIZE
,
1
);
read_extent_buffer_pages
(
tree
,
eb
,
start
+
PAGE_CACHE_SIZE
,
1
,
btree_get_extent
);
btrfs_clear_buffer_defrag
(
eb
);
found_start
=
btrfs_header_bytenr
(
eb
);
if
(
found_start
!=
start
)
{
...
...
@@ -339,7 +340,7 @@ int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize)
if
(
!
buf
)
return
0
;
read_extent_buffer_pages
(
&
BTRFS_I
(
btree_inode
)
->
io_tree
,
buf
,
0
,
0
);
buf
,
0
,
0
,
btree_get_extent
);
free_extent_buffer
(
buf
);
return
ret
;
}
...
...
@@ -358,7 +359,8 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
buf
=
btrfs_find_create_tree_block
(
root
,
bytenr
,
blocksize
);
if
(
!
buf
)
return
NULL
;
read_extent_buffer_pages
(
&
BTRFS_I
(
btree_inode
)
->
io_tree
,
buf
,
0
,
1
);
read_extent_buffer_pages
(
&
BTRFS_I
(
btree_inode
)
->
io_tree
,
buf
,
0
,
1
,
btree_get_extent
);
if
(
buf
->
flags
&
EXTENT_CSUM
)
return
buf
;
...
...
@@ -1009,7 +1011,7 @@ int btrfs_read_buffer(struct extent_buffer *buf)
struct
btrfs_root
*
root
=
BTRFS_I
(
buf
->
first_page
->
mapping
->
host
)
->
root
;
struct
inode
*
btree_inode
=
root
->
fs_info
->
btree_inode
;
return
read_extent_buffer_pages
(
&
BTRFS_I
(
btree_inode
)
->
io_tree
,
buf
,
0
,
1
);
buf
,
0
,
1
,
btree_get_extent
);
}
static
struct
extent_io_ops
btree_extent_io_ops
=
{
...
...
fs/btrfs/extent_io.c
View file @
a86c12c7
...
...
@@ -2859,8 +2859,8 @@ EXPORT_SYMBOL(extent_buffer_uptodate);
int
read_extent_buffer_pages
(
struct
extent_io_tree
*
tree
,
struct
extent_buffer
*
eb
,
u64
start
,
int
wai
t
)
u64
start
,
int
wait
,
get_extent_t
*
get_exten
t
)
{
unsigned
long
i
;
unsigned
long
start_i
;
...
...
@@ -2868,6 +2868,8 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
int
err
;
int
ret
=
0
;
unsigned
long
num_pages
;
struct
bio
*
bio
=
NULL
;
if
(
eb
->
flags
&
EXTENT_UPTODATE
)
return
0
;
...
...
@@ -2899,7 +2901,8 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
lock_page
(
page
);
}
if
(
!
PageUptodate
(
page
))
{
err
=
page
->
mapping
->
a_ops
->
readpage
(
NULL
,
page
);
err
=
__extent_read_full_page
(
tree
,
page
,
get_extent
,
&
bio
);
if
(
err
)
{
ret
=
err
;
}
...
...
@@ -2908,6 +2911,9 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
}
}
if
(
bio
)
submit_one_bio
(
READ
,
bio
);
if
(
ret
||
!
wait
)
{
return
ret
;
}
...
...
fs/btrfs/extent_io.h
View file @
a86c12c7
...
...
@@ -157,7 +157,8 @@ struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
gfp_t
mask
);
void
free_extent_buffer
(
struct
extent_buffer
*
eb
);
int
read_extent_buffer_pages
(
struct
extent_io_tree
*
tree
,
struct
extent_buffer
*
eb
,
u64
start
,
int
wait
);
struct
extent_buffer
*
eb
,
u64
start
,
int
wait
,
get_extent_t
*
get_extent
);
static
inline
void
extent_buffer_get
(
struct
extent_buffer
*
eb
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment