From: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
To: agruenba@redhat.com
Cc: gfs2@lists.linux.dev, linux-kernel@vger.kernel.org,
trintaeoitogc@gmail.com
Subject: Re: [RESEND PATCH] gfs2: do not evict glocks with populated address spaces
Date: Tue, 3 Feb 2026 11:00:30 -0300 [thread overview]
Message-ID: <20260203140030.36921-1-trintaeoitogc@gmail.com> (raw)
In-Reply-To: <CAHc6FU5eRLt5X7T1BTK2jCuzKc8PHk7wy0UMCVyfBnerSUF7_Q@mail.gmail.com>
Andreas Gruenbacher <agruenba@redhat.com> wrote:
> There are two GLOCK_BUG_ON() assertions in __gfs2_glock_put(). I
> assume you are talking about this one:
>
> GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders));
>
> This should never trigger because each holder has a glock reference
> (see the gfs2_glock_hold() in __gfs2_holder_init()), and so
> gl->gl_lockref should never reach zero while there are holders.
>
> If none of the holders has the HIF_HOLDER flag set, we don't know if
> the glock is actually locked.
Sorry, yes has two GLOCK_BUG_ON() assertions. I talk about the second
GLOCK_BUG_ON on __gfs2_glock_put():
`GLOCK_BUG_ON(gl, !mapping_empty(mapping))`.
NOT ABOUT `GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders));` (the first
GLOCK_BUG_ON())
The dump_stack() indicates a memory pressure and the
gfs2_glock_put_eventually() on fs/gfs2/super.c is called.
But when the __gfs2_glock_put() was called, the glock was has a private folios.
I test by this way:
```
struct address_space *mapping = ...;
pgoff_t index;
struct folio *folio;
xa_for_each(&mapping->i_pages, index, folio) {
if (folio_test_private(folio))
pr_err("I have private folios")
}
```
And, I can see the glock is about metadata:
`gl->gl_name.ln_type != LM_TYPE_INODE`
the truncate_inode_pages_final() failed silently when the folio is private.
I guess maybe evict metadata (or locked) glock is not a good idea.
Thanks, Guilherme
next prev parent reply other threads:[~2026-02-03 14:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 10:39 Guilherme Giacomo Simoes
2026-02-03 11:16 ` Andreas Gruenbacher
2026-02-03 11:42 ` Guilherme Giacomo Simoes
2026-02-03 12:41 ` Andreas Gruenbacher
2026-02-03 14:00 ` Guilherme Giacomo Simoes [this message]
2026-03-01 12:35 ` Guilherme Giacomo Simoes
-- strict thread matches above, loose matches on Subject: below --
2026-01-20 12:33 Guilherme Giacomo Simoes
2026-01-06 12:03 Guilherme Giacomo Simoes
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=20260203140030.36921-1-trintaeoitogc@gmail.com \
--to=trintaeoitogc@gmail.com \
--cc=agruenba@redhat.com \
--cc=gfs2@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome