[Cluster-devel] [PATCH dlm/next 5/7] fs: dlm: move free writequeue into con free

2020-08-27 Thread Alexander Aring
This patch just move the free of struct connection member writequeue into the functionality when struct connection will be freed instead of doing two iterations. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

[Cluster-devel] [PATCH dlm/next 4/7] fs: dlm: fix configfs memory leak

2020-08-27 Thread Alexander Aring
This patch fixes the following memory detected by kmemleak and umount gfs2 filesystem which removed the last lockspace: unreferenced object 0x9264f482f600 (size 192): comm "dlm_controld", pid 325, jiffies 4294690276 (age 48.136s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 6e

[Cluster-devel] [PATCH dlm/next 6/7] fs: dlm: handle possible othercon writequeues

2020-08-27 Thread Alexander Aring
This patch adds free of possible other writequeue entries in othercon member of struct connection. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index

[Cluster-devel] [PATCH dlm/next 1/7] fs: dlm: synchronize dlm before shutdown

2020-08-27 Thread Alexander Aring
This patch moves the dlm workqueue dlm synchronization before shutdown handling. The patch just flushes all pending work before starting to shutdown the connection. At least for the send_workqeue we should flush the workqueue to make sure there is no new connection handling going on as

[Cluster-devel] [PATCH dlm/next 0/7] fs: dlm: locking and memory fixes

2020-08-27 Thread Alexander Aring
Hi, this patch series contains some locking and memory issues which I found while working on a bigger fix to make dlm secured against tcpkill. - Alex Alexander Aring (7): fs: dlm: synchronize dlm before shutdown fs: dlm: make connection hash lockless fs: dlm: fix dlm_local_addr memory

[Cluster-devel] [PATCH dlm/next 7/7] fs: dlm: use free_con to free connection

2020-08-27 Thread Alexander Aring
This patch use free_con() functionality to free the listen connection if listen fails. It also fixes an issue that a freed resource is still part of the connection_hash as hlist_del() is not called in this case. The only difference is that free_con() handles othercon as well, but this is never

[Cluster-devel] [PATCH dlm/next 2/7] fs: dlm: make connection hash lockless

2020-08-27 Thread Alexander Aring
There are some problems with the connections_lock. During my experiements I saw sometimes circular dependencies with sock_lock. The reason here might be code parts which runs nodeid2con() before or after sock_lock is acquired. Another issue are missing locks in for_conn() iteration. Maybe this

Re: [Cluster-devel] [GFS2 PATCH 07/12] gfs2: make gfs2_ail1_empty_one return the count of active items

2020-08-27 Thread Bob Peterson
- Original Message - > Hi Bob, > > On Fri, Aug 21, 2020 at 7:33 PM Bob Peterson wrote: > > This patch is one baby step toward simplifying the journal management. > > It simply changes function gfs2_ail1_empty_one from a void to an int and > > makes it return a count of active items. This

Re: [Cluster-devel] [GFS2 PATCH 06/12] gfs2: Create transaction for inodes with i_nlink != 0

2020-08-27 Thread Bob Peterson
- Original Message - > On Fri, Aug 21, 2020 at 7:33 PM Bob Peterson wrote: > > Before this patch, function gfs2_evict_inode would check if i_nlink > > was non-zero, and if so, go to label out. The problem is, the evicted > > file may still have outstanding pages that need invalidating,

Re: [Cluster-devel] [GFS2 PATCH 06/12] gfs2: Create transaction for inodes with i_nlink != 0

2020-08-27 Thread Steven Whitehouse
Hi, On 27/08/2020 07:00, Andreas Gruenbacher wrote: On Fri, Aug 21, 2020 at 7:33 PM Bob Peterson wrote: Before this patch, function gfs2_evict_inode would check if i_nlink was non-zero, and if so, go to label out. The problem is, the evicted file may still have outstanding pages that need

Re: [Cluster-devel] [GFS2 PATCH 06/12] gfs2: Create transaction for inodes with i_nlink != 0

2020-08-27 Thread Andreas Gruenbacher
On Fri, Aug 21, 2020 at 7:33 PM Bob Peterson wrote: > Before this patch, function gfs2_evict_inode would check if i_nlink > was non-zero, and if so, go to label out. The problem is, the evicted > file may still have outstanding pages that need invalidating, but > the call to

Re: [Cluster-devel] [GFS2 PATCH 05/12] gfs2: Calculate number of revokes during evict

2020-08-27 Thread Andreas Gruenbacher
On Fri, Aug 21, 2020 at 7:33 PM Bob Peterson wrote: > Before this patch, function gfs2_evict_inode would start a transaction > in order to write some unknown number of revokes. Instead of calculating > the value, it used sdp->sd_jdesc->jd_blocks, the number of blocks in the > entire journal. You