From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH 2/2] GFS2: Revert 35e478f Flush pending glock work when evicting an inode
Date: Thu, 19 Nov 2015 12:42:41 -0600 [thread overview]
Message-ID: <1447958561-2584-3-git-send-email-rpeterso@redhat.com> (raw)
In-Reply-To: <1447958561-2584-1-git-send-email-rpeterso@redhat.com>
Commit 35e478f was added because there were cases where
the inode's glock still had pending delayed work.
The theory is that the delayed work referenced the inode after it
had been deleted from memory by gfs2_evict_inode during its call to
filemap_fdatawrite. I'm guessing that's wrong. I'm guessing that
the delayed work was referencing the glock after it had been
freed due to the call to gfs2_glock_put() in gfs2_evict_inode().
The previous patch made the last put be done from the delayed
work queue, so that should make 35e478f obsolete. The other thing
to consider is that vfs evict() calls invalidate_inode_buffers
before calling the file system-specific gfs2_evict_inode(), and
therefore we should have no dirty buffers for the inode itself.
(We might have dirty buffers for the glock address space, though).
The reason why the call to flush_delayed_work can't be done here
is that it can block, waiting like so:
kernel: Call Trace:
kernel: [<ffffffff815395f5>] schedule_timeout+0x215/0x2e0
kernel: [<ffffffff81141f1a>] ? shrink_inactive_list+0x53a/0x830
kernel: [<ffffffff81539273>] wait_for_common+0x123/0x180
kernel: [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
kernel: [<ffffffff8153938d>] wait_for_completion+0x1d/0x20
kernel: [<ffffffff8109b3e7>] flush_work+0x77/0xc0
kernel: [<ffffffff8109ac50>] ? wq_barrier_func+0x0/0x20
kernel: [<ffffffff8109b604>] flush_delayed_work+0x54/0x70
kernel: [<ffffffffa05e3552>] gfs2_clear_inode+0x62/0xf0 [gfs2]
The delayed work can depend on actions from DLM, and DLM can
hang indefinitely on a fencing action.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/super.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 46e5004..4a9b090 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1613,7 +1613,6 @@ out:
clear_inode(inode);
gfs2_dir_hash_inval(ip);
ip->i_gl->gl_object = NULL;
- flush_delayed_work(&ip->i_gl->gl_work);
gfs2_glock_add_to_lru(ip->i_gl);
if (queue_delayed_work(gfs2_glock_workqueue,
&ip->i_gl->gl_work, 0) == 0)
--
2.5.0
next prev parent reply other threads:[~2015-11-19 18:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 18:42 [Cluster-devel] [GFS2 PATCH 0/2] GFS2: Avoid inode shrinker-related deadlocks Bob Peterson
2015-11-19 18:42 ` [Cluster-devel] [GFS2 PATCH 1/2] GFS2: Make gfs2_clear_inode() queue the final put Bob Peterson
2015-11-20 13:33 ` Steven Whitehouse
2015-11-25 14:22 ` Bob Peterson
2015-11-25 14:26 ` Steven Whitehouse
2015-12-01 15:42 ` Bob Peterson
2015-12-02 10:23 ` Steven Whitehouse
2015-12-02 16:42 ` Bob Peterson
2015-12-02 17:41 ` Bob Peterson
2015-12-03 11:18 ` Steven Whitehouse
2015-12-04 14:51 ` Bob Peterson
2015-12-04 15:51 ` David Teigland
2015-12-04 17:38 ` Bob Peterson
2015-12-08 7:57 ` Dave Chinner
2015-12-08 9:03 ` Steven Whitehouse
2015-11-19 18:42 ` Bob Peterson [this message]
2015-11-20 13:47 ` [Cluster-devel] [GFS2 PATCH 2/2] GFS2: Revert 35e478f Flush pending glock work when evicting an inode Steven Whitehouse
2015-11-25 14:36 ` Bob Peterson
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=1447958561-2584-3-git-send-email-rpeterso@redhat.com \
--to=rpeterso@redhat.com \
/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 NNTP newsgroup(s).