From ffd0cd3c2f10e2241771056566fa0fe36b3855ce Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Thu, 18 Nov 2021 20:33:00 +0100 Subject: gfs2: Fix __gfs2_holder_init function name in kernel-doc comment The function name in the kernel-doc comment wasn't updated when the function was renamed. Fixes: b016d9a84abd ("gfs2: Save ip from gfs2_glock_nq_init") Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 44a7a4288956..3f18aa51ec85 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1245,7 +1245,7 @@ out: } /** - * gfs2_holder_init - initialize a struct gfs2_holder in the default way + * __gfs2_holder_init - initialize a struct gfs2_holder in the default way * @gl: the glock * @state: the state we're requesting * @flags: the modifier flags -- cgit v1.2.3 From 1d05ee7e0d10283107cd6c2ed37005b67cd2f5b7 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Fri, 12 Nov 2021 13:52:06 -0600 Subject: gfs2: remove redundant set of INSTANTIATE_NEEDED Function rgrp_go_inval calls gfs2_rgrp_brelse to invalidate the in-core rgrp structures. After the call it set GLF_INSTANTIATE_NEEDED, which is redundant, since gfs2_rgrp_brelse also sets it. This patch simply removes the redundant set_bit. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 650ad77c4d0b..e054ddae7834 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -228,7 +228,6 @@ static void rgrp_go_inval(struct gfs2_glock *gl, int flags) gfs2_rgrp_brelse(rgd); WARN_ON_ONCE(!(flags & DIO_METADATA)); truncate_inode_pages_range(mapping, start, end); - set_bit(GLF_INSTANTIATE_NEEDED, &gl->gl_flags); } static void gfs2_rgrp_go_dump(struct seq_file *seq, struct gfs2_glock *gl, -- cgit v1.2.3 From 8d567162ef288ee0df6674f291e3d9c290306f1e Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Tue, 30 Nov 2021 10:06:11 +0100 Subject: gfs2: Remove redundant check for GLF_INSTANTIATE_NEEDED If the GLF_INSTANTIATE_NEEDED flag isn't set, gfs2_instantiate() is a no-op. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/super.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 0f93e8beca4d..64c67090f503 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -1244,11 +1244,9 @@ static enum dinode_demise evict_should_delete(struct inode *inode, if (ret) return SHOULD_NOT_DELETE_DINODE; - if (test_bit(GLF_INSTANTIATE_NEEDED, &ip->i_gl->gl_flags)) { - ret = gfs2_instantiate(gh); - if (ret) - return SHOULD_NOT_DELETE_DINODE; - } + ret = gfs2_instantiate(gh); + if (ret) + return SHOULD_NOT_DELETE_DINODE; /* * The inode may have been recreated in the meantime. -- cgit v1.2.3 From 3c5c67ec29a918dfb2ffc94429437794ddd225e8 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mon, 29 Nov 2021 21:56:16 +0100 Subject: gfs2: Fix gfs2_instantiate description The description of gfs2_instantiate accidentally lists a glock argument, but the function takes a glock holder. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 3f18aa51ec85..b7ab8430333c 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -477,7 +477,7 @@ find_first_strong_holder(struct gfs2_glock *gl) /* * gfs2_instantiate - Call the glops instantiate function - * @gl: The glock + * @gh: The glock holder * * Returns: 0 if instantiate was successful, 2 if type specific operation is * underway, or error. -- cgit v1.2.3 From 74382e277ae97b4bcfac6f8b61df7a500d392500 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Tue, 14 Dec 2021 10:40:12 -0500 Subject: gfs2: dump inode object for iopen glocks Before this patch, glock dumps would not dump the gl_object for iopen glocks. This information can help us debug problems related to eviction: when AN iopen glock is blocked we can see the status of its underlying inode and its flags, etc. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index e054ddae7834..392800f082a6 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -763,6 +763,7 @@ const struct gfs2_glock_operations gfs2_freeze_glops = { const struct gfs2_glock_operations gfs2_iopen_glops = { .go_type = LM_TYPE_IOPEN, .go_callback = iopen_go_callback, + .go_dump = inode_go_dump, .go_demote_ok = iopen_go_demote_ok, .go_flags = GLOF_LRU | GLOF_NONDISK, .go_subclass = 1, -- cgit v1.2.3