Re: [Cluster-devel] [GFS2 PATCH 08/10] gfs2: New log flush watchdog

2021-07-13 Thread Steven Whitehouse
Hi, On Tue, 2021-07-13 at 13:09 -0500, Bob Peterson wrote: > This patch adds a new watchdog whose sole purpose is to complain when > gfs2_log_flush operations are taking too long. > This one is a bit confusing. It says that it is to check if the log flush is taking too long, but it appears to

Re: [Cluster-devel] [GFS2 PATCH 10/10] gfs2: replace sd_aspace with sd_inode

2021-07-13 Thread Steven Whitehouse
Hi, On Tue, 2021-07-13 at 13:09 -0500, Bob Peterson wrote: > Before this patch, gfs2 kept its own address space for rgrps, but > this > caused a lockdep problem because vfs assumes a 1:1 relationship > between > address spaces and their inode. One problematic area is this: > I don't think that

[Cluster-devel] [GFS2 PATCH 02/10] gfs2: Eliminate go_xmote_bh in favor of go_lock

2021-07-13 Thread Bob Peterson
Before this patch, the freeze glock was the only glock to use the go_xmote_bh glock op (glop). The go_xmote_bh glop is done when a glock is locked. But so is go_lock. This patch eliminates the glop altogether in favor of just using go_lock for the freeze glock. This is for better consistency,

[Cluster-devel] [GFS2 PATCH 06/10] gfs2: init system threads before freeze lock

2021-07-13 Thread Bob Peterson
Patch 96b1454f2e ("gfs2: move freeze glock outside the make_fs_rw and _ro functions") changed the gfs2 mount sequence so that it holds the freeze lock before calling gfs2_make_fs_rw. Before this patch, gfs2_make_fs_rw called init_threads to initialize the quotad and logd threads. That is a problem

[Cluster-devel] [GFS2 PATCH 10/10] gfs2: replace sd_aspace with sd_inode

2021-07-13 Thread Bob Peterson
Before this patch, gfs2 kept its own address space for rgrps, but this caused a lockdep problem because vfs assumes a 1:1 relationship between address spaces and their inode. One problematic area is this: gfs2_unpin mark_buffer_dirty(bh); mapping = page_mapping(page);

[Cluster-devel] [GFS2 PATCH 03/10] gfs2: be more verbose replaying invalid rgrp blocks

2021-07-13 Thread Bob Peterson
This patch adds some crucial information when journal replay detects a replay of an obsolete rgrp block. For example, it wasn't printing the journal id or the generation number played. This just supplements what is logged in this unusual case. The function that actually complains about the

[Cluster-devel] [GFS2 PATCH 09/10] gfs2: fix deadlock in gfs2_ail1_empty withdraw

2021-07-13 Thread Bob Peterson
Before this patch, function gfs2_ail1_empty could issue a file system withdraw when IO errors were discovered. However, there are several callers, including gfs2_flush_revokes() which holds the gfs2_log_lock before calling gfs2_ail1_empty. If gfs2_ail1_empty needed to withdraw it would leave the

[Cluster-devel] [GFS2 PATCH 00/10] gfs2: misc. patch collection

2021-07-13 Thread Bob Peterson
This is a set of 10 patches from my collection. They can be added individually or as a set. Bob Peterson (10): gfs2: Fix glock recursion in freeze_go_xmote_bh gfs2: Eliminate go_xmote_bh in favor of go_lock gfs2: be more verbose replaying invalid rgrp blocks gfs2: trivial clean up of

[Cluster-devel] [GFS2 PATCH 07/10] gfs2: Don't release and reacquire local statfs bh

2021-07-13 Thread Bob Peterson
Before this patch, several functions in gfs2 related to the updating of the statfs file used a newly acquired/read buffer_head for the local statfs file. This is completely unnecessary, because other nodes should never update it. Recreating the buffer is a waste of time. This patch allows gfs2 to

[Cluster-devel] [GFS2 PATCH 08/10] gfs2: New log flush watchdog

2021-07-13 Thread Bob Peterson
This patch adds a new watchdog whose sole purpose is to complain when gfs2_log_flush operations are taking too long. Signed-off-by: Bob Peterson --- fs/gfs2/incore.h | 6 ++ fs/gfs2/log.c| 47 fs/gfs2/log.h| 1 +

[Cluster-devel] [GFS2 PATCH 01/10] gfs2: Fix glock recursion in freeze_go_xmote_bh

2021-07-13 Thread Bob Peterson
We must not call gfs2_consist (which does a file system withdraw) from the freeze glock's freeze_go_xmote_bh function because the withdraw will try to use the freeze glock, thus causing a glock recursion error. This patch changes freeze_go_xmote_bh to call function gfs2_assert_withdraw_delayed

[Cluster-devel] [GFS2 PATCH 05/10] gfs2: tiny cleanup in gfs2_log_reserve

2021-07-13 Thread Bob Peterson
Function gfs2_log_reserve was setting revoke_blks to 0. There's no need because it calculates it shortly thereafter. This patch removes the unnecessary set. Signed-off-by: Bob Peterson --- fs/gfs2/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/log.c

[Cluster-devel] [GFS2 PATCH 04/10] gfs2: trivial clean up of gfs2_ail_error

2021-07-13 Thread Bob Peterson
This patch does not change function. It adds variable sdp to clean up function gfs2_ail_error and make it more readable. Signed-off-by: Bob Peterson --- fs/gfs2/glops.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index

[Cluster-devel] [gfs2:for-next.mmap-fault 1/5] undefined reference to `fault_in_user_pages'

2021-07-13 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.mmap-fault head: caf380f33115de28cbd1d497390d346bedac8238 commit: 4423c35bf0a030f43fb8623a55418b727606c842 [1/5] iov_iter: Introduce fault_in_iov_iter helper config: sh-allmodconfig (attached as .config)

[Cluster-devel] [gfs2:for-next.mmap-fault 1/5] ld.lld: error: undefined symbol: fault_in_user_pages

2021-07-13 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.mmap-fault head: caf380f33115de28cbd1d497390d346bedac8238 commit: 4423c35bf0a030f43fb8623a55418b727606c842 [1/5] iov_iter: Introduce fault_in_iov_iter helper config: riscv-randconfig-r011-20210712 (attached as

Re: [Cluster-devel] [PATCH] gfs2: Fix memory leak of object lsi on error return path

2021-07-13 Thread Andreas Gruenbacher
Hi Colin, On Mon, Jul 12, 2021 at 6:24 PM Colin King wrote: > > From: Colin Ian King > > In the case where IS_ERR(lsi->si_sc_inode) is true the error exit path > to free_local does not kfree the allocated object lsi leading to a memory > leak. Fix this by kfree'ing lst before taking the error