Skip to content

fs: dlm: fixes, cleanups and locktorture

Alexander Aring cluster-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/216 patches 0 repliesNew
  2. v1 posting 1/21 patch 0 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16fs: dlm: fix race in lowcommsfs/dlm/lowcomms.c+4 -00 replies
2/16fs: dlm: fix race between test_bit() and queue_work()fs/dlm/ast.c+4 -20 replies
3/16fs: dlm: handle -EBUSY as first for lock validationfs/dlm/lock.c+9 -90 replies
4/16fs: dlm: handle -EBUSY as first for unlock validationfs/dlm/lock.c+22 -220 replies
5/16fs: dlm: use __func__ for function namefs/dlm/lock.c+2 -20 replies
6/16fs: dlm: handle -EINVAL as log_error()fs/dlm/lock.c+30 -20 replies
7/16fs: dlm: fix invalid derefence of sb_lvbptrfs/dlm/lock.c+1 -10 replies
8/16fs: dlm: allow lockspaces have zero lvblenfs/dlm/lockspace.c+1 -10 replies
9/16fs: dlm: handle rcom in else if branchfs/dlm/lock.c+4 -10 replies
10/16fs: dlm: remove dlm_del_ast prototypefs/dlm/ast.h+0 -10 replies
11/16fs: dlm: change ls_clear_proc_locks to spinlockfs/dlm/dlm_internal.h fs/dlm/lock.c fs/dlm/lockspace.c +1 more+8 -80 replies
12/16fs: dlm: trace user space callbacksfs/dlm/lock.c fs/dlm/user.c include/trace/events/dlm.h+38 -150 replies
13/16fs: dlm: move DLM_LSFL_FS out of uapidrivers/md/md-cluster.c fs/dlm/lockspace.c fs/dlm/lockspace.h +5 more+44 -150 replies
14/16fs: dlm: LSFL_CB_DELAY only for kernel lockspacesfs/dlm/ast.c+7 -60 replies
15/16fs: dlm: const void resource name parameterfs/dlm/lock.c fs/dlm/lock.h include/linux/dlm.h +1 more+17 -140 replies
16/16fs: dlm: initial commit of locktorturefs/dlm/Kconfig fs/dlm/Makefile fs/dlm/dlm_locktorture.c+529 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Cluster-devel] [RESEND dlm/next 00/16] fs: dlm: fixes, cleanups and locktorture

Hi,

this patch series contains fixes for lowcomms and -EBUSY handling. In lowcomms we have a race which could end in a use after free. The current validation of DLM API and between -EBUSY cases vs -EINVAL cases has a issue because -EINVAL is checked on first but reading variables which are only valid if there is a non -EBUSY case. To fix it we moved the -EBUSY case check at first which should be always the first check which should be done (in case of the current DLM API behaviour and -EBUSY).

Then there are bunch of cleanup/fixes patches regarding the dlm callback behaviour. Adding traceevents for dlm user space locks, before we only captured kernel locks. Another cleanups like constify resource name parameter prepares dlm for the a new locktorture module.

- Alex

changes since sending on mailinglist:

- fixed some error handling in locktorture if cluster is not configured at module init.
- add patch for else if branch for DLM_RCOM
- fixes user space tracing and error assign
- add WARN_ON(1) for -EINVAL case
- cleanup commit message for invalid derefence of sb_lvbptr

Alexander Aring (16):
fs: dlm: fix race in lowcomms
fs: dlm: fix race between test_bit() and queue_work()
fs: dlm: handle -EBUSY as first for lock validation
fs: dlm: handle -EBUSY as first for unlock validation
fs: dlm: use __func__ for function name
fs: dlm: handle -EINVAL as log_error()
fs: dlm: fix invalid derefence of sb_lvbptr
fs: dlm: allow lockspaces have zero lvblen
fs: dlm: handle rcom in else if branch
fs: dlm: remove dlm_del_ast prototype
fs: dlm: change ls_clear_proc_locks to spinlock
fs: dlm: trace user space callbacks
fs: dlm: move DLM_LSFL_FS out of uapi
fs: dlm: LSFL_CB_DELAY only for kernel lockspaces
fs: dlm: const void resource name parameter
fs: dlm: initial commit of locktorture

 drivers/md/md-cluster.c    |   4 +-
 fs/dlm/Kconfig             |  11 +
 fs/dlm/Makefile            |   1 +
 fs/dlm/ast.c               |  15 +-
 fs/dlm/ast.h               |   1 -
 fs/dlm/dlm_internal.h      |   2 +-
 fs/dlm/dlm_locktorture.c   | 517 +++++++++++++++++++++++++++++++++++++
 fs/dlm/lock.c              | 160 ++++++++----
 fs/dlm/lock.h              |   2 +-
 fs/dlm/lockspace.c         |  32 ++-
 fs/dlm/lockspace.h         |  13 +
 fs/dlm/lowcomms.c          |   4 +
 fs/dlm/user.c              |  17 +-
 fs/gfs2/lock_dlm.c         |   2 +-
 fs/ocfs2/stack_user.c      |   2 +-
 include/linux/dlm.h        |   5 +-
 include/trace/events/dlm.h |  26 +-
 include/uapi/linux/dlm.h   |   1 -
 18 files changed, 718 insertions(+), 97 deletions(-)
 create mode 100644 fs/dlm/dlm_locktorture.c
Signature · 1 line
2.31.1