diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2013-09-16 21:35:08 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-26 10:23:02 -0800 |
commit | 460ce40d3e2069bf6262dccea6f5ae2fac60d90f (patch) | |
tree | f4f2dec9b963edd4ef9233486e341d940c965ed4 /xlators/features/marker/src/marker-quota.h | |
parent | d6dc8d0e9e2052818c9858f6b073a8bacc3fca88 (diff) |
features/marker: quota friendly changes
* handles renames on dht linkfiles correctly
* nameless lookup friendly changes. uses gfid-to-path conversion
functionality from storage/posix to build ancestry till root.
* log message cleanup.
* build inode contexts in readdirp
* Accounting still not correct with hardlinks.
Credits:
========
Vijay Bellur <vbellur@redhat.com>
Raghavendra Bhat <rabhat@redhat.com>
Change-Id: I415b6fbbc9691f5a38d9fd3c5d083a61e578bb81
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/5953
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota.h')
-rw-r--r-- | xlators/features/marker/src/marker-quota.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/xlators/features/marker/src/marker-quota.h b/xlators/features/marker/src/marker-quota.h index 385760ac4dd..42def9d22dc 100644 --- a/xlators/features/marker/src/marker-quota.h +++ b/xlators/features/marker/src/marker-quota.h @@ -42,8 +42,6 @@ var = GF_CALLOC (sizeof (type), 1, \ gf_marker_mt_##type); \ if (!var) { \ - gf_log ("", GF_LOG_ERROR, \ - "out of memory"); \ ret = -1; \ } \ } while (0); @@ -61,13 +59,20 @@ ret = 0; \ } while (0); -#define GET_CONTRI_KEY(var, _gfid, _ret) \ - do { \ - char _gfid_unparsed[40]; \ - uuid_unparse (_gfid, _gfid_unparsed); \ - _ret = snprintf (var, CONTRI_KEY_MAX, QUOTA_XATTR_PREFIX \ - ".%s.%s." CONTRIBUTION, "quota", \ - _gfid_unparsed); \ +#define GET_CONTRI_KEY(var, _gfid, _ret) \ + do { \ + if (_gfid != NULL) { \ + char _gfid_unparsed[40]; \ + uuid_unparse (_gfid, _gfid_unparsed); \ + _ret = snprintf (var, CONTRI_KEY_MAX, \ + QUOTA_XATTR_PREFIX \ + ".%s.%s." CONTRIBUTION, "quota", \ + _gfid_unparsed); \ + } else { \ + _ret = snprintf (var, CONTRI_KEY_MAX, \ + QUOTA_XATTR_PREFIX \ + ".%s.." CONTRIBUTION, "quota"); \ + } \ } while (0); #define QUOTA_SAFE_INCREMENT(lock, var) \ |