~ubuntu-branches/ubuntu/saucy/glusterfs/saucy

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Louis Zuckerman
  • Date: 2012-01-28 15:32:55 UTC
  • Revision ID: package-import@ubuntu.com-20120128153255-9hy06lmlw8ev6ttr
Added Ubuntu upstart jobs providing support for local glusterfs mounts
(LP: #876648)

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
{
55
55
        afr_local_t     *local = NULL;
56
56
        afr_self_heal_t *sh = NULL;
 
57
        afr_private_t   *priv = NULL;
 
58
        int              i = 0;
57
59
 
58
60
        local = frame->local;
59
61
        sh = &local->self_heal;
60
 
 
61
 
        afr_sh_reset (frame, this);
 
62
        priv = this->private;
 
63
 
 
64
//      memset (sh->child_errno, 0, sizeof (int) * priv->child_count);
 
65
        memset (sh->buf, 0, sizeof (struct iatt) * priv->child_count);
 
66
        memset (sh->success, 0, sizeof (int) * priv->child_count);
 
67
 
 
68
/*         for (i = 0; i < priv->child_count; i++) { */
 
69
/*                 sh->locked_nodes[i] = 1; */
 
70
/*         } */
 
71
 
 
72
        for (i = 0; i < priv->child_count; i++) {
 
73
                if (sh->xattr[i])
 
74
                        dict_unref (sh->xattr[i]);
 
75
                sh->xattr[i] = NULL;
 
76
        }
62
77
 
63
78
        if (local->govinda_gOvinda) {
64
79
                gf_log (this->name, GF_LOG_INFO,
465
480
        nsources = afr_build_sources (this, sh->xattr, sh->buf,
466
481
                                      sh->pending_matrix, sh->sources,
467
482
                                      sh->child_success,
468
 
                                      AFR_METADATA_TRANSACTION, NULL, _gf_false);
 
483
                                      AFR_METADATA_TRANSACTION, NULL);
469
484
        if (nsources == 0) {
470
485
                gf_log (this->name, GF_LOG_TRACE,
471
486
                        "No self-heal needed for %s",