Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (73 commits)
  [DLM] Clean up lowcomms
  [GFS2] Change gfs2_fsync() to use write_inode_now()
  [GFS2] Fix indent in recovery.c
  [GFS2] Don't flush everything on fdatasync
  [GFS2] Add a comment about reading the super block
  [GFS2] Mount problem with the GFS2 code
  [GFS2] Remove gfs2_check_acl()
  [DLM] fix format warnings in rcom.c and recoverd.c
  [GFS2] lock function parameter
  [DLM] don't accept replies to old recovery messages
  [DLM] fix size of STATUS_REPLY message
  [GFS2] fs/gfs2/log.c:log_bmap() fix printk format warning
  [DLM] fix add_requestqueue checking nodes list
  [GFS2] Fix recursive locking in gfs2_getattr
  [GFS2] Fix recursive locking in gfs2_permission
  [GFS2] Reduce number of arguments to meta_io.c:getbuf()
  [GFS2] Move gfs2_meta_syncfs() into log.c
  [GFS2] Fix journal flush problem
  [GFS2] mark_inode_dirty after write to stuffed file
  [GFS2] Fix glock ordering on inode creation
  ...
  • Loading branch information
Linus Torvalds committed Dec 7, 2006
2 parents 0a01707 + ac33d07 commit 1c1afa3
Show file tree
Hide file tree
Showing 57 changed files with 2,341 additions and 1,211 deletions.
20 changes: 19 additions & 1 deletion fs/dlm/Kconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
menu "Distributed Lock Manager"
depends on INET && IP_SCTP && EXPERIMENTAL
depends on EXPERIMENTAL && INET

config DLM
tristate "Distributed Lock Manager (DLM)"
depends on IPV6 || IPV6=n
select CONFIGFS_FS
select IP_SCTP if DLM_SCTP
help
A general purpose distributed lock manager for kernel or userspace
applications.

choice
prompt "Select DLM communications protocol"
depends on DLM
default DLM_TCP
help
The DLM Can use TCP or SCTP for it's network communications.
SCTP supports multi-homed operations whereas TCP doesn't.
However, SCTP seems to have stability problems at the moment.

config DLM_TCP
bool "TCP/IP"

config DLM_SCTP
bool "SCTP"

endchoice

config DLM_DEBUG
bool "DLM debugging"
depends on DLM
Expand Down
4 changes: 3 additions & 1 deletion fs/dlm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dlm-y := ast.o \
dir.o \
lock.o \
lockspace.o \
lowcomms.o \
main.o \
member.o \
memory.o \
Expand All @@ -17,3 +16,6 @@ dlm-y := ast.o \
util.o
dlm-$(CONFIG_DLM_DEBUG) += debug_fs.o

dlm-$(CONFIG_DLM_TCP) += lowcomms-tcp.o

dlm-$(CONFIG_DLM_SCTP) += lowcomms-sctp.o
4 changes: 3 additions & 1 deletion fs/dlm/dlm_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ struct dlm_ls {
char *ls_recover_buf;
int ls_recover_nodeid; /* for debugging */
uint64_t ls_rcom_seq;
spinlock_t ls_rcom_spin;
struct list_head ls_recover_list;
spinlock_t ls_recover_list_lock;
int ls_recover_list_count;
Expand All @@ -488,7 +489,8 @@ struct dlm_ls {
#define LSFL_RUNNING 1
#define LSFL_RECOVERY_STOP 2
#define LSFL_RCOM_READY 3
#define LSFL_UEVENT_WAIT 4
#define LSFL_RCOM_WAIT 4
#define LSFL_UEVENT_WAIT 5

/* much of this is just saving user space pointers associated with the
lock that we pass back to the user lib with an ast */
Expand Down
16 changes: 12 additions & 4 deletions fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -2372,6 +2372,7 @@ static int send_lookup_reply(struct dlm_ls *ls, struct dlm_message *ms_in,
static void receive_flags(struct dlm_lkb *lkb, struct dlm_message *ms)
{
lkb->lkb_exflags = ms->m_exflags;
lkb->lkb_sbflags = ms->m_sbflags;
lkb->lkb_flags = (lkb->lkb_flags & 0xFFFF0000) |
(ms->m_flags & 0x0000FFFF);
}
Expand Down Expand Up @@ -3028,10 +3029,17 @@ int dlm_receive_message(struct dlm_header *hd, int nodeid, int recovery)

while (1) {
if (dlm_locking_stopped(ls)) {
if (!recovery)
dlm_add_requestqueue(ls, nodeid, hd);
error = -EINTR;
goto out;
if (recovery) {
error = -EINTR;
goto out;
}
error = dlm_add_requestqueue(ls, nodeid, hd);
if (error == -EAGAIN)
continue;
else {
error = -EINTR;
goto out;
}
}

if (lock_recovery_try(ls))
Expand Down
4 changes: 4 additions & 0 deletions fs/dlm/lockspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "memory.h"
#include "lock.h"
#include "recover.h"
#include "requestqueue.h"

#ifdef CONFIG_DLM_DEBUG
int dlm_create_debug_file(struct dlm_ls *ls);
Expand Down Expand Up @@ -478,6 +479,8 @@ static int new_lockspace(char *name, int namelen, void **lockspace,
ls->ls_recoverd_task = NULL;
mutex_init(&ls->ls_recoverd_active);
spin_lock_init(&ls->ls_recover_lock);
spin_lock_init(&ls->ls_rcom_spin);
get_random_bytes(&ls->ls_rcom_seq, sizeof(uint64_t));
ls->ls_recover_status = 0;
ls->ls_recover_seq = 0;
ls->ls_recover_args = NULL;
Expand Down Expand Up @@ -684,6 +687,7 @@ static int release_lockspace(struct dlm_ls *ls, int force)
* Free structures on any other lists
*/

dlm_purge_requestqueue(ls);
kfree(ls->ls_recover_args);
dlm_clear_free_entries(ls);
dlm_clear_members(ls);
Expand Down
Loading

0 comments on commit 1c1afa3

Please sign in to comment.