• Bob Peterson's avatar
    gfs2: Prepare to withdraw as soon as an IO error occurs in log write · f05b86db
    Bob Peterson authored
    Before this patch, function gfs2_end_log_write would detect any IO
    errors writing to the journal and put out an appropriate message,
    but it never set a withdrawing condition. Eventually, the log daemon
    would see the error and determine it was time to withdraw, but in
    the meantime, other processes could continue running as if nothing
    bad ever happened. The biggest consequence is that __gfs2_glock_put
    would BUG() when it saw that there were still unwritten items.
    
    This patch sets the WITHDRAWING status as soon as an IO error is
    detected, and that way, the BUG will be avoided so the file system
    can be properly withdrawn and unmounted.
    Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
    Reviewed-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    f05b86db
lops.c 27.9 KB