diff options
author | Basavanagowda Kanur <gowda@gluster.com> | 2009-07-06 05:47:31 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-07-06 12:37:07 -0700 |
commit | d538b139fb197d7397e45b4bc5a9446823186568 (patch) | |
tree | b8f8ed1f62d39bc123d22b35bdc9a4588a13e5dd /xlators/cluster/unify | |
parent | bf70c1361f8eb82607f5fd9396edfad62ced7b89 (diff) |
cluster/unify - replace ZR_FILENAME_MAX by NAME_MAX
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators/cluster/unify')
-rw-r--r-- | xlators/cluster/unify/src/unify-self-heal.c | 20 | ||||
-rw-r--r-- | xlators/cluster/unify/src/unify.h | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/xlators/cluster/unify/src/unify-self-heal.c b/xlators/cluster/unify/src/unify-self-heal.c index 4e788fc7a1b..7c62495c2d9 100644 --- a/xlators/cluster/unify/src/unify-self-heal.c +++ b/xlators/cluster/unify/src/unify-self-heal.c @@ -539,9 +539,9 @@ unify_sh_checksum_cbk (call_frame_t *frame, if (op_ret >= 0) { if (NS(this) == (xlator_t *)cookie) { memcpy (local->sh_struct->ns_file_checksum, - file_checksum, ZR_FILENAME_MAX); + file_checksum, NAME_MAX); memcpy (local->sh_struct->ns_dir_checksum, - dir_checksum, ZR_FILENAME_MAX); + dir_checksum, NAME_MAX); } else { if (local->entry_count == 0) { /* Initialize the dir_checksum to be @@ -552,12 +552,12 @@ unify_sh_checksum_cbk (call_frame_t *frame, /* Using 'entry_count' as a flag */ local->entry_count = 1; memcpy (local->sh_struct->dir_checksum, - dir_checksum, ZR_FILENAME_MAX); + dir_checksum, NAME_MAX); } /* Reply from the storage nodes */ for (index = 0; - index < ZR_FILENAME_MAX; index++) { + index < NAME_MAX; index++) { /* Files should be present in only one node */ local->sh_struct->file_checksum[index] ^= file_checksum[index]; @@ -573,7 +573,7 @@ unify_sh_checksum_cbk (call_frame_t *frame, UNLOCK (&frame->lock); if (!callcnt) { - for (index = 0; index < ZR_FILENAME_MAX ; index++) { + for (index = 0; index < NAME_MAX ; index++) { if (local->sh_struct->file_checksum[index] != local->sh_struct->ns_file_checksum[index]) { local->failed = 1; @@ -1038,9 +1038,9 @@ unify_bgsh_checksum_cbk (call_frame_t *frame, if (op_ret >= 0) { if (NS(this) == (xlator_t *)cookie) { memcpy (local->sh_struct->ns_file_checksum, - file_checksum, ZR_FILENAME_MAX); + file_checksum, NAME_MAX); memcpy (local->sh_struct->ns_dir_checksum, - dir_checksum, ZR_FILENAME_MAX); + dir_checksum, NAME_MAX); } else { if (local->entry_count == 0) { /* Initialize the dir_checksum to be @@ -1051,12 +1051,12 @@ unify_bgsh_checksum_cbk (call_frame_t *frame, /* Using 'entry_count' as a flag */ local->entry_count = 1; memcpy (local->sh_struct->dir_checksum, - dir_checksum, ZR_FILENAME_MAX); + dir_checksum, NAME_MAX); } /* Reply from the storage nodes */ for (index = 0; - index < ZR_FILENAME_MAX; index++) { + index < NAME_MAX; index++) { /* Files should be present in only one node */ local->sh_struct->file_checksum[index] ^= file_checksum[index]; @@ -1072,7 +1072,7 @@ unify_bgsh_checksum_cbk (call_frame_t *frame, UNLOCK (&frame->lock); if (!callcnt) { - for (index = 0; index < ZR_FILENAME_MAX ; index++) { + for (index = 0; index < NAME_MAX ; index++) { if (local->sh_struct->file_checksum[index] != local->sh_struct->ns_file_checksum[index]) { local->failed = 1; diff --git a/xlators/cluster/unify/src/unify.h b/xlators/cluster/unify/src/unify.h index 965436db58e..9841e5c7a95 100644 --- a/xlators/cluster/unify/src/unify.h +++ b/xlators/cluster/unify/src/unify.h @@ -73,10 +73,10 @@ struct unify_private { typedef struct unify_private unify_private_t; struct unify_self_heal_struct { - uint8_t dir_checksum[ZR_FILENAME_MAX]; - uint8_t ns_dir_checksum[ZR_FILENAME_MAX]; - uint8_t file_checksum[ZR_FILENAME_MAX]; - uint8_t ns_file_checksum[ZR_FILENAME_MAX]; + uint8_t dir_checksum[NAME_MAX]; + uint8_t ns_dir_checksum[NAME_MAX]; + uint8_t file_checksum[NAME_MAX]; + uint8_t ns_file_checksum[NAME_MAX]; off_t *offset_list; int *count_list; dir_entry_t **entry_list; |