[Cluster-devel] [GFS2 PATCH] data corruption fix

Wendy Cheng wcheng at redhat.com
Tue Sep 18 13:19:13 UTC 2007


* GFS2 has been using i_cache array to store its indirect meta blocks. 
Its flush routine doesn't correctly clean up all the entries. The 
problem would show while multiple nodes do simultaneous writes to the 
same file. Upon glock exclusive lock transfer, if the file is a sparse 
file with large file size where the indirect meta blocks span multiple 
array entries with "zero" entries in between. The flush routine 
prematurely stops the flushing that leaves old (stale) entries around. 
This leads to several nasty issues, including data corruption.
* Fix gfs2_get_block_noalloc checking to correctly return EIO upon 
unmapped buffer.
* Simplify gfs2 code path by disabling gfs2_writepages. The 
implementation currently generates unmapped dirty buffers with mmap 
calls that do not work well with rest of the gfs2 journaling code. Defer 
the writepages implementation to later time frame. All writepage 
function now goes thru gfs2_writepage call with this change.

-- Wendy


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfs2_meta_fix.patch
Type: text/x-patch
Size: 1821 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070918/30c59f88/attachment.bin>


More information about the Cluster-devel mailing list