~ubuntu-branches/ubuntu/wily/glusterfs/wily

« back to all changes in this revision

Viewing changes to xlators/cluster/dht/src/dht-helper.c

  • Committer: Clint Byrum
  • Date: 2012-11-07 17:45:49 UTC
  • mfrom: (20.1.7 sid)
  • Revision ID: clint@ubuntu.com-20121107174549-x6atqx0rsd7ht0q5
Tags: 3.2.7-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  - Added Ubuntu upstart jobs providing support for local glusterfs mounts
* Add upstream patch 03-glusterd-crash-gcc-optimizations, which fixes a crash
  of glusterd on submitting a command like create/delete volume to it. This
  happens with GCC 4.7 and -O2, where GCC optimizes out rsp statements.
  Closes: #679767
* New upstream release.
* New upstream pre release.
* Updated debian packaging copyright file
  - Fixed upstream project URLs and information
* Correct e-mail address from Matthias.
* New upstream pre release.
  - Refresh hunky patch 02-spelling-error.
* New upstream release.
  - Drop merged patch 03-hardened-gf-log.
  - Refresh hunky patch 02-spelling-error.
* Wrap all debian/control fields.
* Remove unused lintian overrides.
* Bump Standards-Version to 3.9.3 (no changes needed).
* Override lintian warnings about shlibs-calls-exit.
* Fix lintian warning vim-addon-within-vim-runtime-path by installing
  glusterfs.vim as example file now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
428
428
                        (a) = (b);              \
429
429
        } while (0)
430
430
 
 
431
 
 
432
#define set_if_greater_time(a, an, b, bn) do {                          \
 
433
                if (((a) < (b)) || (((a) == (b)) && ((an) < (bn)))){    \
 
434
                        (a) = (b);                                      \
 
435
                        (an) = (bn);                                    \
 
436
                }                                                       \
 
437
        } while (0)                                                     \
 
438
 
 
439
 
431
440
int
432
441
dht_iatt_merge (xlator_t *this, struct iatt *to,
433
442
                struct iatt *from, xlator_t *subvol)
452
461
        set_if_greater (to->ia_uid, from->ia_uid);
453
462
        set_if_greater (to->ia_gid, from->ia_gid);
454
463
 
455
 
        set_if_greater (to->ia_atime, from->ia_atime);
456
 
        set_if_greater (to->ia_mtime, from->ia_mtime);
457
 
        set_if_greater (to->ia_ctime, from->ia_ctime);
 
464
        set_if_greater_time(to->ia_atime, to->ia_atime_nsec,
 
465
                            from->ia_atime, from->ia_atime_nsec);
 
466
        set_if_greater_time (to->ia_mtime, to->ia_mtime_nsec,
 
467
                             from->ia_mtime, from->ia_mtime_nsec);
 
468
        set_if_greater_time (to->ia_ctime, to->ia_ctime_nsec,
 
469
                             from->ia_ctime, from->ia_ctime_nsec);
458
470
 
459
471
        return 0;
460
472
}