gfs2.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: gfs2@lists.linux.dev
Subject: Re: [PATCH] gfs2: don't withdraw if init_threads() got interrupted
Date: Thu, 2 Nov 2023 18:11:14 -0400	[thread overview]
Message-ID: <CAK-6q+iTBiN+RYgMYpPn1-0PxTYe+-kei1-t8-B_a1zm2J5MVg@mail.gmail.com> (raw)
In-Reply-To: <CAHc6FU4Ym_nzTvvS6=1AjZm=de3X_kjd0Dn1x329L==WiDeqig@mail.gmail.com>

Hi,

On Thu, Nov 2, 2023 at 6:09 PM Andreas Gruenbacher <agruenba@redhat.com> wrote:
>
> On Thu, Nov 2, 2023 at 9:50 PM Alexander Aring <aahringo@redhat.com> wrote:
> >
> > Hi,
> >
> > On Thu, Nov 2, 2023 at 3:58 PM Andreas Gruenbacher <agruenba@redhat.com> wrote:
> > >
> > > In gfs2_fill_super(), when mounting a gfs2 filesystem is interrupted,
> > > kthread_create() can return -EINTR.  When that happens, we roll back
> > > what has already been done and abort the mount.
> > >
> > > Since commit a28dc123fa66, we also call gfs2_withdraw_delayed() in
> > > gfs2_fill_super(), but that only marks the filesystem as withdrawing and
> > > relies on a caller further up the stack to do the actual withdraw --
> > > which doesn't exist in the gfs2_fill_super() case.  Because the
> > > filesystem is marked as withdrawing / withdrawn, function
> > > gfs2_lm_unmount() doesn't release the dlm lockspace, so when we try to
> > > mount that filesystem again, we get:
> > >
> > >     gfs2: fsid=gohan:gohan0: Trying to join cluster "lock_dlm", "gohan:gohan0"
> > >     gfs2: fsid=gohan:gohan0: dlm_new_lockspace error -17
> > >
> > > Fix this by getting rid of the ill-conceived gfs2_withdraw_delayed() in
> > > gfs2_fill_super().
> > >
> > > Reported-by: Alexander Aring <aahringo@redhat.com>
> > > Fixes: a28dc123fa66 ("gfs2: init system threads before freeze lock")
> >
> > nitpik, this is not the right commit, calling gfs2_withdraw_delayed()
> > was already been there before if init_threads() fails just in super.c
>
> Ah, so this problem was already introduced in commit 62dd0f98a0e5
> ("gfs2: Flag a withdraw if init_threads() fails"). Thanks for pointing
> this out; I've looked up what that was supposed to fix and I've
> updated the description.

I looked into that commit, but this also fixes some ctrl-c issues
pointed out by me... I am not sure if we are going back and forward
here with ctrl-c issues.

- Alex


  reply	other threads:[~2023-11-02 22:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 19:58 [PATCH] gfs2: don't withdraw if init_threads() got interrupted Andreas Gruenbacher
2023-11-02 20:50 ` Alexander Aring
2023-11-02 22:08   ` Andreas Gruenbacher
2023-11-02 22:11     ` Alexander Aring [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-31 14:33 Alexander Aring
2023-11-02 19:58 ` Andreas Gruenbacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK-6q+iTBiN+RYgMYpPn1-0PxTYe+-kei1-t8-B_a1zm2J5MVg@mail.gmail.com \
    --to=aahringo@redhat.com \
    --cc=agruenba@redhat.com \
    --cc=gfs2@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).