Commit c4ede418 authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Dave Kleikamp

JFS: flush new iag from bd_inode's mapping

This is a fix to help jfs work with grub.  A new IAG is created in
the bd_inode's mapping, but subsequently modified in a different
mapping.  We should invalidate the former page to keep grub from
using that cached page.  It isn't useful to have it cached anyway,
since jfs will never access it again through that mapping.
Signed-off-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
parent 36b10972
......@@ -2604,6 +2604,12 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
for (i = 0; i < SMAPSZ; i++)
iagp->inosmap[i] = cpu_to_le32(ONES);
/*
* Invalidate the page after writing and syncing it.
* After it's initialized, we access it in a different
* address space
*/
set_bit(META_discard, &mp->flag);
flush_metapage(mp);
/*
......
......@@ -396,14 +396,6 @@ static void __write_metapage(struct metapage * mp)
jfs_info("__write_metapage: mp = 0x%p", mp);
if (test_bit(META_discard, &mp->flag)) {
/*
* This metadata is no longer valid
*/
clear_bit(META_dirty, &mp->flag);
return;
}
page_index = mp->page->index;
page_offset =
(mp->index - (page_index << l2BlocksPerPage)) << l2bsize;
......@@ -549,6 +541,7 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len)
goto again;
}
clear_bit(META_dirty, &mp->flag);
set_bit(META_discard, &mp->flag);
spin_unlock(&meta_lock);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment