This patch fixes the bug in my system.
It simply clears PAGECACHE_TAG_DIRTY if the page should not be
written. Now pdflush won't keep trying to write these pages.
Also the redirty call is canceled if the bio is submitted.
The (perhaps imperfect) error handling logic is untouched.
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index f5cd8d3..0c3ffc4 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -353,7 +353,8 @@ static int metapage_writepage(struct page *page, struct
writeback_control *wbc)
{
struct bio *bio = NULL;
unsigned int block_offset; /* block offset of mp within page */
- struct inode *inode = page->mapping->host;
+ struct address_space *mapping = page->mapping;
+ struct inode *inode = mapping->host;
unsigned int blocks_per_mp = JFS_SBI(inode->i_sb)->nbperpage;
unsigned int len;
unsigned int xlen;
@@ -449,9 +450,15 @@ static int metapage_writepage(struct page *page, struct
writeback_control *wbc)
goto dump_bio;
submit_bio(WRITE, bio);
- }
- if (redirty)
+ } else if (redirty) {
redirty_page_for_writepage(wbc, page);
+ } else {
+ write_lock_irq(&mapping->tree_lock);
+ radix_tree_tag_clear(&mapping->page_tree,
+ page_index(page),
+ PAGECACHE_TAG_DIRTY);
+ write_unlock_irq(&mapping->tree_lock);
+ }
unlock_page(page);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion