Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84885
b: refs/heads/master
c: 4007685
h: refs/heads/master
i:
  84883: be1d4b1
v: v3
  • Loading branch information
Al Viro authored and David Teigland committed Feb 4, 2008
1 parent 43c600a commit 5b5a021
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 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: 93ff2971e99c90d1c4d39d242ef6050d2dc853d3
refs/heads/master: 4007685c6e6b5c92a07f27cd754bcca394168af2
2 changes: 1 addition & 1 deletion trunk/fs/dlm/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int dlm_recover_directory(struct dlm_ls *ls)
* pick namelen/name pairs out of received buffer
*/

b = ls->ls_recover_buf + sizeof(struct dlm_rcom);
b = ls->ls_recover_buf->rc_buf;

for (;;) {
memcpy(&namelen, b, sizeof(uint16_t));
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/dlm/dlm_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ struct dlm_ls {
struct rw_semaphore ls_recv_active; /* block dlm_recv */
struct list_head ls_requestqueue;/* queue remote requests */
struct mutex ls_requestqueue_mutex;
char *ls_recover_buf;
struct dlm_rcom *ls_recover_buf;
int ls_recover_nodeid; /* for debugging */
uint64_t ls_rcom_seq;
spinlock_t ls_rcom_spin;
Expand Down
11 changes: 6 additions & 5 deletions trunk/fs/dlm/rcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid)
ls->ls_recover_nodeid = nodeid;

if (nodeid == dlm_our_nodeid()) {
rc = (struct dlm_rcom *) ls->ls_recover_buf;
rc = ls->ls_recover_buf;
rc->rc_result = dlm_recover_status(ls);
goto out;
}
Expand All @@ -148,7 +148,7 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid)
if (error)
goto out;

rc = (struct dlm_rcom *) ls->ls_recover_buf;
rc = ls->ls_recover_buf;

if (rc->rc_result == -ESRCH) {
/* we pretend the remote lockspace exists with 0 status */
Expand Down Expand Up @@ -202,14 +202,15 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len)
{
struct dlm_rcom *rc;
struct dlm_mhandle *mh;
int error = 0, len = sizeof(struct dlm_rcom);
int error = 0;
int max_size = dlm_config.ci_buffer_size - sizeof(struct dlm_rcom);

ls->ls_recover_nodeid = nodeid;

if (nodeid == dlm_our_nodeid()) {
dlm_copy_master_names(ls, last_name, last_len,
ls->ls_recover_buf + len,
dlm_config.ci_buffer_size - len, nodeid);
ls->ls_recover_buf->rc_buf,
max_size, nodeid);
goto out;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/dlm/recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void dlm_set_recover_status(struct dlm_ls *ls, uint32_t status)

static int wait_status_all(struct dlm_ls *ls, uint32_t wait_status)
{
struct dlm_rcom *rc = (struct dlm_rcom *) ls->ls_recover_buf;
struct dlm_rcom *rc = ls->ls_recover_buf;
struct dlm_member *memb;
int error = 0, delay;

Expand Down Expand Up @@ -123,7 +123,7 @@ static int wait_status_all(struct dlm_ls *ls, uint32_t wait_status)

static int wait_status_low(struct dlm_ls *ls, uint32_t wait_status)
{
struct dlm_rcom *rc = (struct dlm_rcom *) ls->ls_recover_buf;
struct dlm_rcom *rc = ls->ls_recover_buf;
int error = 0, delay = 0, nodeid = ls->ls_low_nodeid;

for (;;) {
Expand Down

0 comments on commit 5b5a021

Please sign in to comment.