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
7073c8e8
Commit
7073c8e8
authored
Nov 20, 2007
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Make sure page mapping dirty tag is properly cleared
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
3e9fd94f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
fs/btrfs/extent_map.c
fs/btrfs/extent_map.c
+20
-2
No files found.
fs/btrfs/extent_map.c
View file @
7073c8e8
...
@@ -1825,12 +1825,18 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
...
@@ -1825,12 +1825,18 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
if
(
ret
)
if
(
ret
)
SetPageError
(
page
);
SetPageError
(
page
);
else
{
else
{
unsigned
long
nr
=
end_index
+
1
;
unsigned
long
max_
nr
=
end_index
+
1
;
set_range_writeback
(
tree
,
cur
,
cur
+
iosize
-
1
);
set_range_writeback
(
tree
,
cur
,
cur
+
iosize
-
1
);
if
(
!
PageWriteback
(
page
))
{
printk
(
"warning page %lu not writeback, "
"cur %llu end %llu
\n
"
,
page
->
index
,
(
unsigned
long
long
)
cur
,
(
unsigned
long
long
)
end
);
}
ret
=
submit_extent_page
(
WRITE
,
tree
,
page
,
sector
,
ret
=
submit_extent_page
(
WRITE
,
tree
,
page
,
sector
,
iosize
,
page_offset
,
bdev
,
iosize
,
page_offset
,
bdev
,
&
epd
->
bio
,
nr
,
&
epd
->
bio
,
max_
nr
,
end_bio_extent_writepage
);
end_bio_extent_writepage
);
if
(
ret
)
if
(
ret
)
SetPageError
(
page
);
SetPageError
(
page
);
...
@@ -1840,6 +1846,11 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
...
@@ -1840,6 +1846,11 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
nr
++
;
nr
++
;
}
}
done:
done:
if
(
nr
==
0
)
{
/* make sure the mapping tag for page dirty gets cleared */
set_page_writeback
(
page
);
end_page_writeback
(
page
);
}
unlock_extent
(
tree
,
start
,
page_end
,
GFP_NOFS
);
unlock_extent
(
tree
,
start
,
page_end
,
GFP_NOFS
);
unlock_page
(
page
);
unlock_page
(
page
);
return
0
;
return
0
;
...
@@ -2408,6 +2419,13 @@ int clear_extent_buffer_dirty(struct extent_map_tree *tree,
...
@@ -2408,6 +2419,13 @@ int clear_extent_buffer_dirty(struct extent_map_tree *tree,
}
}
}
}
clear_page_dirty_for_io
(
page
);
clear_page_dirty_for_io
(
page
);
write_lock_irq
(
&
page
->
mapping
->
tree_lock
);
if
(
!
PageDirty
(
page
))
{
radix_tree_tag_clear
(
&
page
->
mapping
->
page_tree
,
page_index
(
page
),
PAGECACHE_TAG_DIRTY
);
}
write_unlock_irq
(
&
page
->
mapping
->
tree_lock
);
unlock_page
(
page
);
unlock_page
(
page
);
}
}
return
0
;
return
0
;
...
...
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