• Bob Peterson's avatar
    gfs2: Check for log write errors before telling dlm to unlock · d93ae386
    Bob Peterson authored
    Before this patch, function do_xmote just assumed all the writes
    submitted to the journal were finished and successful, and it
    called the go_unlock function to release the dlm lock. But if
    they're not, and a revoke failed to make its way to the journal,
    a journal replay on another node will cause corruption if we
    let the go_inval function continue and tell dlm to release the
    glock to another node. This patch adds a couple checks for errors
    in do_xmote after the calls to go_sync and go_inval. If an error
    is found, we cannot withdraw yet, because the withdraw itself
    uses glocks to make the file system read-only. Instead, we flag
    the error. Later, asserts should cause another node to replay
    the journal before continuing, thus protecting rgrp and dinode
    glocks and maintaining the integrity of the metadata. Note that
    we only need to do this for journaled glocks. System glocks
    should be able to progress even under withdrawn conditions.
    Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
    Reviewed-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    d93ae386
glock.c 59.6 KB