Skip to content

Commit

Permalink
[DLM] dlm: user locks
Browse files Browse the repository at this point in the history
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: Patrick Caulfield <[email protected]>
Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
  • Loading branch information
teigland authored and swhiteho committed Jul 13, 2006
1 parent 2eb168c commit 597d0ca
Show file tree
Hide file tree
Showing 13 changed files with 1,192 additions and 1,260 deletions.
8 changes: 0 additions & 8 deletions fs/dlm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions fs/dlm/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
obj-$(CONFIG_DLM) += dlm.o
obj-$(CONFIG_DLM_DEVICE) += dlm_device.o

dlm-y := ast.o \
config.o \
dir.o \
Expand All @@ -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
7 changes: 6 additions & 1 deletion fs/dlm/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

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

#define WAKE_ASTS 0

Expand All @@ -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);
Expand Down
Loading

0 comments on commit 597d0ca

Please sign in to comment.