summaryrefslogtreecommitdiff
path: root/fs/gfs2/log.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2019-04-29 22:14:58 +0300
committerBob Peterson <rpeterso@redhat.com>2020-02-27 16:53:18 +0300
commitd93ae386ef3d1bf4d683f870ad8e838159ec451d (patch)
treefd6342b895bfdf31aa73de10e87b6657b3a36615 /fs/gfs2/log.h
parentf05b86db314df9f31c4c21153338f6a38b1f0de7 (diff)
downloadlinux-d93ae386ef3d1bf4d683f870ad8e838159ec451d.tar.xz
gfs2: Check for log write errors before telling dlm to unlock
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: Bob Peterson <rpeterso@redhat.com> Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/log.h')
0 files changed, 0 insertions, 0 deletions