Re: [Cluster-devel] [BUG] fs: dlm: possible ABBA deadlock

2021-08-20 Thread Jia-Ju Bai
On 2021/8/19 23:55, David Teigland wrote: On Thu, Aug 19, 2021 at 04:54:57PM +0800, Jia-Ju Bai wrote: Hello, My static analysis tool reports a possible ABBA deadlock in the dlm filesystem in Linux 5.10: dlm_recover_waiters_pre()   mutex_lock(>ls_waiters_mutex); --> line 5130  

Re: [Cluster-devel] [PATCH v6 10/19] gfs2: Introduce flag for glock holder auto-demotion

2021-08-20 Thread Steven Whitehouse
Hi, On Thu, 2021-08-19 at 21:40 +0200, Andreas Gruenbacher wrote: > From: Bob Peterson > > This patch introduces a new HIF_MAY_DEMOTE flag and infrastructure > that > will allow glocks to be demoted automatically on locking conflicts. > When a locking request comes in that isn't compatible with

[Cluster-devel] [PATCH] fs: remove mandatory file locking support

2021-08-20 Thread Jeff Layton
We added CONFIG_MANDATORY_FILE_LOCKING in 2015, and soon after turned it off in Fedora and RHEL8. Several other distros have followed suit. I've heard of one problem in all that time: Someone migrated from an older distro that supported "-o mand" to one that didn't, and the host had a fstab entry

Re: [Cluster-devel] [PATCH v6 10/19] gfs2: Introduce flag for glock holder auto-demotion

2021-08-20 Thread Steven Whitehouse
Hi, On Fri, 2021-08-20 at 08:11 -0500, Bob Peterson wrote: > On 8/20/21 4:35 AM, Steven Whitehouse wrote: > > Hi, > > > > On Thu, 2021-08-19 at 21:40 +0200, Andreas Gruenbacher wrote: > > > From: Bob Peterson > > > > > > This patch introduces a new HIF_MAY_DEMOTE flag and > > > infrastructure

[Cluster-devel] [PATCH v2 0/2] fs: remove support for mandatory locking

2021-08-20 Thread Jeff Layton
The first patch in this series adds a new warning that should pop on kernels have mandatory locking enabled when someone mounts a filesystem with -o mand. The second patch removes support for mandatory locking altogether. What I think we probably want to do is apply the first to v5.14 before it

[Cluster-devel] [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks

2021-08-20 Thread Jeff Layton
We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros have disabled it. Warn the stragglers that still use "-o mand" that we'll be dropping support for that mount option. Cc: sta...@vger.kernel.org Signed-off-by: Jeff Layton --- fs/namespace.c | 8 1 file changed, 8

Re: [Cluster-devel] [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks

2021-08-20 Thread Jeff Layton
On Fri, 2021-08-20 at 15:49 +, David Laight wrote: > From: Jeff Layton > > Sent: 20 August 2021 14:57 > > > > We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros > > have disabled it. Warn the stragglers that still use "-o mand" that > > we'll be dropping support for that

Re: [Cluster-devel] [PATCH v6 10/19] gfs2: Introduce flag for glock holder auto-demotion

2021-08-20 Thread Andreas Gruenbacher
On Fri, Aug 20, 2021 at 11:35 AM Steven Whitehouse wrote: > On Thu, 2021-08-19 at 21:40 +0200, Andreas Gruenbacher wrote: > > From: Bob Peterson > > > > This patch introduces a new HIF_MAY_DEMOTE flag and infrastructure > > that will allow glocks to be demoted automatically on locking conflicts.

Re: [Cluster-devel] [PATCH v2 0/2] fs: remove support for mandatory locking

2021-08-20 Thread J. Bruce Fields
On Fri, Aug 20, 2021 at 09:57:05AM -0400, Jeff Layton wrote: > The first patch in this series adds a new warning that should pop on > kernels have mandatory locking enabled when someone mounts a filesystem > with -o mand. The second patch removes support for mandatory locking > altogether. > >

Re: [Cluster-devel] [PATCH v6 10/19] gfs2: Introduce flag for glock holder auto-demotion

2021-08-20 Thread Andreas Gruenbacher
On Fri, Aug 20, 2021 at 3:11 PM Bob Peterson wrote: > On 8/20/21 4:35 AM, Steven Whitehouse wrote: > > Hi, > > > > On Thu, 2021-08-19 at 21:40 +0200, Andreas Gruenbacher wrote: > >> From: Bob Peterson > >> > >> This patch introduces a new HIF_MAY_DEMOTE flag and infrastructure > >> that > >>

Re: [Cluster-devel] [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks

2021-08-20 Thread Steven Rostedt
On Fri, 20 Aug 2021 17:52:19 +0200 David Hildenbrand wrote: > > +static bool warned_mand; > > static inline bool may_mandlock(void) > > { > > + if (!warned_mand) { > > + warned_mand = true; > > + > > pr_warn("==\n");

Re: [Cluster-devel] [PATCH 11/30] iomap: add the new iomap_iter model

2021-08-20 Thread Dan Williams
On Thu, Aug 19, 2021 at 9:12 PM Christoph Hellwig wrote: > > On Thu, Aug 19, 2021 at 02:25:52PM -0700, Dan Williams wrote: > > Given most of the iomap_iter users don't care about srcmap, i.e. are > > not COW cases, they are leaving srcmap zero initialized. Should the > > IOMAP types be

Re: [Cluster-devel] [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks

2021-08-20 Thread David Hildenbrand
On 20.08.21 15:57, Jeff Layton wrote: We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros have disabled it. Warn the stragglers that still use "-o mand" that we'll be dropping support for that mount option. Cc: sta...@vger.kernel.org Signed-off-by: Jeff Layton ---

Re: [Cluster-devel] [PATCH v6 10/19] gfs2: Introduce flag for glock holder auto-demotion

2021-08-20 Thread Steven Whitehouse
Hi, On Fri, 2021-08-20 at 15:17 +0200, Andreas Gruenbacher wrote: > On Fri, Aug 20, 2021 at 11:35 AM Steven Whitehouse < > swhit...@redhat.com> wrote: > > On Thu, 2021-08-19 at 21:40 +0200, Andreas Gruenbacher wrote: > > > From: Bob Peterson > > > > > > This patch introduces a new

Re: [Cluster-devel] [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks

2021-08-20 Thread Jeff Layton
On Fri, 2021-08-20 at 17:52 +0200, David Hildenbrand wrote: > On 20.08.21 15:57, Jeff Layton wrote: > > We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros > > have disabled it. Warn the stragglers that still use "-o mand" that > > we'll be dropping support for that mount

[Cluster-devel] [PATCH v3 2/2] fs: remove mandatory file locking support

2021-08-20 Thread Jeff Layton
We added CONFIG_MANDATORY_FILE_LOCKING in 2015, and soon after turned it off in Fedora and RHEL8. Several other distros have followed suit. I've heard of one problem in all that time: Someone migrated from an older distro that supported "-o mand" to one that didn't, and the host had a fstab entry

[Cluster-devel] [PATCH v3 0/2] fs: remove support for mandatory locking

2021-08-20 Thread Jeff Layton
v3: slight revision to verbiage, and use pr_warn_once The first patch in this series adds a new warning that should pop on kernels that have mandatory locking enabled when someone mounts a filesystem with -o mand. The second patch removes support for mandatory locking altogether. What I think we

[Cluster-devel] [PATCH v3 1/2] fs: warn about impending deprecation of mandatory locks

2021-08-20 Thread Jeff Layton
We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros have disabled it. Warn the stragglers that still use "-o mand" that we'll be dropping support for that mount option. Cc: sta...@vger.kernel.org Signed-off-by: Jeff Layton --- fs/namespace.c | 6 +- 1 file changed, 5

Re: [Cluster-devel] [PATCH v6 10/19] gfs2: Introduce flag for glock holder auto-demotion

2021-08-20 Thread Bob Peterson
On 8/20/21 4:35 AM, Steven Whitehouse wrote: Hi, On Thu, 2021-08-19 at 21:40 +0200, Andreas Gruenbacher wrote: From: Bob Peterson This patch introduces a new HIF_MAY_DEMOTE flag and infrastructure that will allow glocks to be demoted automatically on locking conflicts. When a locking request

[Cluster-devel] [PATCH v2 2/2] fs: remove mandatory file locking support

2021-08-20 Thread Jeff Layton
We added CONFIG_MANDATORY_FILE_LOCKING in 2015, and soon after turned it off in Fedora and RHEL8. Several other distros have followed suit. I've heard of one problem in all that time: Someone migrated from an older distro that supported "-o mand" to one that didn't, and the host had a fstab entry

Re: [Cluster-devel] [PATCH v6 10/19] gfs2: Introduce flag for glock holder auto-demotion

2021-08-20 Thread Andreas Grünbacher
Am Fr., 20. Aug. 2021 um 15:49 Uhr schrieb Steven Whitehouse : > We always used to manage to avoid holding fs locks when copying to/from > userspace > to avoid these complications. I realize the intent, but that goal has never actually been achieved. Direct I/O has *always* been calling

Re: [Cluster-devel] [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks

2021-08-20 Thread David Laight
From: Jeff Layton > Sent: 20 August 2021 14:57 > > We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros > have disabled it. Warn the stragglers that still use "-o mand" that > we'll be dropping support for that mount option. > > Cc: sta...@vger.kernel.org > Signed-off-by: Jeff

[Cluster-devel] [PATCH dlm/next 3/3] fs: dlm: trace socket handling

2021-08-20 Thread Alexander Aring
This patch adds tracepoints for dlm socket receive and send functionality. We can use it to track how much data was send or received to or from a specific nodeid. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 4 include/trace/events/dlm.h | 40

[Cluster-devel] [PATCH dlm/next 1/3] fs: dlm: debug improvements print nodeid

2021-08-20 Thread Alexander Aring
This patch improves the debug output for midcomms layer by also printing out the nodeid where users counter belongs to. Signed-off-by: Alexander Aring --- fs/dlm/midcomms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c index

[Cluster-devel] [PATCH dlm/next 0/3] fs: dlm: debug and tracepoints

2021-08-20 Thread Alexander Aring
Hi, again a resend of the tracepoints patches and fixed that the lkb reference is hold during tracepoint call. We need to do that because we access the structure during tracing. There is some code duplication to convert the return error for dlm_lock_end trace now. I didn't wanted to change the

[Cluster-devel] [PATCH dlm/next 2/3] fs: dlm: initial support for tracepoints

2021-08-20 Thread Alexander Aring
This patch adds initial support for dlm tracepoints. It will introduce tracepoints to dlm main functionality dlm_lock()/dlm_unlock() and their complete ast() callback or blocking bast() callback. The lock/unlock functionality has a start and end tracepoint, this is because there exists a race in

Re: [Cluster-devel] [PATCH v3 2/2] fs: remove mandatory file locking support

2021-08-20 Thread Al Viro
On Fri, Aug 20, 2021 at 12:39:19PM -0400, Jeff Layton wrote: > diff --git a/fs/locks.c b/fs/locks.c > @@ -2857,8 +2744,7 @@ static void lock_get_status(struct seq_file *f, struct > file_lock *fl, > seq_puts(f, "POSIX "); > > seq_printf(f, " %s ", > -

Re: [Cluster-devel] [PATCH v3 0/2] fs: remove support for mandatory locking

2021-08-20 Thread Jeff Layton
On Fri, 2021-08-20 at 12:39 -0400, Jeff Layton wrote: > v3: slight revision to verbiage, and use pr_warn_once > > The first patch in this series adds a new warning that should pop on > kernels that have mandatory locking enabled when someone mounts a > filesystem with -o mand. The second patch