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
7eb9b2f5
Commit
7eb9b2f5
authored
Jan 17, 2006
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
git://oss.sgi.com:8090/oss/git/xfs-2.6
parents
728c7763
d88992f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_aops.c
+26
-3
No files found.
fs/xfs/linux-2.6/xfs_aops.c
View file @
7eb9b2f5
...
@@ -336,24 +336,47 @@ static inline int bio_add_buffer(struct bio *bio, struct buffer_head *bh)
...
@@ -336,24 +336,47 @@ static inline int bio_add_buffer(struct bio *bio, struct buffer_head *bh)
}
}
/*
/*
* Submit all of the bios for all of the ioends we have saved up,
* Submit all of the bios for all of the ioends we have saved up, covering the
* covering the initial writepage page and also any probed pages.
* initial writepage page and also any probed pages.
*
* Because we may have multiple ioends spanning a page, we need to start
* writeback on all the buffers before we submit them for I/O. If we mark the
* buffers as we got, then we can end up with a page that only has buffers
* marked async write and I/O complete on can occur before we mark the other
* buffers async write.
*
* The end result of this is that we trip a bug in end_page_writeback() because
* we call it twice for the one page as the code in end_buffer_async_write()
* assumes that all buffers on the page are started at the same time.
*
* The fix is two passes across the ioend list - one to start writeback on the
* bufferheads, and then the second one submit them for I/O.
*/
*/
STATIC
void
STATIC
void
xfs_submit_ioend
(
xfs_submit_ioend
(
xfs_ioend_t
*
ioend
)
xfs_ioend_t
*
ioend
)
{
{
xfs_ioend_t
*
head
=
ioend
;
xfs_ioend_t
*
next
;
xfs_ioend_t
*
next
;
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
struct
bio
*
bio
;
struct
bio
*
bio
;
sector_t
lastblock
=
0
;
sector_t
lastblock
=
0
;
/* Pass 1 - start writeback */
do
{
next
=
ioend
->
io_list
;
for
(
bh
=
ioend
->
io_buffer_head
;
bh
;
bh
=
bh
->
b_private
)
{
xfs_start_buffer_writeback
(
bh
);
}
}
while
((
ioend
=
next
)
!=
NULL
);
/* Pass 2 - submit I/O */
ioend
=
head
;
do
{
do
{
next
=
ioend
->
io_list
;
next
=
ioend
->
io_list
;
bio
=
NULL
;
bio
=
NULL
;
for
(
bh
=
ioend
->
io_buffer_head
;
bh
;
bh
=
bh
->
b_private
)
{
for
(
bh
=
ioend
->
io_buffer_head
;
bh
;
bh
=
bh
->
b_private
)
{
xfs_start_buffer_writeback
(
bh
);
if
(
!
bio
)
{
if
(
!
bio
)
{
retry:
retry:
...
...
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