summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/dict.c
Commit message (Collapse)AuthorAgeFilesLines
* Change Copyright current yearPranith Kumar K2011-08-101-1/+1
| | | | | | | | Change-Id: Ia85fa5617fb0bb438dbe3660d36465c0ecb000be BUG: 3348 Reviewed-on: http://review.gluster.com/199 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* LICENSE: s/GNU Affero General Public/GNU General Public/v3.1.6qa6Pranith Kumar K2011-08-061-3/+3
| | | | | | | | Change-Id: I30b1807f4493a9b4ffa9899548daf7d29a0a6364 BUG: 3348 Reviewed-on: http://review.gluster.com/184 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* libglusterfs/dict: Donot perform NULL check on data in dict_foreach.Junaid2011-04-121-2/+2
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 1816 (send volume options in friend add) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1816
* libglusterfs/dict.c: Whitespace cleanupVijay Bellur2011-02-281-217/+219
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* libglusterfs/dict: memcpy() data_t in unserialize.Vikas Gorur2011-02-171-2/+2
| | | | | | | | | | | | This fixes a race in dht_getxattr() where the xattr dictionary returned by one of the subvolumes can get free'd before STACK_UNWIND, leading to applications seeing junk values. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2442 (getxattr() on a directory sometimes returns junk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2442
* free GF_CALLOCed memory by GF_FREE instead of FREERaghavendra Bhat2011-01-271-2/+2
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
* libglusterfs: data_copy needs to init the lockPranith K2010-12-271-0/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2226 (data_copy needs to init the data lock) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2226
* Set correct logging level for log messagesPranith K2010-10-111-1/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1887 (logging mess) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1887
* Copyright changesVijay Bellur2010-10-111-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* mgmt/glusterd: send volume options to friendv3.1.0qa41Pranith K2010-10-051-10/+12
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1816 (send volume options in friend add) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1816
* Change GNU GPL to GNU AGPLPranith K2010-10-041-3/+3
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1388 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1388
* dict: add dict_get_str_boolean() function handily query string-boolean valuesCsaba Henk2010-09-241-0/+61
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1670 (Volume set enable disable support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1670
* mgmt/glusterd: free xdr allocationsPranith Kumar K2010-09-141-2/+47
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1186 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
* logging: provide a API to print calling functionsAmar Tumballi2010-09-131-2/+2
| | | | | | | | | | * logs 3 calling functions Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1493 (log enhancement to print calling function..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1493
* posix: remove gen related xattr usageAmar Tumballi2010-09-131-2/+2
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* dict.c: fix a redundant log in DEBUG levelAmar Tumballi2010-09-091-2/+2
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1493 (log enhancement to print calling function..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1493
* mgmt/glusterd: memory leak fixesPranith Kumar K2010-08-311-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1186 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
* glusterfsd: Clang error fixes.Sachidananda2010-08-261-1/+1
| | | | | | | | Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1077 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1077
* removed last few remaining 'ERR_ABORT's from codebaseAmar Tumballi2010-07-281-10/+25
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
* debug/* Change STACK_UNWIND TO STACK_UNWIND_STRICTshishir gowda2010-07-191-5/+5
| | | | | | | | | | Also fixed log msg typo found in bug 1031 Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 269 (Add a specialized STACK_UNWIND macro for each FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=269
* NULL dereference fixes in code base after running with 'clang'Amar Tumballi2010-07-021-2/+3
| | | | | | | | | | | | * 212 logical (NULL deref/divide by zero) errors reduced to 28 (27 of them in contrib/ and lex part of codebase, 1 is invalid) * 11 API errors reduced to 0 Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
* Memory accounting changesVijay Bellur2010-04-231-32/+37
| | | | | | | | | | | Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their contributions. Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
* Fix further cppcheck reported issues.Csaba Henk2010-03-311-6/+21
| | | | | | | | | Reported-by: Patrick Matthäi <pmatthaei@debian.org> Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 420 (fix leaks pointed out by cppcheck static analyzer) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=420
* More robust dictionary (un)serialization (fixes bug #397).Hraban Luyat2009-12-201-12/+29
| | | | | | | | | | | | | | | | | | | | | | Hello, This patch fixes bug 397: dictionary (de)serialization used pointer casting which forced word-alignment on (at least) armv5tel, causing corruption while writing and reading buffers into memory. It also adds some debugging (more information in case of errors). I tried to send this a few times already but I think it got bounced from the list. Greetings, Hraban Luyat Signed-off-by: Hraban Luyat <hraban@0brg.net> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 397 (dictionary serialization / deserialization fails on armv5tel) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=397
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-071-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* fix build warnings in 'libglusterfs/'Amar Tumballi2009-07-201-11/+60
| | | | | | | | | | | return value of 'asprintf' was not checked, and the flow was continuing without returning error, which could cause potential segfaults in code (mostly possible during ENOMEM case). Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 130 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=130
* Include glusterfs.h in dict.cVikas Gorur2009-06-111-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* dict.c: make dict_serialized_length and dict_serialize to hold locks.Raghavendra G2009-05-161-120/+10
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* dict.c: Add dict_allocate_and_serializeRaghavendra G2009-05-161-0/+227
| | | | | | | | | - this procedure atomically allocates a buffer and serializes dict into it. - this procedure helps avoid memory corruptions due to race conditions where in new members are added into dict between allocating a buffer for serializing and actually serializing buffer into it. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Changed the gf_log warning for return of null via CALLOC from 'old' to 'newdata'Bharat Shetty Barkur2009-03-261-1/+1
| | | | | | Fixed the warning message to be more clearer for return of the null by CALLOC, by changing old to newdata. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-261-1/+1
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* new functions dict_{get,set}_double for float/double valueHarshavardhana2009-02-211-0/+96
| | | | | | fixed warning Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Added all filesVikas Gorur2009-02-181-0/+2243