Skip to content
  • Wendy Cheng's avatar
    [GFS2] Data corruption fix · de986e85
    Wendy Cheng authored
    
    
    * 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.
    
    Signed-off-by: default avatarWendy Cheng <wcheng@redhat.com>
    Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
    de986e85