<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/dlm/lockspace.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-14T20:16:05+00:00</updated>
<entry>
<title>dlm: check for undefined release_option values</title>
<updated>2025-08-14T20:16:05+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2025-08-14T15:22:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e40210788636619404871df07445fa4590138b4'/>
<id>urn:sha1:8e40210788636619404871df07445fa4590138b4</id>
<content type='text'>
Checking on all undefined release_option values to return -EINVAL in
case a user is providing them to dlm_release_lockspace().

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: handle release_option as unsigned</title>
<updated>2025-08-14T20:16:05+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2025-08-14T15:22:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d90041a0d285044b89629f539ca0685e156848b'/>
<id>urn:sha1:8d90041a0d285044b89629f539ca0685e156848b</id>
<content type='text'>
Future patches will introduce a invalid argument check for undefined
values. All values for release_option are positive integer values to not
check on negative values as well we just change the parameter to
unsigned int.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: add new flag DLM_RELEASE_RECOVER for dlm_lockspace_release</title>
<updated>2025-08-12T16:37:21+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2025-07-23T15:21:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6f4f4ca5caf73de5e86329547d4527b3e0c08488'/>
<id>urn:sha1:6f4f4ca5caf73de5e86329547d4527b3e0c08488</id>
<content type='text'>
When dlm_lockspace_release() is passed DLM_RELEASE_RECOVER, it
tells the dlm to handle the release/leave as if the node had failed,
i.e. perform recovery steps for a failed node, like recover_slot().

When DLM_RELEASE_RECOVER is set:
- dlm_release_lockspace() includes RELEASE_RECOVER=1 in the OFFLINE
  uevent sent to userspace.
- userspace/dlm_controld sends a message to all lockspace members
  indicating that the subsequent node removal should be handled as
  if the node had failed.
- when dlm_controld on all nodes receives the new message, it sets
  the release_recover configfs entry to 1 for the node.
- when the dlm/kernel next performs recovery and removes the node,
  it will see that release_recover has been set, and will perform
  recovery steps for the node as if it had failed, e.g. the
  recover_slot() callback is called to notify the fs.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: add new RELEASE_RECOVER uevent attribute for release_lockspace</title>
<updated>2025-08-12T16:26:29+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2025-07-23T15:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5665374c7246159dbca1a80a0b54ad27e3379bcb'/>
<id>urn:sha1:5665374c7246159dbca1a80a0b54ad27e3379bcb</id>
<content type='text'>
RELEASE_RECOVER=0|1 is passed to user space as part of the OFFLINE
uevent for leaving a lockspace, and used by subsequent patches.
RELEASE_RECOVER=1 tells user space that the release_lockspace/leave
should be handled by the remaining lockspace members as if the
leaving node had failed.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: use defines for force values in dlm_release_lockspace</title>
<updated>2025-08-12T16:22:49+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2025-07-23T15:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bea90085dcb0f9a75748e73d723bde557a5ebf1a'/>
<id>urn:sha1:bea90085dcb0f9a75748e73d723bde557a5ebf1a</id>
<content type='text'>
Clarify the use of the force parameter by renaming it to
"release_option" and adding defines (with descriptions) for
each of the accepted values.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: check for defined force value in dlm_lockspace_release</title>
<updated>2025-08-12T16:14:24+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2025-07-23T15:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6af515c9f3ccec3eb8a262ca86bef2c499d07951'/>
<id>urn:sha1:6af515c9f3ccec3eb8a262ca86bef2c499d07951</id>
<content type='text'>
Force values over 3 are undefined, so don't treat them as 3.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: prevent NPD when writing a positive value to event_done</title>
<updated>2025-02-10T19:18:04+00:00</updated>
<author>
<name>Thadeu Lima de Souza Cascardo</name>
<email>cascardo@igalia.com</email>
</author>
<published>2025-02-10T19:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e2bad543eca5c25cd02cbc63d72557934d45f13'/>
<id>urn:sha1:8e2bad543eca5c25cd02cbc63d72557934d45f13</id>
<content type='text'>
do_uevent returns the value written to event_done. In case it is a
positive value, new_lockspace would undo all the work, and lockspace
would not be set. __dlm_new_lockspace, however, would treat that
positive value as a success due to commit 8511a2728ab8 ("dlm: fix use
count with multiple joins").

Down the line, device_create_lockspace would pass that NULL lockspace to
dlm_find_lockspace_local, leading to a NULL pointer dereference.

Treating such positive values as successes prevents the problem. Given
this has been broken for so long, this is unlikely to break userspace
expectations.

Fixes: 8511a2728ab8 ("dlm: fix use count with multiple joins")
Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@igalia.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: async freeing of lockspace resources</title>
<updated>2024-08-08T20:15:08+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2024-08-02T17:26:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94e180d6255f5a765bb723e6e8b67f1438ce574b'/>
<id>urn:sha1:94e180d6255f5a765bb723e6e8b67f1438ce574b</id>
<content type='text'>
This patch handles freeing of lockspace resources asynchronously besides
the release_lockspace() context. The release_lockspace() context is
sometimes called in a time critical context, e.g. umount syscall. Most
every user space init system will timeout if it takes too long. To
reduce the potential waiting time we deregister in release_lockspace()
the lockspace from the DLM subsystem and do the actual releasing of
lockspace resource in a worker of a workqueue following recommendation
of:

https://lore.kernel.org/all/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp/T/#u

as flushing of system workqueues are not allowed. The most time to
release the DLM resources are spent to release the data structures
"ls-&gt;ls_lkbxa" and "ls-&gt;ls_rsbtbl" as they iterate over each entries and
those data structures can contain millions of entries. This patch handles
for now only freeing of those data structures as those operations are
the most reason why release_lockspace() blocking of being returned.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: drop kobject release callback handling</title>
<updated>2024-08-08T20:15:08+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2024-08-02T17:26:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a4cf500f1dded74ababd8d33db35631e540e124'/>
<id>urn:sha1:8a4cf500f1dded74ababd8d33db35631e540e124</id>
<content type='text'>
This patch removes the releasing of the "struct dlm ls" resource out of
the kobject handling. Instead we run kfree() after kobject_put() of the
lockspace kobject structure that should always being the last put call.
This prepares to split the releasing of all lockspace resources
asynchronously in the background and just deregister everything in
release_lockspace().

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: remove DLM_LSFL_SOFTIRQ from exflags</title>
<updated>2024-06-12T21:20:51+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2024-06-12T21:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=79ced51e2e5670da67339d5e21818cbc7ce60646'/>
<id>urn:sha1:79ced51e2e5670da67339d5e21818cbc7ce60646</id>
<content type='text'>
The DLM rcom handling has a check that all exflags are the same for the
whole lockspace membership nodes. There are some flags that requires
such handling, however DLM_LSFL_SOFTIRQ does not require this handling
and it should be backwards compatibility with other lockspaces that does
not set this flag.

Fixes: f328a26eeb53 ("dlm: introduce DLM_LSFL_SOFTIRQ_SAFE")
Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
</feed>
