~ubuntu-branches/debian/sid/glusterfs/sid

« back to all changes in this revision

Viewing changes to xlators/features/marker/src/marker-quota.h

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2014-04-22 10:00:41 UTC
  • mfrom: (1.3.25)
  • Revision ID: package-import@ubuntu.com-20140422100041-6mur2ttyvb8zzpfq
Tags: 3.5.0-1
* New upstream release.
  - Rewrite patch 01-spelling-error.
  - Adjust lintian overrides.
  - Install new files.
  - The offical tarball is not properly generated, hack it around.
  - Add symlink from fusermount-glusterfs manpage to mount.glusterfs.
  - Move gsync-sync-gfid from /usr/share to /usr/lib.
  - Add benchmarking directory.
* Remove old versioned build dependencies and build depend on libglib2.0-dev.
* Add lintian override for possible-gpl-code-linked-with-openssl. It is the
  same false positive like with the gluster-server package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
                var = GF_CALLOC (sizeof (type), 1,      \
43
43
                                 gf_marker_mt_##type);  \
44
44
                if (!var) {                             \
45
 
                        gf_log ("", GF_LOG_ERROR,       \
46
 
                                "out of memory");       \
47
45
                        ret = -1;                       \
48
46
                }                                       \
49
47
        } while (0);
61
59
                ret = 0;                                \
62
60
        } while (0);
63
61
 
64
 
#define GET_CONTRI_KEY(var, _gfid, _ret)        \
65
 
        do {                                    \
66
 
                char _gfid_unparsed[40];        \
67
 
                uuid_unparse (_gfid, _gfid_unparsed); \
68
 
                _ret = snprintf (var, CONTRI_KEY_MAX, QUOTA_XATTR_PREFIX \
69
 
                                 ".%s.%s." CONTRIBUTION, "quota", \
70
 
                                 _gfid_unparsed); \
 
62
#define GET_CONTRI_KEY(var, _gfid, _ret)              \
 
63
        do {                                          \
 
64
                if (_gfid != NULL) {                  \
 
65
                        char _gfid_unparsed[40];      \
 
66
                        uuid_unparse (_gfid, _gfid_unparsed);           \
 
67
                        _ret = snprintf (var, CONTRI_KEY_MAX,           \
 
68
                                         QUOTA_XATTR_PREFIX             \
 
69
                                         ".%s.%s." CONTRIBUTION, "quota", \
 
70
                                         _gfid_unparsed);               \
 
71
                } else {                                                \
 
72
                        _ret = snprintf (var, CONTRI_KEY_MAX,           \
 
73
                                         QUOTA_XATTR_PREFIX             \
 
74
                                         ".%s.." CONTRIBUTION, "quota"); \
 
75
                }                                                       \
71
76
        } while (0);
72
77
 
73
78
#define QUOTA_SAFE_INCREMENT(lock, var)         \