Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43305
b: refs/heads/master
c: 2896ee3
h: refs/heads/master
i:
  43303: 0b17ca1
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Nov 30, 2006
1 parent a155a39 commit acf4436
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dcf3dd852f554bb0016aa23892596717cc123a26
refs/heads/master: 2896ee37ccc1f9acb244c9b02becb74a43661009
2 changes: 2 additions & 0 deletions trunk/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 @@ -684,6 +685,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
16 changes: 8 additions & 8 deletions trunk/fs/dlm/recoverd.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)
goto fail;
}

/*
* Purge directory-related requests that are saved in requestqueue.
* All dir requests from before recovery are invalid now due to the dir
* rebuild and will be resent by the requesting nodes.
*/

dlm_purge_requestqueue(ls);

/*
* Wait for all nodes to complete directory rebuild.
*/
Expand Down Expand Up @@ -181,6 +173,14 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)

dlm_release_root_list(ls);

/*
* Purge directory-related requests that are saved in requestqueue.
* All dir requests from before recovery are invalid now due to the dir
* rebuild and will be resent by the requesting nodes.
*/

dlm_purge_requestqueue(ls);

dlm_set_recover_status(ls, DLM_RS_DONE);
error = dlm_recover_done_wait(ls);
if (error) {
Expand Down
7 changes: 4 additions & 3 deletions trunk/fs/dlm/requestqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ int dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_header *hd)
int length = hd->h_length;
int rv = 0;

if (dlm_is_removed(ls, nodeid))
return 0;

e = kmalloc(sizeof(struct rq_entry) + length, GFP_KERNEL);
if (!e) {
log_print("dlm_add_requestqueue: out of memory\n");
Expand Down Expand Up @@ -133,6 +130,10 @@ static int purge_request(struct dlm_ls *ls, struct dlm_message *ms, int nodeid)
{
uint32_t type = ms->m_type;

/* the ls is being cleaned up and freed by release_lockspace */
if (!ls->ls_count)
return 1;

if (dlm_is_removed(ls, nodeid))
return 1;

Expand Down

0 comments on commit acf4436

Please sign in to comment.