[Cluster-devel] [PATCHv2 dlm-tool 0/9] dlm-tool: pending fixes/cleanups dlm-tool patches

2023-03-07 Thread Alexander Aring
Hi, this is a resend of a subset of pending dlm-tool patches just without the dlm_controld functionality to plot the dlm_controld posix cluster-wide lock states over time. I split this feature out to have at first those cleanups in fixes/dlm userspace instead of doing a new feature at the same

[Cluster-devel] [PATCHv2 dlm-tool 3/9] dlm_controld: move processing of saved messages to plock level

2023-03-07 Thread Alexander Aring
Ad the loglevel is for save plock messages during corosync resource membership upate. This patch will put the processing of saved messages on the same loglevel. --- dlm_controld/plock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlm_controld/plock.c

[Cluster-devel] [PATCHv2 dlm-tool 2/9] dlm_controld: always create logdir

2023-03-07 Thread Alexander Aring
Currently the logdir will be created only if logfile does contain a string. To add another logfiles we simple create the logdir always on startup. --- dlm_controld/logging.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git

[Cluster-devel] [PATCHv2 dlm-tool 5/9] dlm_controld: constify timeval of dt_usec()

2023-03-07 Thread Alexander Aring
Those parameters are only used read only. We don't change any data where those pointers point to. --- dlm_controld/plock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c index 462c9212..8b052a94 100644 --- a/dlm_controld/plock.c +++

[Cluster-devel] [PATCHv2 dlm-tool 7/9] dlm_controld: use write_result()

2023-03-07 Thread Alexander Aring
This patch will use write_result() instead of code the same code again what write_result() is doing. Reported-by: Andreas Gruenbacher --- dlm_controld/plock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c index

[Cluster-devel] [PATCHv2 dlm-tool 1/9] dlm_tool: add fail functionality if dump failed

2023-03-07 Thread Alexander Aring
Currently dlm_controld sets a embedded data int value of dlm_controld dump functionality failed for e.g. if lockspace cannot be found. The dlm_tool does not parse this possible error functionality and will exit successfully. This patch will add dlm_tool fail functionality if dlm_controld sets an

[Cluster-devel] [PATCHv2 dlm-tool 9/9] dlm_controld: constify name_in in log_level()

2023-03-07 Thread Alexander Aring
This patch will constify the name_in parameter of log_level() which is only used as readonly pointer. --- dlm_controld/dlm_daemon.h | 2 +- dlm_controld/logging.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h index

[Cluster-devel] [PATCHv2 dlm-tool 8/9] dlm_controld: be sure we stop lockspaces before shutdown

2023-03-07 Thread Alexander Aring
The dlm_controld shutdown process will drop all dlm configfs entries of dlm communication settings regarding corosync address configuration. This will end in an socket close in the dlm subsystem of the connection which belongs to it. Newly introduced kernel warnings will check if the lockspace is

[Cluster-devel] [PATCHv2 dlm-tool 4/9] dlm_controld: remove ls parameter

2023-03-07 Thread Alexander Aring
The ls parameter in write_result() is not used, so we can remove it. --- dlm_controld/plock.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c index c2c80360..462c9212 100644 --- a/dlm_controld/plock.c +++

[Cluster-devel] [PATCHv2 dlm-tool 6/9] dlm_controld: add gcc format printf attribute to log_level

2023-03-07 Thread Alexander Aring
This patch will add __attribute__ (( format( printf, 3, 4 ) ) to log_level() functionality which has a format string as parameter. With this change we enable compiler warnings if format string and applied parameters do not match. We had some couple of warnings which this patch fixes as well. ---

Re: [Cluster-devel] return an ERR_PTR from __filemap_get_folio v3

2023-03-07 Thread Andreas Gruenbacher
On Tue, Mar 7, 2023 at 4:07 PM Christoph Hellwig wrote: > __filemap_get_folio and its wrappers can return NULL for three different > conditions, which in some cases requires the caller to reverse engineer > the decision making. This is fixed by returning an ERR_PTR instead of > NULL and thus

[Cluster-devel] [PATCH 2/7] mm: make mapping_get_entry available outside of filemap.c

2023-03-07 Thread Christoph Hellwig
mapping_get_entry is useful for page cache API users that need to know about xa_value internals. Rename it and make it available in pagemap.h. Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) --- include/linux/pagemap.h | 1 + mm/filemap.c| 6 +++--- 2 files

[Cluster-devel] [PATCH 6/7] mm: remove FGP_ENTRY

2023-03-07 Thread Christoph Hellwig
FGP_ENTRY is unused now, so remove it. Signed-off-by: Christoph Hellwig --- include/linux/pagemap.h | 3 +-- mm/filemap.c| 7 +-- mm/folio-compat.c | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h

[Cluster-devel] [PATCH 1/7] mm: don't look at xarray value entries in split_huge_pages_in_file

2023-03-07 Thread Christoph Hellwig
split_huge_pages_in_file never wants to do anything with the special value enties. Switch to using filemap_get_folio to not even see them. Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) --- mm/huge_memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

[Cluster-devel] [PATCH 5/7] shmem: open code the page cache lookup in shmem_get_folio_gfp

2023-03-07 Thread Christoph Hellwig
Use the very low level filemap_get_entry helper to look up the entry in the xarray, and then: - don't bother locking the folio if only doing a userfault notification - open code locking the page and checking for truncation in a related code block This will allow to eventually remove the

[Cluster-devel] return an ERR_PTR from __filemap_get_folio v3

2023-03-07 Thread Christoph Hellwig
Hi all, __filemap_get_folio and its wrappers can return NULL for three different conditions, which in some cases requires the caller to reverse engineer the decision making. This is fixed by returning an ERR_PTR instead of NULL and thus transporting the reason for the failure. But to make that

[Cluster-devel] [PATCH 4/7] shmem: remove shmem_get_partial_folio

2023-03-07 Thread Christoph Hellwig
Add a new SGP_FIND mode for shmem_get_partial_folio that works like SGP_READ, but does not check i_size. Use that instead of open coding the page cache lookup in shmem_get_partial_folio. Note that this is a behavior change in that it reads in swap cache entries for offsets outside i_size,

[Cluster-devel] [PATCH 7/7] mm: return an ERR_PTR from __filemap_get_folio

2023-03-07 Thread Christoph Hellwig
Instead of returning NULL for all errors, distinguish between: - no entry found and not asked to allocated (-ENOENT) - failed to allocate memory (-ENOMEM) - would block (-EAGAIN) so that callers don't have to guess the error based on the passed in flags. Also pass through the error through

[Cluster-devel] [PATCH 3/7] mm: use filemap_get_entry in filemap_get_incore_folio

2023-03-07 Thread Christoph Hellwig
filemap_get_incore_folio wants to look at the details of xa_is_value entries, but doesn't need any of the other logic in filemap_get_folio. Switch it to use the lower-level filemap_get_entry interface. Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) --- mm/swap_state.c |

Re: [Cluster-devel] introduce function wrapper for sk_data_ready() call?

2023-03-07 Thread Kuniyuki Iwashima
From: Alexander Aring Date: Mon, 6 Mar 2023 07:47:02 -0500 > > Hi, > > I saw that in 6.3-rc1 the following patch introduced something in dlm > socket application handling 40e0b0908142 ("net/sock: Introduce > trace_sk_data_ready()"). I am asking myself if we could instead > introduce a