public inbox for gfs2@lists.linux.dev
 help / color / mirror / Atom feed
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 08:42:57 -0300	[thread overview]
Message-ID: <20260203114257.25469-1-trintaeoitogc@gmail.com> (raw)
In-Reply-To: <CAHc6FU7kH3VfyERRTFuCshiSq0c-ttJLG7OeX_j31K9ehvH7uQ@mail.gmail.com>

Andreas Gruenbacher <agruenba@redhat.com> wrote:
> > Metadata glocks may have associated address spaces used as caches. Avoid
> > reclaiming such glocks under memory pressure while their mappings are
> > still populated or their state is not unlocked, as this can lead to
> > invalid page cache state and GLOCK_BUG_ON().
> 
> What invalid page cache state and GLOCK_BUG_ON() errors is this about, exactly?
On __gfs2_glock_put() (fs/gfs2/glock.c) the GLOCK_BUG_ON() is triggered under
memory pressure while the glock is still locked or the glock is populated with
metadata caches.

This happens because the __gfs2_glock_put() can't truncate pages with a private
datas (truncate_inode_pages_final(mapping) is failed), how the metadata is a
private folio, the	GLOCK_BUG_ON(gl, !mapping_empty(mapping)) is trigged.

> This leaks a glock reference, so it's definitely wrong.
But this glock is a private folio with metadata or is still locked. I think
this can't be evictable 

  reply	other threads:[~2026-02-03 11:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 10:39 [RESEND PATCH] gfs2: do not evict glocks with populated address spaces Guilherme Giacomo Simoes
2026-02-03 11:16 ` Andreas Gruenbacher
2026-02-03 11:42   ` Guilherme Giacomo Simoes [this message]
2026-02-03 12:41     ` Andreas Gruenbacher
2026-02-03 14:00       ` Guilherme Giacomo Simoes
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

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=20260203114257.25469-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