Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 597d0cae authored by David Teigland's avatar David Teigland Committed by Steven Whitehouse
Browse files

[DLM] dlm: user locks



This changes the way the dlm handles user locks.  The core dlm is now
aware of user locks so they can be dealt with more efficiently.  There is
no more dlm_device module which previously managed its own duplicate copy
of every user lock.

Signed-off-by: default avatarPatrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 2eb168ca
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -10,14 +10,6 @@ config DLM
	A general purpose distributed lock manager for kernel or userspace
	applications.

config DLM_DEVICE
	tristate "DLM device for userspace access"
	depends on DLM
	help
	This module creates a misc device through which the dlm lockspace
	and locking functions become available to userspace applications
	(usually through the libdlm library).

config DLM_DEBUG
	bool "DLM debugging"
	depends on DLM
+1 −3
Original line number Diff line number Diff line
obj-$(CONFIG_DLM) +=		dlm.o
obj-$(CONFIG_DLM_DEVICE) +=	dlm_device.o

dlm-y :=			ast.o \
				config.o \
				dir.o \
@@ -15,7 +13,7 @@ dlm-y := ast.o \
				recover.o \
				recoverd.o \
				requestqueue.o \
				user.o \
				util.o
dlm-$(CONFIG_DLM_DEBUG) +=	debug_fs.o
dlm_device-y :=			device.o
+6 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@

#include "dlm_internal.h"
#include "lock.h"
#include "ast.h"
#include "user.h"

#define WAKE_ASTS  0

@@ -34,6 +34,11 @@ void dlm_del_ast(struct dlm_lkb *lkb)

void dlm_add_ast(struct dlm_lkb *lkb, int type)
{
	if (lkb->lkb_flags & DLM_IFL_USER) {
		dlm_user_add_ast(lkb, type);
		return;
	}

	spin_lock(&ast_queue_lock);
	if (!(lkb->lkb_ast_type & (AST_COMP | AST_BAST))) {
		kref_get(&lkb->lkb_ref);
Loading