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
nexedi
linux
Commits
38b66988
Commit
38b66988
authored
Apr 22, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deal with page == NULL in the btrfs_unplug_io_fn
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
b3075717
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+30
-2
No files found.
fs/btrfs/disk-io.c
View file @
38b66988
...
...
@@ -911,12 +911,40 @@ static int btrfs_congested_fn(void *congested_data, int bdi_bits)
return
ret
;
}
/*
* this unplugs every device on the box, and it is only used when page
* is null
*/
static
void
__unplug_io_fn
(
struct
backing_dev_info
*
bdi
,
struct
page
*
page
)
{
struct
list_head
*
cur
;
struct
btrfs_device
*
device
;
struct
btrfs_fs_info
*
info
;
info
=
(
struct
btrfs_fs_info
*
)
bdi
->
unplug_io_data
;
list_for_each
(
cur
,
&
info
->
fs_devices
->
devices
)
{
device
=
list_entry
(
cur
,
struct
btrfs_device
,
dev_list
);
bdi
=
blk_get_backing_dev_info
(
device
->
bdev
);
if
(
bdi
->
unplug_io_fn
)
{
bdi
->
unplug_io_fn
(
bdi
,
page
);
}
}
}
void
btrfs_unplug_io_fn
(
struct
backing_dev_info
*
bdi
,
struct
page
*
page
)
{
struct
inode
*
inode
=
page
->
mapping
->
host
;
struct
inode
*
inode
;
struct
extent_map_tree
*
em_tree
;
struct
extent_map
*
em
;
u64
offset
=
page_offset
(
page
);
u64
offset
;
if
(
!
page
)
{
__unplug_io_fn
(
bdi
,
page
);
return
;
}
inode
=
page
->
mapping
->
host
;
offset
=
page_offset
(
page
);
em_tree
=
&
BTRFS_I
(
inode
)
->
extent_tree
;
spin_lock
(
&
em_tree
->
lock
);
...
...
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