Re: [Cluster-devel] [PATCHv4 v6.5-rc2 3/3] fs: dlm: fix F_CANCELLK to cancel pending request

2023-07-21 Thread Alexander Aring
Hi, On Fri, Jul 21, 2023 at 12:25 PM Andreas Gruenbacher wrote: > > On Thu, Jul 20, 2023 at 2:22 PM Alexander Aring wrote: > > This patch fixes the current handling of F_CANCELLK by not just doing a > > unlock as we need to try to cancel a lock at first. A unlock makes sense > > on a non-blockin

Re: [Cluster-devel] [RFC v6.5-rc2 3/3] fs: lockd: introduce safe async lock op

2023-07-21 Thread Jeff Layton
On Thu, 2023-07-20 at 08:58 -0400, Alexander Aring wrote: > This patch reverts mostly commit 40595cdc93ed ("nfs: block notification > on fs with its own ->lock") and introduces an EXPORT_OP_SAFE_ASYNC_LOCK > export flag to signal that the "own ->lock" implementation supports > async lock requests.

Re: [Cluster-devel] [RFC v6.5-rc2 1/3] fs: lockd: nlm_blocked list race fixes

2023-07-21 Thread Chuck Lever
On Thu, Jul 20, 2023 at 08:58:04AM -0400, Alexander Aring wrote: > This patch fixes races when lockd accessing the global nlm_blocked list. > It was mostly safe to access the list because everything was accessed > from the lockd kernel thread context but there exists cases like > nlmsvc_grant_defer

Re: [Cluster-devel] [RFC v6.5-rc2 2/3] fs: lockd: fix race in async lock request handling

2023-07-21 Thread Jeff Layton
On Fri, 2023-07-21 at 09:09 -0400, Alexander Aring wrote: > Hi, > > On Thu, Jul 20, 2023 at 8:58 AM Alexander Aring wrote: > > > > This patch fixes a race in async lock request handling between adding > > the relevant struct nlm_block to nlm_blocked list after the request was > > sent by vfs_loc

Re: [Cluster-devel] [PATCHv4 v6.5-rc2 3/3] fs: dlm: fix F_CANCELLK to cancel pending request

2023-07-21 Thread Andreas Gruenbacher
On Thu, Jul 20, 2023 at 2:22 PM Alexander Aring wrote: > This patch fixes the current handling of F_CANCELLK by not just doing a > unlock as we need to try to cancel a lock at first. A unlock makes sense > on a non-blocking lock request but if it's a blocking lock request we > need to cancel the r

Re: [Cluster-devel] [RFC v6.5-rc2 2/3] fs: lockd: fix race in async lock request handling

2023-07-21 Thread Jeff Layton
On Thu, 2023-07-20 at 08:58 -0400, Alexander Aring wrote: > This patch fixes a race in async lock request handling between adding > the relevant struct nlm_block to nlm_blocked list after the request was > sent by vfs_lock_file() and nlmsvc_grant_deferred() does a lookup of the > nlm_block in the n

Re: [Cluster-devel] [RFC v6.5-rc2 1/3] fs: lockd: nlm_blocked list race fixes

2023-07-21 Thread Jeff Layton
On Thu, 2023-07-20 at 08:58 -0400, Alexander Aring wrote: > This patch fixes races when lockd accessing the global nlm_blocked list. > It was mostly safe to access the list because everything was accessed > from the lockd kernel thread context but there exists cases like > nlmsvc_grant_deferred() t

Re: [Cluster-devel] [RFC v6.5-rc2 2/3] fs: lockd: fix race in async lock request handling

2023-07-21 Thread Alexander Aring
Hi, On Thu, Jul 20, 2023 at 8:58 AM Alexander Aring wrote: > > This patch fixes a race in async lock request handling between adding > the relevant struct nlm_block to nlm_blocked list after the request was > sent by vfs_lock_file() and nlmsvc_grant_deferred() does a lookup of the > nlm_block in