public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Brassow <jbrassow@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: RHEL5 - clogd/dm-log-clustered: Use cleaner upstream solution for bug 479749 Date: Mon, 03 Aug 2009 20:43:00 -0000 [thread overview] Message-ID: <20090803204311.3DE34120196@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=119d922b917b504b6eefe531289550333eed1ebd Commit: 119d922b917b504b6eefe531289550333eed1ebd Parent: e21c93ed28d3e90d71302036e003b11251507197 Author: Jonathan Brassow <jbrassow@redhat.com> AuthorDate: Mon Aug 3 15:41:32 2009 -0500 Committer: Jonathan Brassow <jbrassow@redhat.com> CommitterDate: Mon Aug 3 15:41:32 2009 -0500 clogd/dm-log-clustered: Use cleaner upstream solution for bug 479749 There is no need to have a list or list spinlock in the kernel if we take the allocated ptr for the in-kernel log structure as the 'local unique id'. Also, if we use a 64-bit field, architecture porting is easier. --- cmirror-kernel/src/dm-clog-tfr.c | 6 +- cmirror-kernel/src/dm-clog-tfr.h | 6 +- cmirror-kernel/src/dm-clog.c | 34 ++++---------- cmirror/src/cluster.c | 24 +++++----- cmirror/src/cluster.h | 2 +- cmirror/src/functions.c | 94 ++++++++++++++++++------------------- cmirror/src/functions.h | 4 +- 7 files changed, 77 insertions(+), 93 deletions(-) diff --git a/cmirror-kernel/src/dm-clog-tfr.c b/cmirror-kernel/src/dm-clog-tfr.c index ddcf359..82bf9a8 100644 --- a/cmirror-kernel/src/dm-clog-tfr.c +++ b/cmirror-kernel/src/dm-clog-tfr.c @@ -147,7 +147,7 @@ static void cn_clog_callback(void *data) /* * dm_clog_consult_server * @uuid: log's uuid (must be DM_UUID_LEN in size) - * @uuid_instance: further identifier (if more than 1 log with same uuid) + * @luid: further identifier (if more than 1 log with same uuid) * @request_type: * @data: data to tx to the server * @data_size: size of data in bytes @@ -159,7 +159,7 @@ static void cn_clog_callback(void *data) * * Returns: 0 on success, -EXXX on failure */ -int dm_clog_consult_server(const char *uuid, uint32_t uuid_instance, +int dm_clog_consult_server(const char *uuid, uint64_t luid, int request_type, char *data, int data_size, char *rdata, int *rdata_size) @@ -190,7 +190,7 @@ resend: memset(tfr, 0, DM_CLOG_PREALLOCED_SIZE - overhead_size); memcpy(tfr->uuid, uuid, DM_UUID_LEN); - tfr->uuid_instance = uuid_instance; + tfr->luid = luid; tfr->seq = seq++; tfr->request_type = request_type; tfr->data_size = data_size; diff --git a/cmirror-kernel/src/dm-clog-tfr.h b/cmirror-kernel/src/dm-clog-tfr.h index 802db8b..b41426a 100644 --- a/cmirror-kernel/src/dm-clog-tfr.h +++ b/cmirror-kernel/src/dm-clog-tfr.h @@ -52,8 +52,8 @@ struct clog_tfr { uint64_t private[2]; char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */ - char uuid_padding[3]; /* DM_UUID_LEN == 129 */ - uint32_t uuid_instance; /* Allows more than one instance w/ same uuid */ + char uuid_padding[7]; /* DM_UUID_LEN == 129 */ + uint64_t luid; /* Allows more than one instance w/ same uuid */ int32_t error; /* Used by server to inform of errors */ uint32_t originator; /* Cluster ID of this machine */ @@ -69,7 +69,7 @@ struct clog_tfr { int dm_clog_tfr_init(void); void dm_clog_tfr_exit(void); -int dm_clog_consult_server(const char *uuid, uint32_t uuid_instance, +int dm_clog_consult_server(const char *uuid, uint64_t luid, int request_type, char *data, int data_size, char *rdata, int *rdata_size); diff --git a/cmirror-kernel/src/dm-clog.c b/cmirror-kernel/src/dm-clog.c index 17e7486..44e2ee8 100644 --- a/cmirror-kernel/src/dm-clog.c +++ b/cmirror-kernel/src/dm-clog.c @@ -24,7 +24,7 @@ struct log_c { uint32_t region_size; region_t region_count; char uuid[DM_UUID_LEN]; - uint32_t uuid_instance; + uint32_t luid; char *ctr_str; /* Gives ability to restart if userspace dies */ uint32_t ctr_size; @@ -44,8 +44,6 @@ struct log_c { struct dm_dev *disk_log; }; -static struct list_head log_list_head; -static spinlock_t log_list_lock; static mempool_t *flush_entry_pool = NULL; static void *flush_entry_alloc(gfp_t gfp_mask, void *pool_data) @@ -69,7 +67,7 @@ int cluster_do_request(struct log_c *lc, const char *uuid, int request_type, * restored. */ retry: - r = dm_clog_consult_server(uuid, lc->uuid_instance, request_type, data, + r = dm_clog_consult_server(uuid, lc->luid, request_type, data, data_size, rdata, rdata_size); if (r != -ESRCH) @@ -80,14 +78,14 @@ retry: set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(2*HZ); DMWARN("Attempting to contact cluster log server..."); - r = dm_clog_consult_server(uuid, lc->uuid_instance, + r = dm_clog_consult_server(uuid, lc->luid, DM_CLOG_CTR, lc->ctr_str, lc->ctr_size, NULL, NULL); if (!r) break; } DMINFO("Reconnected to cluster log server... CTR complete"); - r = dm_clog_consult_server(uuid, lc->uuid_instance, + r = dm_clog_consult_server(uuid, lc->luid, DM_CLOG_RESUME, NULL, 0, NULL, NULL); if (!r) @@ -136,15 +134,7 @@ static int cluster_ctr(struct dm_dirty_log *log, struct dm_target *ti, spin_lock_init(&lc->flush_lock); INIT_LIST_HEAD(&lc->flush_list); - lc->uuid_instance = 1; - spin_lock(&log_list_lock); - list_for_each_entry(tmp, &log_list_head, list) - if (!strncmp(tmp->uuid, lc->uuid, DM_UUID_LEN) && - (tmp->uuid_instance >= lc->uuid_instance)) - lc->uuid_instance = tmp->uuid_instance + 1; - list_add(&lc->list, &log_list_head); - spin_unlock(&log_list_lock); - + lc->luid = (uint64_t)lc; for (i = 0, str_size = 0; i < argc; i++) str_size += strlen(argv[i]) + 1; /* +1 for space between args */ @@ -162,7 +152,7 @@ static int cluster_ctr(struct dm_dirty_log *log, struct dm_target *ti, str_size += sprintf(ctr_str + str_size, "%llu", ti->len); /* Send table string */ - r = dm_clog_consult_server(lc->uuid, lc->uuid_instance, DM_CLOG_CTR, + r = dm_clog_consult_server(lc->uuid, lc->luid, DM_CLOG_CTR, ctr_str, str_size, NULL, NULL); if (r == -ESRCH) @@ -258,15 +248,11 @@ static void cluster_dtr(struct dm_dirty_log *log) int r; struct log_c *lc = (struct log_c *)log->context; - r = dm_clog_consult_server(lc->uuid, lc->uuid_instance, DM_CLOG_DTR, + r = dm_clog_consult_server(lc->uuid, lc->luid, DM_CLOG_DTR, NULL, 0, NULL, NULL); /* FIXME: What do we do on failure? */ - - spin_lock(&log_list_lock); - list_del(&lc->list); - spin_unlock(&log_list_lock); if (lc->disk_log) dm_put_device(lc->ti, lc->disk_log); kfree(lc->ctr_str); @@ -284,7 +270,7 @@ static int cluster_presuspend(struct dm_dirty_log *log) int r; struct log_c *lc = (struct log_c *)log->context; - r = dm_clog_consult_server(lc->uuid, lc->uuid_instance, + r = dm_clog_consult_server(lc->uuid, lc->luid, DM_CLOG_PRESUSPEND, NULL, 0, NULL, NULL); @@ -301,7 +287,7 @@ static int cluster_postsuspend(struct dm_dirty_log *log) int r; struct log_c *lc = (struct log_c *)log->context; - r = dm_clog_consult_server(lc->uuid, lc->uuid_instance, + r = dm_clog_consult_server(lc->uuid, lc->luid, DM_CLOG_POSTSUSPEND, NULL, 0, NULL, NULL); @@ -319,7 +305,7 @@ static int cluster_resume(struct dm_dirty_log *log) struct log_c *lc = (struct log_c *)log->context; lc->in_sync_hint = 0; - r = dm_clog_consult_server(lc->uuid, lc->uuid_instance, DM_CLOG_RESUME, + r = dm_clog_consult_server(lc->uuid, lc->luid, DM_CLOG_RESUME, NULL, 0, NULL, NULL); diff --git a/cmirror/src/cluster.c b/cmirror/src/cluster.c index 1ecef33..70acbbd 100644 --- a/cmirror/src/cluster.c +++ b/cmirror/src/cluster.c @@ -82,7 +82,7 @@ static int log_resp_rec = 0; struct checkpoint_data { uint32_t requester; char uuid[CPG_MAX_NAME_LENGTH]; - uint32_t uuid_instance; + uint64_t luid; int bitmap_size; /* in bytes */ char *sync_bits; @@ -102,7 +102,7 @@ struct clog_cpg { uint32_t lowest_id; cpg_handle_t handle; struct cpg_name name; - uint32_t uuid_instance; + uint64_t luid; /* Are we the first, or have we received checkpoint? */ int state; @@ -147,10 +147,10 @@ int cluster_send(struct clog_tfr *tfr) } /* - * uuid_instance is only valid per machine, it looses its meaning + * luid is only valid per machine, it looses its meaning * when sent to the cluster. */ - tfr->uuid_instance = 0; + tfr->luid = 0; iov.iov_base = tfr; iov.iov_len = sizeof(struct clog_tfr) + tfr->data_size; @@ -357,9 +357,9 @@ static struct checkpoint_data *prepare_checkpoint(struct clog_cpg *entry, memset(new, 0, sizeof(*new)); new->requester = cp_requester; strncpy(new->uuid, entry->name.value, entry->name.length); - new->uuid_instance = entry->uuid_instance; + new->luid = entry->luid; - new->bitmap_size = push_state(entry->name.value, entry->uuid_instance, + new->bitmap_size = push_state(entry->name.value, entry->luid, "clean_bits", &new->clean_bits, cp_requester); if (new->bitmap_size <= 0) { @@ -369,7 +369,7 @@ static struct checkpoint_data *prepare_checkpoint(struct clog_cpg *entry, return NULL; } - new->bitmap_size = push_state(entry->name.value, entry->uuid_instance, + new->bitmap_size = push_state(entry->name.value, entry->luid, "sync_bits", &new->sync_bits, cp_requester); if (new->bitmap_size <= 0) { LOG_ERROR("Failed to store sync_bits to checkpoint for node %u", @@ -379,7 +379,7 @@ static struct checkpoint_data *prepare_checkpoint(struct clog_cpg *entry, return NULL; } - r = push_state(entry->name.value, entry->uuid_instance, + r = push_state(entry->name.value, entry->luid, "recovering_region", &new->recovering_region, cp_requester); if (r <= 0) { @@ -708,7 +708,7 @@ init_retry: } if (iov.readSize) { - if (pull_state(entry->name.value, entry->uuid_instance, + if (pull_state(entry->name.value, entry->luid, (char *)desc.sectionId.id, bitmap, iov.readSize)) { LOG_ERROR("Error loading state"); @@ -1241,7 +1241,7 @@ static void cpg_leave_callback(struct clog_cpg *match, cpg_fd_get(match->handle, &fd); links_unregister(fd); - cluster_postsuspend(match->name.value, match->uuid_instance); + cluster_postsuspend(match->name.value, match->luid); list_for_each_safe(p, n, &match->working_list) { list_del_init(p); @@ -1446,7 +1446,7 @@ unlink_retry: return 1; } -int create_cluster_cpg(char *uuid, uint32_t uuid_instance) +int create_cluster_cpg(char *uuid, uint64_t luid) { int r; int size; @@ -1474,7 +1474,7 @@ int create_cluster_cpg(char *uuid, uint32_t uuid_instance) CPG_MAX_NAME_LENGTH : (strlen(uuid) + 1); strncpy(new->name.value, uuid, size); new->name.length = size; - new->uuid_instance = uuid_instance; + new->luid = luid; /* * Ensure there are no stale checkpoints around before we join diff --git a/cmirror/src/cluster.h b/cmirror/src/cluster.h index 176024b..891ce72 100644 --- a/cmirror/src/cluster.h +++ b/cmirror/src/cluster.h @@ -5,7 +5,7 @@ int init_cluster(void); void cleanup_cluster(void); void cluster_debug(void); -int create_cluster_cpg(char *uuid, uint32_t uuid_instance); +int create_cluster_cpg(char *uuid, uint64_t luid); int destroy_cluster_cpg(char *str); int cluster_send(struct clog_tfr *tfr); diff --git a/cmirror/src/functions.c b/cmirror/src/functions.c index f7270a6..44c208b 100644 --- a/cmirror/src/functions.c +++ b/cmirror/src/functions.c @@ -49,7 +49,7 @@ struct log_c { struct list_head list; char uuid[DM_UUID_LEN]; - uint32_t uuid_instance; + uint64_t luid; time_t delay; /* limits how fast a resume can happen after suspend */ int touched; @@ -148,7 +148,7 @@ static uint64_t count_bits32(uint32_t *addr, uint32_t count) * * Returns: log if found, NULL otherwise */ -static struct log_c *get_log(const char *uuid, uint32_t uuid_instance) +static struct log_c *get_log(const char *uuid, uint64_t luid) { struct list_head *l; struct log_c *lc; @@ -157,8 +157,7 @@ static struct log_c *get_log(const char *uuid, uint32_t uuid_instance) __list_for_each(l, &log_list) { lc = list_entry(l, struct log_c, list); if (!strcmp(lc->uuid, uuid) && - (!uuid_instance || - (lc->uuid_instance == uuid_instance))) + (!luid || (lc->luid == luid))) return lc; } @@ -174,7 +173,7 @@ static struct log_c *get_log(const char *uuid, uint32_t uuid_instance) * * Returns: log if found, NULL otherwise */ -static struct log_c *get_pending_log(const char *uuid, uint32_t uuid_instance) +static struct log_c *get_pending_log(const char *uuid, uint64_t luid) { struct list_head *l; struct log_c *lc; @@ -183,8 +182,7 @@ static struct log_c *get_pending_log(const char *uuid, uint32_t uuid_instance) __list_for_each(l, &log_pending_list) { lc = list_entry(l, struct log_c, list); if (!strcmp(lc->uuid, uuid) && - (!uuid_instance || - (lc->uuid_instance == uuid_instance))) + (!luid || (lc->luid == luid))) return lc; } @@ -350,7 +348,7 @@ static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_pat return r ? -errno : 0; } -static int _clog_ctr(int argc, char **argv, uint32_t uuid_instance, +static int _clog_ctr(int argc, char **argv, uint64_t luid, uint64_t device_size) { int i; @@ -441,20 +439,20 @@ static int _clog_ctr(int argc, char **argv, uint32_t uuid_instance, lc->disk_fd = -1; lc->log_dev_failed = 0; strncpy(lc->uuid, argv[1 + disk_log], DM_UUID_LEN); - lc->uuid_instance = uuid_instance; + lc->luid = luid; - if ((dup = get_log(lc->uuid, lc->uuid_instance))) { - LOG_ERROR("Duplicate log UUID and uuid_instance!"); + if ((dup = get_log(lc->uuid, lc->luid))) { + LOG_ERROR("Duplicate log UUID and luid!"); LOG_ERROR("UUID: %s", lc->uuid); - LOG_ERROR("uuid_instance: %u", lc->uuid_instance); + LOG_ERROR("luid: %u", lc->luid); free(lc); return -EINVAL; } - if ((dup = get_pending_log(lc->uuid, lc->uuid_instance))) { - LOG_ERROR("Duplicate pending log UUID and uuid_instance!"); + if ((dup = get_pending_log(lc->uuid, lc->luid))) { + LOG_ERROR("Duplicate pending log UUID and luid!"); LOG_ERROR("UUID: %s", lc->uuid); - LOG_ERROR("uuid_instance: %u", lc->uuid_instance); + LOG_ERROR("luid: %u", lc->luid); free(lc); return -EINVAL; } @@ -583,7 +581,7 @@ static int clog_ctr(struct clog_tfr *tfr) } argc--; /* We pass in the device_size separate */ - r = _clog_ctr(argc, argv, tfr->uuid_instance, device_size); + r = _clog_ctr(argc, argv, tfr->luid, device_size); /* We join the CPG when we resume */ @@ -608,7 +606,7 @@ static int clog_ctr(struct clog_tfr *tfr) */ static int clog_dtr(struct clog_tfr *tfr) { - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (lc) { /* @@ -618,7 +616,7 @@ static int clog_dtr(struct clog_tfr *tfr) LOG_ERROR("[%s] DTR before SUS: leaving CPG", SHORT_UUID(tfr->uuid)); destroy_cluster_cpg(tfr->uuid); - } else if (!(lc = get_pending_log(tfr->uuid, tfr->uuid_instance))) { + } else if (!(lc = get_pending_log(tfr->uuid, tfr->luid))) { LOG_ERROR("clog_dtr called on log that is not official or pending"); return -EINVAL; } @@ -644,7 +642,7 @@ static int clog_dtr(struct clog_tfr *tfr) */ static int clog_presuspend(struct clog_tfr *tfr) { - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -664,7 +662,7 @@ static int clog_presuspend(struct clog_tfr *tfr) */ static int clog_postsuspend(struct clog_tfr *tfr) { - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -685,9 +683,9 @@ static int clog_postsuspend(struct clog_tfr *tfr) * @tfr * */ -int cluster_postsuspend(char *uuid, uint32_t uuid_instance) +int cluster_postsuspend(char *uuid, uint64_t luid) { - struct log_c *lc = get_log(uuid, uuid_instance); + struct log_c *lc = get_log(uuid, luid); if (!lc) return -EINVAL; @@ -712,7 +710,7 @@ static int clog_resume(struct clog_tfr *tfr) { uint32_t i; int commit_log = 0; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); size_t size = lc->bitset_uint32_count * sizeof(uint32_t); if (!lc) @@ -838,11 +836,11 @@ int local_resume(struct clog_tfr *tfr) { int r; time_t t; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) { /* Is the log in the pending list? */ - lc = get_pending_log(tfr->uuid, tfr->uuid_instance); + lc = get_pending_log(tfr->uuid, tfr->luid); if (!lc) { LOG_ERROR("clog_resume called on log that is not official or pending"); return -EINVAL; @@ -877,19 +875,19 @@ int local_resume(struct clog_tfr *tfr) sleep(3 - t); /* Join the CPG */ - r = create_cluster_cpg(tfr->uuid, tfr->uuid_instance); + r = create_cluster_cpg(tfr->uuid, tfr->luid); if (r) { LOG_ERROR("clog_resume: Failed to create cluster CPG"); return r; } - if (get_log(lc->uuid, lc->uuid_instance)) { + if (get_log(lc->uuid, lc->luid)) { /* * Not being able to identify a log uniquely is fatal, * and represents a programming error. */ LOG_ERROR("[%s/%u] DUPLICATE LOG WITH SAME UUID[_INSTANCE]!", - SHORT_UUID(lc->uuid), lc->uuid_instance); + SHORT_UUID(lc->uuid), lc->luid); exit(EXIT_FAILURE); } @@ -914,7 +912,7 @@ int local_resume(struct clog_tfr *tfr) static int clog_get_region_size(struct clog_tfr *tfr) { uint64_t *rtn = (uint64_t *)tfr->data; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); LOG_PRINT("WARNING: kernel should not be calling clog_get_region_size"); if (!lc) @@ -937,7 +935,7 @@ static int clog_is_clean(struct clog_tfr *tfr) { int *rtn = (int *)tfr->data; uint64_t region = *((uint64_t *)(tfr->data)); - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -962,7 +960,7 @@ static int clog_in_sync(struct clog_tfr *tfr) { int *rtn = (int *)tfr->data; uint64_t region = *((uint64_t *)(tfr->data)); - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -991,7 +989,7 @@ static int clog_in_sync(struct clog_tfr *tfr) static int clog_flush(struct clog_tfr *tfr, int server) { int r = 0; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1079,7 +1077,7 @@ static int clog_mark_region(struct clog_tfr *tfr) int r; int count; uint64_t *region; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1146,7 +1144,7 @@ static int clog_clear_region(struct clog_tfr *tfr) int r; int count; uint64_t *region; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1182,7 +1180,7 @@ static int clog_get_resync_work(struct clog_tfr *tfr) uint32_t arch_padding; uint64_t r; } *pkg = (void *)tfr->data; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1276,7 +1274,7 @@ static int clog_set_region_sync(struct clog_tfr *tfr) uint32_t arch_padding; int32_t in_sync; } *pkg = (void *)tfr->data; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1355,7 +1353,7 @@ static int clog_set_region_sync(struct clog_tfr *tfr) static int clog_get_sync_count(struct clog_tfr *tfr) { uint64_t *sync_count = (uint64_t *)tfr->data; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); /* * FIXME: Mirror requires us to be able to ask for @@ -1364,7 +1362,7 @@ static int clog_get_sync_count(struct clog_tfr *tfr) * the stored value may not be accurate. */ if (!lc) - lc = get_pending_log(tfr->uuid, tfr->uuid_instance); + lc = get_pending_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1423,10 +1421,10 @@ static int disk_status_info(struct log_c *lc, struct clog_tfr *tfr) static int clog_status_info(struct clog_tfr *tfr) { int r; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) - lc = get_pending_log(tfr->uuid, tfr->uuid_instance); + lc = get_pending_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1482,10 +1480,10 @@ static int disk_status_table(struct log_c *lc, struct clog_tfr *tfr) static int clog_status_table(struct clog_tfr *tfr) { int r; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) - lc = get_pending_log(tfr->uuid, tfr->uuid_instance); + lc = get_pending_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1511,7 +1509,7 @@ static int clog_is_remote_recovering(struct clog_tfr *tfr) uint32_t arch_padding; uint64_t in_sync_hint; } *pkg = (void *)tfr->data; - struct log_c *lc = get_log(tfr->uuid, tfr->uuid_instance); + struct log_c *lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; @@ -1692,7 +1690,7 @@ static void print_bits(char *buf, int size, int print) } /* int store_bits(const char *uuid, const char *which, char **buf)*/ -int push_state(const char *uuid, uint32_t uuid_instance, const char *which, +int push_state(const char *uuid, uint64_t luid, const char *which, char **buf, uint32_t debug_who) { int bitset_size; @@ -1701,7 +1699,7 @@ int push_state(const char *uuid, uint32_t uuid_instance, const char *which, if (*buf) LOG_ERROR("store_bits: *buf != NULL"); - lc = get_log(uuid, uuid_instance); + lc = get_log(uuid, luid); if (!lc) { LOG_ERROR("store_bits: No log found for %s", uuid); return -EINVAL; @@ -1747,7 +1745,7 @@ int push_state(const char *uuid, uint32_t uuid_instance, const char *which, } /*int load_bits(const char *uuid, const char *which, char *buf, int size)*/ -int pull_state(const char *uuid, uint32_t uuid_instance, +int pull_state(const char *uuid, uint64_t luid, const char *which, char *buf, int size) { int bitset_size; @@ -1756,7 +1754,7 @@ int pull_state(const char *uuid, uint32_t uuid_instance, if (!buf) LOG_ERROR("pull_state: buf == NULL"); - lc = get_log(uuid, uuid_instance); + lc = get_log(uuid, luid); if (!lc) { LOG_ERROR("pull_state: No log found for %s", uuid); return -EINVAL; @@ -1800,7 +1798,7 @@ int log_get_state(struct clog_tfr *tfr) { struct log_c *lc; - lc = get_log(tfr->uuid, tfr->uuid_instance); + lc = get_log(tfr->uuid, tfr->luid); if (!lc) return -EINVAL; diff --git a/cmirror/src/functions.h b/cmirror/src/functions.h index 63ed49a..55b41bb 100644 --- a/cmirror/src/functions.h +++ b/cmirror/src/functions.h @@ -10,9 +10,9 @@ int local_resume(struct clog_tfr *tfr); int cluster_postsuspend(char *, uint32_t); int do_request(struct clog_tfr *tfr, int server); -int push_state(const char *uuid, uint32_t uuid_instance, +int push_state(const char *uuid, uint64_t luid, const char *which, char **buf, uint32_t debug_who); -int pull_state(const char *uuid, uint32_t uuid_instance, +int pull_state(const char *uuid, uint64_t luid, const char *which, char *buf, int size); int log_get_state(struct clog_tfr *tfr);
reply other threads:[~2009-08-03 20:43 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=20090803204311.3DE34120196@lists.fedorahosted.org \ --to=jbrassow@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).