gfs2: Issue message when revokes cannot be written
authorBob Peterson <rpeterso@redhat.com>
Fri, 21 Apr 2023 19:07:09 +0000 (15:07 -0400)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 25 Apr 2023 09:06:30 +0000 (11:06 +0200)
Before this patch, function gfs2_ail_empty_gl would silently return an
error to the caller. This would get silently set into sd_log_error which
would cause a withdraw, but there was no indication why the file system
was withdrawn. This patch adds a fs_err to log the appropriate error
message.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glops.c

index 29e0a664efd6f238d21b25c44241a94aef629d9c..caef70334af30d23db0f911afa03fe9bc56a4968 100644 (file)
@@ -124,8 +124,10 @@ static int gfs2_ail_empty_gl(struct gfs2_glock *gl)
        memset(&tr, 0, sizeof(tr));
        set_bit(TR_ONSTACK, &tr.tr_flags);
        ret = __gfs2_trans_begin(&tr, sdp, 0, revokes, _RET_IP_);
-       if (ret)
+       if (ret) {
+               fs_err(sdp, "Transaction error %d: Unable to write revokes.", ret);
                goto flush;
+       }
        __gfs2_ail_flush(gl, 0, revokes);
        gfs2_trans_end(sdp);