From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f41.google.com (mail-yx1-f41.google.com [74.125.224.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 611DE3A4F2F for ; Tue, 3 Feb 2026 14:00:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770127248; cv=none; b=R0+wVj+zHC3Chmt3v7vaV31k/KjoZC4BoTIM+84QDWW6oPY+jk9i5t0CZUJrs4QDIGKFPEKZbVoyzF6gGzLte9EW1MNS67WDM1lhpGSOkjBqtR93s3cZx77ECAeJ72Uw+CHt7x7J9QjNVbeKv3/rjLvUjsog8Q2vhSdUT6yFjLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770127248; c=relaxed/simple; bh=R+6kwNGd3gLsL+dkhY/xwLml2SgQbzN7YFWnTUlpPo0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NkjtjmlVFiIlnGy2AcClEnAN8xd/1VsHegPqw4MnwYugTsJk2XHe2ATEhI8Y77NKCBAAIsjpkynEU5XxJd5+KyVXN6IfdT+pTcbI8A1Jf255R1sBpnco0j1IGH5dBXH7X9RnfM16KOb3TKoy5HkeyqOUAMEOYSOYAYGuEJVd/80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S0VLUDrJ; arc=none smtp.client-ip=74.125.224.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S0VLUDrJ" Received: by mail-yx1-f41.google.com with SMTP id 956f58d0204a3-64938fce805so5083600d50.1 for ; Tue, 03 Feb 2026 06:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770127244; x=1770732044; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p+tCSLyCDbpK03koWwWlEulMnOqXMu/KY0ai0EF+gkE=; b=S0VLUDrJITCFnFwBsJsbw1QwS45Vl4wl0Gd8jzL0VedcS6EoYVLLqdNDzN3DZ1Qs9Z /lCPcNlsVW0xeubV/+HOJo9XqVLIX6apnJfC5oZLrOMdRzQVDsucEq8NrgE24aAH02Tg fh1g/SZRXp2LxaX//HE6x36u1Wv2jKmtJpqzhqIqjCFLwCQRPdc+z1oWuWrWA5X4MxER H8jumMVQloS2Rc3P87tgss8lSYl/I3kzw/IQk1nbllMo3UK75ZUg4/ZkWOh89OODTo5D VKAJChxkBVz8PeZOU3B8C50GXeCEY3Cqg7WjWrXt6gB+tFYhcGiCyqyIbCmBqKofJas7 pZsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770127244; x=1770732044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=p+tCSLyCDbpK03koWwWlEulMnOqXMu/KY0ai0EF+gkE=; b=KE9dUdNFRk8sztj1/JE2zxXq5DsUrqI1iDIWpZILT/cT5dKWMYfw9Z8zNxIWlUd5OW a5dX707yxOjP8LIclUEjrUtJgxKXeR8wW6s86rPdC0jYaCbnD2UqMiSXs11B+mX691vX AiUaGc3ysrOvMhKm1ecv75QGNp5ZwJ0VloH+SCg8F3LrlMVd5NNI/VWqcmvybJO+p6zH +4mC4tMrkY+SmyGHmOlZ4I+hxPlbIjJiysNfRk9GEJKwp0Xum85ntr/GipQe3/u/ahzj 2JOs/PX/l1/LnAndq+WphHHAVbOnMNQ9bdamhVR2btzG04N1hFJoffLyCyI+s6A3QlpI q8wA== X-Forwarded-Encrypted: i=1; AJvYcCWYWibpGfGrXpTgL0iRBHSG4cCv3856ynvK487SMkh2YGWciTLXrAB3bwuu7GQExgIlBpaqNoH1k33v4NQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwNeB+3obQGqa8s0CcKM3/GzYb/XimJzEj7E/o32MaNSq7nk5hY 9Ld0JavNcZ4UlgJbS9V8E9LxwsxSez6RRhZE/NztAdrP3xcS/p8TL/TRiPRxwgUFNWc= X-Gm-Gg: AZuq6aKZDfADxDszblCTbqxR5Vd/0d+WGjmm/RdEYRWIf9eXujZRbavwN2iHSg3PxlQ OhzmmdlGFr9WuwJTNaubuzHgZ8RpwQrt863QyiIu6QNOdeIqrjpi90YTMRlMWxRxDBshUY5UXBv 4+0BlXTgcMkSHO9vdsKu3Z6mydmaowYX1BWvyK1sEx3OYq9bnIKyOLchIVMpPoFtrJtxddLbPUx p+4AEG6S6Yjujy7YC6aD32p4JlGkqt3G+P3iQQ7wcDdOynPMZfa83CTq4UIOfksT8xMOQm4/VSJ aj3E5LvdBuHY9kfUfXz3SogLISo7Zyln/DqmqFZjuMx811Ziq1J1h0fiDilHWVMu5HQqDSlrHud shoPPpZoNc4Uch2oshmB4f63ew5n3fJafV144b8AyGYC898nUMpI03CXGQmykYb0CmqNLE3zkgf GCTeuAy4QsbacyTEa/esYC X-Received: by 2002:a05:690e:134d:b0:649:c36a:a9b4 with SMTP id 956f58d0204a3-649c36aad82mr5835694d50.36.1770127244061; Tue, 03 Feb 2026 06:00:44 -0800 (PST) Received: from fedora ([187.120.156.78]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-649da68046bsm36693d50.16.2026.02.03.06.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Feb 2026 06:00:43 -0800 (PST) From: Guilherme Giacomo Simoes 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 Message-ID: <20260203140030.36921-1-trintaeoitogc@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Andreas Gruenbacher 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