diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2013-09-04 12:29:30 +0530 |
---|---|---|
committer | Krutika Dhananjay <kdhananj@redhat.com> | 2013-09-06 14:57:09 +0530 |
commit | 51a02dc600bf4711e291247d271e87bd9f319fba (patch) | |
tree | 6fdb8edd0bfd5c6f0ea499c3b3f53168b75c72e3 /xlators/mgmt/glusterd/src/glusterd-utils.h | |
parent | 08c555680d4aa0ec800ce617fdb119e83f9cd1f8 (diff) |
glusterd: Add cksum file (quota.cksum) for quota.conf file
.. and use quota checksum and version to validate one's own quota store
config
cli: cleanup quota-list-all implementation
Also,
change the format in which we store the directory quota configurations.
We store the list of gfids as 16 byte unsigned chars, in binary mode.
Original-author: Krishnan Parthasarathi <kparthas@redhat.com>
glusterd: Store quota checksum and version in quota.cksum
Quota version is incremented AND quota checksum is computed everytime
quota.conf is modified.
The checksum and versions are also retrieved
from store into memory whenever glusterd is restarted.
glusterd: Unlink quota.conf and quota.cksum on quota disable
Also destroy volinfo->quota_conf_shandle and reset it to NULL,
and reset volinfo->quota_conf_version to 0 in memory.
Change-Id: Ie71da3a75bc80e1ffddf4f2e38a99a48ad4de164
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 1074c46d..3be5458d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -158,7 +158,8 @@ int32_t glusterd_compare_friend_data (dict_t *vols, int32_t *status, char *hostname); int -glusterd_volume_compute_cksum (glusterd_volinfo_t *volinfo); +glusterd_compute_cksum (glusterd_volinfo_t *volinfo, + gf_boolean_t is_quota_conf); void glusterd_get_nodesvc_volfile (char *server, char *workdir, @@ -593,4 +594,7 @@ glusterd_all_volumes_with_quota_stopped (); int glusterd_reconfigure_quotad (); + +void +glusterd_clean_up_quota_store (glusterd_volinfo_t *volinfo); #endif |