[Cluster-devel] [PATCH 3/8] gfs2: add memory barriers to gfs2_glock_remove_revoke

2020-05-26 Thread Bob Peterson
Function gfs2_glock_remove_revoke did atomic_dec_return for gl_revokes without memory barriers. But according to Documentation/core-api/atomic_ops: "Unlike the above routines, it is required that these primitives include explicit memory barriers that are performed before and after the operation.

[Cluster-devel] [PATCH 6/8] gfs2: instrumentation wrt log_flush stuck

2020-05-26 Thread Bob Peterson
This adds checks for gfs2_log_flush being stuck, similarly to the check in gfs2_ail1_flush. Signed-off-by: Bob Peterson --- fs/gfs2/log.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 1d51b4781bdd..636c82dda68b 100644 ---

[Cluster-devel] [PATCH 1/8] gfs2: Don't ignore inode write errors during inode_go_sync

2020-05-26 Thread Bob Peterson
Before for this patch, function inode_go_sync ignored io errors during inode_go_sync, overwriting them with metadata write errors: error = filemap_fdatawait(mapping); mapping_set_error(mapping, error); } error = filemap_fdatawait(metamapping);

[Cluster-devel] [PATCH 8/8] gfs2: introduce new gfs2_glock_assert_withdraw

2020-05-26 Thread Bob Peterson
Before this patch, asserts based on glocks did not print the glock with the error. This patch introduces a new macro, gfs2_glock_assert_withdraw which first prints the glock, then takes the assert. This also changes a few glock asserts to the new macro. Signed-off-by: Bob Peterson ---

[Cluster-devel] [PATCH 0/8] Misc Patch Collection

2020-05-26 Thread Bob Peterson
Hi, I've been working on a problem whereby glock.c was causing a BUG panic because gl_revokes was non-zero when the glock is freed. To debug and fix this, I developed a series of patches, including some new instrumentation and trace points. Some of these patches are independent, so could be

[Cluster-devel] [PATCH 4/8] gfs2: Add new sysfs file for gfs2 status

2020-05-26 Thread Bob Peterson
This patch adds a new file: /sys/fs/gfs2/*/status which will report the status of the file system. Catting this file dumps the current status of the file system according to various superblock variables. For example: Journal Checked: 1 Journal Live: 1 Withdrawn: 0 No barriers:

[Cluster-devel] [PATCH 2/8] gfs2: Allow lock_nolock mount to specify jid=X

2020-05-26 Thread Bob Peterson
Before this patch, a simple typo accidentally added \n to the jid= string for lock_nolock mounts. This made it impossible to mount a gfs2 file system with a journal other than journal0. Thus: mount -tgfs2 -o hostdata="jid=1" Resulted in: mount: wrong fs type, bad option, bad superblock on In