[Cluster-devel] [GFS2 PATCH v2 6/6] gfs2: introduce and use new glops go_lock_needed

2021-09-16 Thread Bob Peterson
Before this patch, when a glock was locked, the very first holder on the queue would unlock the lockref and call the go_lock glops function (if one exists), unless GL_SKIP was specified. When we introduced the new node-scope concept, we allowed multiple holders to lock glocks in EX mode and share t

[Cluster-devel] [GFS2 PATCH v2 3/6] gfs2: move GL_SKIP check from glops to do_promote

2021-09-16 Thread Bob Peterson
Before this patch, each individual "go_lock" glock operation (glop) checked the GL_SKIP flag, and if set, would skip further processing. This patch changes the logic so the go_lock caller, function go_promote, checks the GL_SKIP flag before calling the go_lock op in the first place. This avoids ha

[Cluster-devel] [GFS2 PATCH v2 4/6] gfs2: Switch some BUG_ON to GLOCK_BUG_ON for debug

2021-09-16 Thread Bob Peterson
In rgrp.c there are several places where it does BUG_ON. This tells us the call stack but nothing more, which is not very helpful. This patch switches them to GLOCK_BUG_ON which also prints the glock, its holders, and many of the rgrp values, which will help us debug problems in the future. Signed

[Cluster-devel] [GFS2 PATCH v2 5/6] gfs2: simplify do_promote and fix promote trace

2021-09-16 Thread Bob Peterson
Before this patch, the gfs2_promote kernel trace point would would only record the "first" flag if the go_lock function was called. This patch simplifies do_promote by eliminating the redundant code in do_promote and fixes the trace point by adding a new gfs2_first_holder function. This will also b

[Cluster-devel] [GFS2 PATCH v2 1/6] gfs2: remove redundant check in gfs2_rgrp_go_lock

2021-09-16 Thread Bob Peterson
Before this patch function gfs2_rgrp_go_lock checked if GL_SKIP and ar_rgrplvb were both true. However, GL_SKIP is only set for rgrps if ar_rgrplvb is true (see gfs2_inplace_reserve). This patch simply removes the redundant check. Signed-off-by: Bob Peterson --- fs/gfs2/rgrp.c | 3 +-- 1 file ch

[Cluster-devel] [GFS2 PATCH v2 2/6] gfs2: Add GL_SKIP holder flag to dump_holder

2021-09-16 Thread Bob Peterson
Somehow the GL_SKIP flag was missed when dumping glock holders. This patch adds it to function hflags2str. I added it at the end because I wanted Holder and Skip flags together to read "Hs" rather than "sH" to avoid confusion with "Shared" ("SH") holder state. Signed-off-by: Bob Peterson --- fs/

[Cluster-devel] [GFS2 PATCH v2 0/6] gfs2: fix bugs related to node_scope and go_lock

2021-09-16 Thread Bob Peterson
This set of patches contains a few clean-ups and a patch to fix a NULL Pointer dereference introduced by the new "node scope" patch 06e908cd9ead ("gfs2: Allow node-wide exclusive glock sharing"). Bob Peterson (6): gfs2: remove redundant check in gfs2_rgrp_go_lock gfs2: Add GL_SKIP holder flag