[lvc-project] [PATCH] gfs2: fix unreachable error handling after freeze/thaw rework
Fedor Pchelkin
pchelkin at ispras.ru
Thu Nov 13 10:14:58 MSK 2025
On Wed, 12. Nov 23:50, Alexey Velichayshiy wrote:
> After commit b77b4a4815a9 ("gfs2: Rework freeze / thaw logic"), the second
> error handling block in the freeze process became unreachable due to
> misplaced gfs2_do_thaw() call. The thaw operation was incorrectly placed
> within the error handling block of gfs2_lock_fs_check_clean(), causing
> EBUSY/EIO error conditions to be processed as if they originated from
> thaw rather than from the initial freeze check.
>
> Move gfs2_do_thaw() call outside of gfs2_lock_fs_check_clean() error
> handling block to restore proper error code processing and ensure
> error messages accurately reflect their source.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Alexey Velichayshiy <a.velichayshiy at ispras.ru>
> ---
Andreas Gruenbacher рано поставили в адресаты, рано..
Ну, сейчас стоит отправить патч правильным образом согласно
https://portal.linuxtesting.ru/How-to-send-patches-to-kernel.html#Идентификация-адресатов
В адресатах помимо одного человека-мэйнтейнера должны быть ещё списки
рассылки, выдаваемые get_maintainer.pl. И lvc-project at linuxtesting.org в
копию письма.
To: Andreas Gruenbacher <agruenba at redhat.com>
To: gfs2 at lists.linux.dev
Cc: linux-kernel at vger.kernel.org
Cc: lvc-project at linuxtesting.org
Спасибо!
> fs/gfs2/super.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
> index 644b2d1e7276..d3e2bcf04c23 100644
> --- a/fs/gfs2/super.c
> +++ b/fs/gfs2/super.c
> @@ -747,21 +747,20 @@ static int gfs2_freeze_super(struct super_block *sb, enum freeze_holder who,
> set_bit(SDF_FREEZE_INITIATOR, &sdp->sd_flags);
> set_bit(SDF_FROZEN, &sdp->sd_flags);
> break;
> - }
> -
> - error = gfs2_do_thaw(sdp, who, freeze_owner);
> - if (error)
> - goto out;
> -
> - if (error == -EBUSY)
> + } else if (error == -EBUSY) {
> fs_err(sdp, "waiting for recovery before freeze\n");
> - else if (error == -EIO) {
> + } else if (error == -EIO) {
> fs_err(sdp, "Fatal IO error: cannot freeze gfs2 due "
> "to recovery error.\n");
> goto out;
> } else {
> fs_err(sdp, "error freezing FS: %d\n", error);
> }
> +
> + error = gfs2_do_thaw(sdp, who, freeze_owner);
> + if (error)
> + goto out;
> +
> fs_err(sdp, "retrying...\n");
> msleep(1000);
> }
> --
> 2.43.0
More information about the lvc-project
mailing list