From: Sasha Levin <sashal@kernel.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Bob Peterson <rpeterso@redhat.com>, Sasha Levin <sashal@kernel.org>, cluster-devel@redhat.com Subject: [PATCH AUTOSEL 4.19 11/19] Revert "gfs2: Don't demote a glock until its revokes are written" Date: Fri, 22 May 2020 10:51:12 -0400 [thread overview] Message-ID: <20200522145120.434921-11-sashal@kernel.org> (raw) In-Reply-To: <20200522145120.434921-1-sashal@kernel.org> From: Bob Peterson <rpeterso@redhat.com> [ Upstream commit b14c94908b1b884276a6608dea3d0b1b510338b7 ] This reverts commit df5db5f9ee112e76b5202fbc331f990a0fc316d6. This patch fixes a regression: patch df5db5f9ee112 allowed function run_queue() to bypass its call to do_xmote() if revokes were queued for the glock. That's wrong because its call to do_xmote() is what is responsible for calling the go_sync() glops functions to sync both the ail list and any revokes queued for it. By bypassing the call, gfs2 could get into a stand-off where the glock could not be demoted until its revokes are written back, but the revokes would not be written back because do_xmote() was never called. It "sort of" works, however, because there are other mechanisms like the log flush daemon (logd) that can sync the ail items and revokes, if it deems it necessary. The problem is: without file system pressure, it might never deem it necessary. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- fs/gfs2/glock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f8a5eef3d014..ccdd8c821abd 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -636,9 +636,6 @@ __acquires(&gl->gl_lockref.lock) goto out_unlock; if (nonblock) goto out_sched; - smp_mb(); - if (atomic_read(&gl->gl_revokes) != 0) - goto out_sched; set_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags); GLOCK_BUG_ON(gl, gl->gl_demote_state == LM_ST_EXCLUSIVE); gl->gl_target = gl->gl_demote_state; -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sashal@kernel.org> To: cluster-devel.redhat.com Subject: [Cluster-devel] [PATCH AUTOSEL 4.19 11/19] Revert "gfs2: Don't demote a glock until its revokes are written" Date: Fri, 22 May 2020 10:51:12 -0400 [thread overview] Message-ID: <20200522145120.434921-11-sashal@kernel.org> (raw) In-Reply-To: <20200522145120.434921-1-sashal@kernel.org> From: Bob Peterson <rpeterso@redhat.com> [ Upstream commit b14c94908b1b884276a6608dea3d0b1b510338b7 ] This reverts commit df5db5f9ee112e76b5202fbc331f990a0fc316d6. This patch fixes a regression: patch df5db5f9ee112 allowed function run_queue() to bypass its call to do_xmote() if revokes were queued for the glock. That's wrong because its call to do_xmote() is what is responsible for calling the go_sync() glops functions to sync both the ail list and any revokes queued for it. By bypassing the call, gfs2 could get into a stand-off where the glock could not be demoted until its revokes are written back, but the revokes would not be written back because do_xmote() was never called. It "sort of" works, however, because there are other mechanisms like the log flush daemon (logd) that can sync the ail items and revokes, if it deems it necessary. The problem is: without file system pressure, it might never deem it necessary. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- fs/gfs2/glock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f8a5eef3d014..ccdd8c821abd 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -636,9 +636,6 @@ __acquires(&gl->gl_lockref.lock) goto out_unlock; if (nonblock) goto out_sched; - smp_mb(); - if (atomic_read(&gl->gl_revokes) != 0) - goto out_sched; set_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags); GLOCK_BUG_ON(gl, gl->gl_demote_state == LM_ST_EXCLUSIVE); gl->gl_target = gl->gl_demote_state; -- 2.25.1
next prev parent reply other threads:[~2020-05-22 14:54 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-22 14:51 [PATCH AUTOSEL 4.19 01/19] ARM: dts: rockchip: fix phy nodename for rk3228-evb Sasha Levin 2020-05-22 14:51 ` Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 02/19] arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts Sasha Levin 2020-05-22 14:51 ` Sasha Levin 2020-05-22 14:51 ` Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 03/19] arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node Sasha Levin 2020-05-22 14:51 ` Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 04/19] ARM: dts: rockchip: swap clock-names of gpu nodes Sasha Levin 2020-05-22 14:51 ` Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 05/19] ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi Sasha Levin 2020-05-22 14:51 ` Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 06/19] gpio: tegra: mask GPIO IRQs during IRQ shutdown Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 07/19] ALSA: usb-audio: add mapping for ASRock TRX40 Creator Sasha Levin 2020-05-22 14:51 ` Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 08/19] net: microchip: encx24j600: add missed kthread_stop Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 09/19] gfs2: move privileged user check to gfs2_quota_lock_check Sasha Levin 2020-05-22 14:51 ` [Cluster-devel] " Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 10/19] gfs2: don't call quota_unhold if quotas are not locked Sasha Levin 2020-05-22 14:51 ` [Cluster-devel] " Sasha Levin 2020-05-31 21:22 ` Pavel Machek 2020-05-31 21:22 ` [Cluster-devel] " Pavel Machek 2020-05-22 14:51 ` Sasha Levin [this message] 2020-05-22 14:51 ` [Cluster-devel] [PATCH AUTOSEL 4.19 11/19] Revert "gfs2: Don't demote a glock until its revokes are written" Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 12/19] cachefiles: Fix race between read_waiter and read_copier involving op->to_do Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 13/19] usb: dwc3: pci: Enable extcon driver for Intel Merrifield Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 14/19] usb: gadget: legacy: fix redundant initialization warnings Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 15/19] net: freescale: select CONFIG_FIXED_PHY where needed Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 16/19] IB/i40iw: Remove bogus call to netdev_master_upper_dev_get() Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 17/19] riscv: stacktrace: Fix undefined reference to `walk_stackframe' Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 18/19] cifs: Fix null pointer check in cifs_read Sasha Levin 2020-05-22 14:51 ` [PATCH AUTOSEL 4.19 19/19] samples: bpf: Fix build error Sasha Levin
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=20200522145120.434921-11-sashal@kernel.org \ --to=sashal@kernel.org \ --cc=cluster-devel@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=rpeterso@redhat.com \ --cc=stable@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.