summaryrefslogtreecommitdiffstats
path: root/libglusterfs
Commit message (Collapse)AuthorAgeFilesLines
* Implement lookup in locks to return lock count in a dict value.Pavan Sondur2009-10-281-0/+3
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 306 (Enhance locks to aid debugging) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
* libglusterfs/rbtree: change rbthash_init_table to take no of expected ↵Raghavendra G2009-10-282-4/+5
| | | | | | | | | | | | | | entries in the hash table as argument. - the expected number of entries is used to create the memory pool of the hash table. Having constant macro for this purpose is not suitable since different users of rbtree based hash table store different number of entries in the table. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 335 (Io-cache optimization) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335
* xlator: initialize all xlators in a loop instead of top down initializationAnand Avati2009-10-281-20/+14
| | | | | | | | | | top-down initialization will miss out on xlators from disconnected subgraphs and notify can go prematurely to these xlators Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 341 (mountpoint first access failure in single address space mode client/server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=341
* inode.c: whitespace fixesAnand Avati2009-10-231-16/+15
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* inode: fix internal refs and minor fixesAnand Avati2009-10-201-10/+20
| | | | | | | | | * also fix trailing whitespaces in a couple of places Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* protocol: format changes to incorporate generation numbersAnand Avati2009-10-181-10/+56
| | | | | | | | | | incorporate 64bit generation field in all protocol headers to accompany an inode number Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* inode_ctx_{get,put,del}2 API supportAmar Tumballi2009-10-182-26/+98
| | | | | | | | | | support for storing multiple values for a key in inode context - used for storing inode and generation number pairs on the server in protocol/client inode ctx Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* inode: API changes for generation number supportAnand V. Avati2009-10-182-156/+196
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* inode: fix indentation and spacingsAnand V. Avati2009-10-181-253/+226
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* performance/stat-prefetch: use op_errno instead of errno to store error code.Raghavendra G2009-10-091-7/+7
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
* libglusterfs/defaults: default_readdirp should call fops->readdirp instead ↵Raghavendra G2009-10-081-1/+1
| | | | | | | | | of fops->readdir. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* assign client_readdirp to .readdirp in protocol/client & fix 2 other bugs in ↵Pavan Sondur2009-10-071-2/+2
| | | | | | | | | call_stub Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 305 (Readdirp crashes in client protocol) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=305
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-0755-55/+55
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Removed remaining references to chmod, chown and utimens as part of setattr ↵Pavan Sondur2009-10-069-874/+14
| | | | | | | | | | | changes. Removed references to chmod, chown and utimes. Removed utimes references in AFR and writebehind. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
* core: Add rbtree based hash tableShehjar Tikoo2009-10-063-3/+466
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* mem-pool: Include stdlib for calloc()Shehjar Tikoo2009-10-061-0/+1
| | | | | | | | | | | Doing so removes build warnings about calloc and free for files that use mem-pool but do not by themselves include stdlib.h, for eg., rbthash.c Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* core: Separate readdirp and readdir fopsShehjar Tikoo2009-10-069-1/+199
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* libglusterfs: Add STACK_UNWIND_STRICT macro.Vikas Gorur2009-10-051-0/+18
| | | | | | | | | | | | | STACK_UNWIND_STRICT (op, frame, this, op_ret, op_errno, ...) The "op" argument is the name of the fop (lookup, open, etc.). This macro makes sure that the number and type of arguments passed match those of the callback function for the fop. 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
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-016-117/+399
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: Introduce setattr and fsetattr fopsShehjar Tikoo2009-10-019-2/+398
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
* Make changes such that glusterfs builds with Werror and fix LONG_LONG_MAX ↵Pavan Sondur2009-10-011-1/+1
| | | | | | | | | definition. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 289 (glusterfs does not build with Werror) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=289
* iobuf, logging: Expose existing functions as requiredShehjar Tikoo2009-09-242-0/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 279 (File written with booster results in self-heal after dd exits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=279
* fuse: emit a flush from release if we didn't get an adjacent FLUSH message ↵Csaba Henk2009-09-231-0/+1
| | | | | | | | | from the kernel Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 223 (flush not sent) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=223
* libglusterfs: Add RCHECKSUM fop.Vikas Gorur2009-09-229-2/+204
| | | | | | | rchecksum (fd, offset, len): Calculates both the weak and strong checksums for a block of {len} bytes at {offset} in {fd}. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Add checksum functions.Vikas Gorur2009-09-225-2/+495
| | | | | | | | | | | gf_rsync_weak_checksum: Calculates a simple 32-bit checksum. gf_rsync_strong_checksum: Calculates the MD5 checksum. The strong checksum function makes use of Christophe Devine's MD5 implementation (adapted from the rsync source code, version 3.0.6. <http://www.samba.org/ftp/rsync/>). Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* protocol/client: access glusterfs context from the ctx member of xlator objectRaghavendra G2009-09-221-0/+7
| | | | | | | | | | - A global context pointer cannot be used with libglusterfsclient, since there can be many contexts in a single process. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 271 (applications using booster protocol/client crash in client_setvolume_cbk.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=271
* Dumop inodectx addedVijay Bellur2009-09-162-0/+18
| | | | | | | | | | Added dumpop inodectx. Support for dumop inodectx added in dht, locks and client-protocol. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* Changed prototype for inode_table_dump() and inode_dump().Vijay Bellur2009-09-162-17/+23
| | | | | | | | | | Changed prototype for inode_table_dump() and inode_dump() Added support for dumpop inode in mount/fuse and protocol/server Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* libglusterfs:Acquire lock before accessing fdtable contents during statedump.Vijay Bellur2009-09-161-8/+16
| | | | | | | | | | Hold lock while dumping fdtable. Dump only inode ino instead of the complete inode. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* common-utils: introduce new macro GF_VALIDATE_OR_GOTO_WITH_ERRORRaghavendra G2009-09-081-0/+9
| | | | | | | | | | - the existing macro GF_VALIDATE_OR_GOTO sets errno to EINVAL which may not be appropriate in all cases. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
* core: Fix build failure on non-Linux systemsShehjar Tikoo2009-09-021-2/+8
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 230 (Bulid fails on Solaris and Mac OS due to Linux specific flags) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=230
* TAKE2[PATCH BUG:213 1/1] Support for Process State DumpVijay Bellur2009-08-1911-7/+740
| | | | | | | | | Support for process state dump. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* libglusterfs: fix SuperFastHash function used in dicitionaries in fact it ↵smyczek2009-07-271-7/+0
| | | | | | | | | always returned the value of second parameter (len) as a result. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 155 (The SuperFastHash function used in dictionaries is broken.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=155
* libglusterfsclient: Fake a fsid for every VMPShehjar Tikoo2009-07-202-0/+13
| | | | | | | | | | | | This is needed to work around the replicate behaviour of possibly returning device number for the same file from different subvolumes. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 148 (replicate: Returns st_dev from different subvols resulting in ESTALE thru unfs3booster) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=148
* added timestamp to crash dump log.Amar Tumballi2009-07-201-4/+19
| | | | | | | | | also did some minor enhancements in formating Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 151 (crash dump log should be in 'logviewer' friendly format) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=151
* fix build warnings in 'libglusterfs/'Amar Tumballi2009-07-208-53/+145
| | | | | | | | | | | 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
* add strict validatation of GF_OPTION_TYPE_PATH option type.Amar Tumballi2009-07-161-1/+9
| | | | | | | | | | Make sure that users don't provide "../" in the path value in volume file, which should be considered security issue. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 141 (GF_OPTION_TYPE_PATH should check for presence of ".." in path) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=141
* break inode_path if the length of the path crosses PATH_MAXAmar Tumballi2009-07-161-0/+7
| | | | | | | | | | | a given search for path can't exceed the length of PATH_MAX in any case. Hence, its best to make sure by adding a check inside the for loop of inode_path, so that it won't enter an infinite loop. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 134 (infinite loop in inode_path ()) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=134
* cleanup 'ctx' from inode and fdAmar Tumballi2009-07-164-70/+0
| | | | | | | | | Removing unused 'dict_t *ctx' from both inode and fd structures. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 128 (cleanup unwanted ctx dictionary in 'inode' and 'fd' structures.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=128
* protocol: add functions gf_flags_from_flags and gf_flags_to_flagsAnand Avati2009-07-071-0/+108
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs/defaults - send CHILD_UP notify only to the parent which has ↵Basavanagowda Kanur2009-07-061-1/+3
| | | | | | | | been init()ed. fixes bz# 12 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs/logging - fix memory leakBasavanagowda Kanur2009-07-061-0/+2
| | | | | | in _gf_log(), free 'msg' before returning. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs - remove definition of ZR_FILENAME_MAXBasavanagowda Kanur2009-07-061-5/+0
| | | | | | | to maintain uniformity of maximum length of file name, through out glusterfs, use NAME_MAX. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs/call-stub - replace ZR_FILENAME_MAX by NAME_MAXBasavanagowda Kanur2009-07-061-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* mem-pool: Do not perform chunkhead2ptr on MALLOCed memoryShehjar Tikoo2009-07-061-2/+6
| | | | | | | | | | | | Memory allocated from the heap instead of the mem-pool need not under go the chunkhead to ptr conversion when returning to a mem-pool user since this address can be use directly. This fixes a crash in io-threads. Ref: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=102 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Print volume file after printing other details.Vikas Gorur2009-07-021-1/+1
| | | | | | | This makes the log format compatible with earlier versions. Fixes bug #105. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* version changes in GIT repo to differentiate between branchesAmar Tumballi2009-06-301-2/+2
| | | | | | | package-version: because master is undergoing changes for 2.1.x release, protocol-version: because of addition of mops 'log' Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs-fd: Simplify gf_roundup_power_of_twoShehjar Tikoo2009-06-291-30/+10
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Remove gf_fd_unused_get2Shehjar Tikoo2009-06-292-40/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* version check between client/server made more specific to protocol only.Amar Tumballi2009-06-291-0/+5
| | | | | | | | | This patch is a step towards giving compatibility between the versions of GlusterFS. Now onwards, the protocol-version won't depend on release versions. In general, multiple glusterfs versions can have common protocol-version. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>