public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: David Teigland <teigland@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: dlm: master - dlm_controld: new libcpg api Date: Mon, 27 Apr 2009 20:37:00 -0000 [thread overview] Message-ID: <20090427203707.8E7821202D2@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=e379df9357d587e3f3636f52631a4b6c294b7a2e Commit: e379df9357d587e3f3636f52631a4b6c294b7a2e Parent: cd5c03dfeda29757f604c95d7d61c0127ac57a38 Author: David Teigland <teigland@redhat.com> AuthorDate: Mon Apr 27 15:30:22 2009 -0500 Committer: David Teigland <teigland@redhat.com> CommitterDate: Mon Apr 27 15:31:08 2009 -0500 dlm_controld: new libcpg api const and size_t Signed-off-by: David Teigland <teigland@redhat.com> --- group/dlm_controld/cpg.c | 47 +++++++++++++++++++++++++------------- group/dlm_controld/deadlock.c | 9 +++++-- group/dlm_controld/dlm_daemon.h | 10 +++++--- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c index 1231ec9..43b36fd 100644 --- a/group/dlm_controld/cpg.c +++ b/group/dlm_controld/cpg.c @@ -1175,9 +1175,12 @@ void process_lockspace_changes(void) } static int add_change(struct lockspace *ls, - struct cpg_address *member_list, int member_list_entries, - struct cpg_address *left_list, int left_list_entries, - struct cpg_address *joined_list, int joined_list_entries, + const struct cpg_address *member_list, + size_t member_list_entries, + const struct cpg_address *left_list, + size_t left_list_entries, + const struct cpg_address *joined_list, + size_t joined_list_entries, struct change **cg_out) { struct change *cg; @@ -1274,7 +1277,7 @@ static int add_change(struct lockspace *ls, return error; } -static int we_left(struct cpg_address *left_list, int left_list_entries) +static int we_left(const struct cpg_address *left_list, size_t left_list_entries) { int i; @@ -1285,10 +1288,14 @@ static int we_left(struct cpg_address *left_list, int left_list_entries) return 0; } -static void confchg_cb(cpg_handle_t handle, struct cpg_name *group_name, - struct cpg_address *member_list, int member_list_entries, - struct cpg_address *left_list, int left_list_entries, - struct cpg_address *joined_list, int joined_list_entries) +static void confchg_cb(cpg_handle_t handle, + const struct cpg_name *group_name, + const struct cpg_address *member_list, + size_t member_list_entries, + const struct cpg_address *left_list, + size_t left_list_entries, + const struct cpg_address *joined_list, + size_t joined_list_entries) { struct lockspace *ls; struct change *cg; @@ -1349,8 +1356,10 @@ static void dlm_header_in(struct dlm_header *hd) hd->msgdata = le32_to_cpu(hd->msgdata); } -static void deliver_cb(cpg_handle_t handle, struct cpg_name *group_name, - uint32_t nodeid, uint32_t pid, void *data, int len) +static void deliver_cb(cpg_handle_t handle, + const struct cpg_name *group_name, + uint32_t nodeid, uint32_t pid, + void *data, size_t len) { struct lockspace *ls; struct dlm_header *hd; @@ -1945,8 +1954,10 @@ int set_protocol(void) return 0; } -static void deliver_cb_daemon(cpg_handle_t handle, struct cpg_name *group_name, - uint32_t nodeid, uint32_t pid, void *data, int len) +static void deliver_cb_daemon(cpg_handle_t handle, + const struct cpg_name *group_name, + uint32_t nodeid, uint32_t pid, + void *data, size_t len) { struct dlm_header *hd; @@ -1967,10 +1978,14 @@ static void deliver_cb_daemon(cpg_handle_t handle, struct cpg_name *group_name, } } -static void confchg_cb_daemon(cpg_handle_t handle, struct cpg_name *group_name, - struct cpg_address *member_list, int member_list_entries, - struct cpg_address *left_list, int left_list_entries, - struct cpg_address *joined_list, int joined_list_entries) +static void confchg_cb_daemon(cpg_handle_t handle, + const struct cpg_name *group_name, + const struct cpg_address *member_list, + size_t member_list_entries, + const struct cpg_address *left_list, + size_t left_list_entries, + const struct cpg_address *joined_list, + size_t joined_list_entries) { int i; diff --git a/group/dlm_controld/deadlock.c b/group/dlm_controld/deadlock.c index 4d93420..4671c8c 100644 --- a/group/dlm_controld/deadlock.c +++ b/group/dlm_controld/deadlock.c @@ -1076,9 +1076,12 @@ static void node_left(struct lockspace *ls, int nodeid, int reason) static void purge_locks(struct lockspace *ls, int nodeid); void deadlk_confchg(struct lockspace *ls, - struct cpg_address *member_list, int member_list_entries, - struct cpg_address *left_list, int left_list_entries, - struct cpg_address *joined_list, int joined_list_entries) + const struct cpg_address *member_list, + size_t member_list_entries, + const struct cpg_address *left_list, + size_t left_list_entries, + const struct cpg_address *joined_list, + size_t joined_list_entries) { int i; diff --git a/group/dlm_controld/dlm_daemon.h b/group/dlm_controld/dlm_daemon.h index 03b07fe..5c64933 100644 --- a/group/dlm_controld/dlm_daemon.h +++ b/group/dlm_controld/dlm_daemon.h @@ -246,10 +246,12 @@ void receive_cycle_start(struct lockspace *ls, struct dlm_header *hd, int len); void receive_cycle_end(struct lockspace *ls, struct dlm_header *hd, int len); void receive_cancel_lock(struct lockspace *ls, struct dlm_header *hd, int len); void deadlk_confchg(struct lockspace *ls, - struct cpg_address *member_list, int member_list_entries, - struct cpg_address *left_list, int left_list_entries, - struct cpg_address *joined_list, int joined_list_entries); - + const struct cpg_address *member_list, + size_t member_list_entries, + const struct cpg_address *left_list, + size_t left_list_entries, + const struct cpg_address *joined_list, + size_t joined_list_entries); /* main.c */ int do_read(int fd, void *buf, size_t count);
reply other threads:[~2009-04-27 20:37 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090427203707.8E7821202D2@lists.fedorahosted.org \ --to=teigland@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).