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

« back to all changes in this revision

Viewing changes to xlators/cluster/afr/src/afr-open.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2010-07-13 18:40:26 UTC
  • mfrom: (1.2.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100713184026-e09vy2wvcxyb2pgm
Tags: 3.0.5-1
* New upstream release.
* Merge 3.0.4-1~bpo50+1 changelog.
* Bump Standards-Version to 3.9.0 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
 
322
322
        local->call_count = call_count;
323
323
 
 
324
        if (!local->loc.path) {
 
325
                abandon = 1;
 
326
                goto out;
 
327
        }
 
328
 
324
329
        for (i = 0; i < priv->child_count; i++) {
325
330
                if (!fd_ctx->opened_on[i] && local->child_up[i]) {
326
331
                        gf_log (this->name, GF_LOG_TRACE,
354
359
        afr_local_t *local  = NULL;
355
360
        afr_self_heal_t *sh = NULL;
356
361
 
 
362
        int ret = -1;
 
363
 
357
364
        priv  = this->private;
358
365
        local = frame->local;
359
366
        sh    = &local->self_heal;
360
367
 
361
 
        inode_path (local->fd->inode, NULL, (char **)&local->loc.path);
 
368
        ret = inode_path (local->fd->inode, NULL, (char **)&local->loc.path);
 
369
        if (ret < 0) {
 
370
                gf_log (this->name, GF_LOG_TRACE,
 
371
                        "Inode path failed. Possible open-unlink-write detected");
 
372
                afr_up_down_flush_sh_unwind (frame, this);
 
373
 
 
374
                return 0;
 
375
        }
362
376
        local->loc.name   = strrchr (local->loc.path, '/');
363
377
        local->loc.inode  = inode_ref (local->fd->inode);
364
378
        local->loc.parent = inode_parent (local->fd->inode, 0, NULL);