~ubuntu-branches/ubuntu/trusty/glusterfs/trusty

« back to all changes in this revision

Viewing changes to xlators/cluster/unify/src/unify-self-heal.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2010-02-09 18:53:10 UTC
  • mfrom: (1.2.4 upstream) (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100209185310-ww8p82lsbosorg2u
* New upstream release.
* Uploading to unstable.
* Bump Standards-Version to 3.8.4 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
                        unify_local_wipe (local);
179
179
                        
180
180
                        STACK_UNWIND (frame, local->op_ret, local->op_errno, 
181
 
                                      inode, &local->stbuf, local->dict);
 
181
                                      inode, &local->stbuf, local->dict,
 
182
                                      &local->oldpostparent);
182
183
                        if (tmp_dict)
183
184
                                dict_unref (tmp_dict);
184
185
                }
501
502
 
502
503
                /* This is lookup_cbk ()'s UNWIND. */
503
504
                STACK_UNWIND (frame, local->op_ret, local->op_errno, inode,
504
 
                              &local->stbuf, local->dict);
 
505
                              &local->stbuf, local->dict, &local->oldpostparent);
505
506
                if (tmp_dict)
506
507
                        dict_unref (tmp_dict);
507
508
        }
539
540
                if (op_ret >= 0) {
540
541
                        if (NS(this) == (xlator_t *)cookie) {
541
542
                                memcpy (local->sh_struct->ns_file_checksum, 
542
 
                                        file_checksum, ZR_FILENAME_MAX);
 
543
                                        file_checksum, NAME_MAX);
543
544
                                memcpy (local->sh_struct->ns_dir_checksum, 
544
 
                                        dir_checksum, ZR_FILENAME_MAX);
 
545
                                        dir_checksum, NAME_MAX);
545
546
                        } else {
546
547
                                if (local->entry_count == 0) {
547
548
                                        /* Initialize the dir_checksum to be 
552
553
                                        /* Using 'entry_count' as a flag */
553
554
                                        local->entry_count = 1;
554
555
                                        memcpy (local->sh_struct->dir_checksum,
555
 
                                                dir_checksum, ZR_FILENAME_MAX);
 
556
                                                dir_checksum, NAME_MAX);
556
557
                                }
557
558
 
558
559
                                /* Reply from the storage nodes */
559
560
                                for (index = 0; 
560
 
                                     index < ZR_FILENAME_MAX; index++) {
 
561
                                     index < NAME_MAX; index++) {
561
562
                                        /* Files should be present in
562
563
                                           only one node */
563
564
                                        local->sh_struct->file_checksum[index] ^= file_checksum[index];
573
574
        UNLOCK (&frame->lock);
574
575
 
575
576
        if (!callcnt) {
576
 
                for (index = 0; index < ZR_FILENAME_MAX ; index++) {
 
577
                for (index = 0; index < NAME_MAX ; index++) {
577
578
                        if (local->sh_struct->file_checksum[index] != 
578
579
                            local->sh_struct->ns_file_checksum[index]) {
579
580
                                local->failed = 1;
628
629
                              local->op_errno,
629
630
                              inode,
630
631
                              &local->stbuf,
631
 
                              local->dict);
 
632
                              local->dict, &local->oldpostparent);
632
633
                if (tmp_dict)
633
634
                        dict_unref (tmp_dict);
634
635
        }
1038
1039
                if (op_ret >= 0) {
1039
1040
                        if (NS(this) == (xlator_t *)cookie) {
1040
1041
                                memcpy (local->sh_struct->ns_file_checksum, 
1041
 
                                        file_checksum, ZR_FILENAME_MAX);
 
1042
                                        file_checksum, NAME_MAX);
1042
1043
                                memcpy (local->sh_struct->ns_dir_checksum, 
1043
 
                                        dir_checksum, ZR_FILENAME_MAX);
 
1044
                                        dir_checksum, NAME_MAX);
1044
1045
                        } else {
1045
1046
                                if (local->entry_count == 0) {
1046
1047
                                        /* Initialize the dir_checksum to be 
1051
1052
                                        /* Using 'entry_count' as a flag */
1052
1053
                                        local->entry_count = 1; 
1053
1054
                                        memcpy (local->sh_struct->dir_checksum,
1054
 
                                                dir_checksum, ZR_FILENAME_MAX);
 
1055
                                                dir_checksum, NAME_MAX);
1055
1056
                                }
1056
1057
 
1057
1058
                                /* Reply from the storage nodes */
1058
1059
                                for (index = 0; 
1059
 
                                     index < ZR_FILENAME_MAX; index++) {
 
1060
                                     index < NAME_MAX; index++) {
1060
1061
                                        /* Files should be present in only 
1061
1062
                                           one node */
1062
1063
                                        local->sh_struct->file_checksum[index] ^= file_checksum[index];
1072
1073
        UNLOCK (&frame->lock);
1073
1074
 
1074
1075
        if (!callcnt) {
1075
 
                for (index = 0; index < ZR_FILENAME_MAX ; index++) {
 
1076
                for (index = 0; index < NAME_MAX ; index++) {
1076
1077
                        if (local->sh_struct->file_checksum[index] != 
1077
1078
                            local->sh_struct->ns_file_checksum[index]) {
1078
1079
                                local->failed = 1;
1215
1216
                      local->op_errno,
1216
1217
                      tmp_inode,
1217
1218
                      &local->stbuf,
1218
 
                      local->dict);
 
1219
                      local->dict,
 
1220
                      &local->oldpostparent);
1219
1221
 
1220
1222
        if (tmp_dict)
1221
1223
                dict_unref (tmp_dict);