Commit 1edf3267 authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Dave Kleikamp

JFS: forced metadata pages were not being flushed to disk

txForce() was not doing what it was supposed to do.  Setting the META_sync
flag in the metapage will force the page to disk when the metapage is
released.

These pages must be written to disk to ensure that replaying the log will
correctly update the inode map.
parent 58df8b02
......@@ -2209,9 +2209,21 @@ void txForce(struct tblock * tblk)
tlck->flag &= ~tlckWRITEPAGE;
/* do not release page to freelist */
/*
* The "right" thing to do here is to
* synchronously write the metadata.
* With the current implementation this
* is hard since write_metapage requires
* us to kunmap & remap the page. If we
* have tlocks pointing into the metadata
* pages, we don't want to do this. I think
* we can get by with synchronously writing
* the pages when they are released.
*/
assert(atomic_read(&mp->nohomeok));
hold_metapage(mp, 0);
write_metapage(mp);
set_bit(META_dirty, &mp->flag);
set_bit(META_sync, &mp->flag);
}
}
}
......
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