summaryrefslogtreecommitdiffstats
path: root/libglusterfs
Commit message (Collapse)AuthorAgeFilesLines
* libglusterfsclient: Use macros for argument checksShehjar Tikoo2009-04-171-0/+10
| | | | | | | | | | Having those if {} blocks to check for argument validity hurts the eye so this patch replaces those checks with macros. One macro already exists in libglusterfs. The second macro is introduced by this commit for libglusterfsclient-specific check for paths. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* add NULL check in iobuf_arena_destroyAnand V. Avati2009-04-161-0/+3
|
* use MAP_FAILED macro to free mem_base in arena_destroyAnand V. Avati2009-04-141-1/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* FREE arena->iobufs in iobuf_arena_destoryAnand V. Avati2009-04-141-0/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* introduce page_size in glusterfs_ctx_t to be used by all translators set it ↵Anand V. Avati2009-04-131-0/+1
| | | | | | to 128KB in main() Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* bug fix in iobuf_select_arena - call __iobuf_pool_add_arena (unlocked version)Anand V. Avati2009-04-131-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* bug fix - arena destruction now calls munmap and not FREEAnand V. Avati2009-04-131-1/+5
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* add purge list support to make iobuf_pool_purge() in expensive, and actually ↵Anand V. Avati2009-04-132-1/+10
| | | | | | call it in iobuf_put :-) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* bug fix in iobuf_select_arena - never created a new arenaAnand V. Avati2009-04-131-2/+5
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* add @filled list in iobuf_pool to keep away filled list from getting ↵Anand V. Avati2009-04-132-1/+20
| | | | | | searched in iobuf_select_arena Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* use MAP_FAILED macro to check for mmap failure instead of (void *) -1Anand V. Avati2009-04-131-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fixed sizeof parameter in CALLOC of a new arenaAnand V. Avati2009-04-131-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated transport interface functions to accommodate IOBUF/IOBREFAnand V. Avati2009-04-122-8/+11
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* do away with frame->root->{req,rsp}_refs membersAnand V. Avati2009-04-121-2/+0
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* update prototype of writev and readv_cbk to use IOBREF in parameter (step ↵Anand V. Avati2009-04-125-27/+39
| | | | | | towards elmination of frame->root->{req,rsp}_refs Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IOBREF support for holding iobuf refs along with fops (replacement for ↵Anand V. Avati2009-04-122-0/+152
| | | | | | frame->root->{req,rsp}_refs Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IOBUF support (to be used by transports and fuse)Anand V. Avati2009-04-124-2/+494
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add lock-less versions of fd_ctx_*Vikas Gorur2009-04-072-52/+104
| | | | | | | | Added __fd_ctx_get __fd_ctx_set __fd_ctx_del which do not hold any lock. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient code changesRaghavendra G2009-04-032-0/+21
| | | | | | | | | | | | - add dentry support to libglusterfsclient. - changes related to using array, to store context in inode instead of dictionary. - code changes related to cleanup of libglusterfsclient interface. - added glusterfs_mkdir and glusterfs_rmdir - other changes in libglusterfsclient to make it work with code changes in other parts of glusterfs. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* server-protocol - reimplement connection cleanup to happen in 2 phasesRaghavendra G2009-04-032-10/+55
| | | | | | | | | | | - first phase, which happens when POLLERR is received on transport, releases all locks, flushes all open fds. - second phase, which happens when both the transports of connection destroyed, destroys the containers like lock table, fd table along with the connection. - the first phase, clears up any references to transport held by translators like posix-locks(in the form of blocked locks) paving way for the second phase. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* change char to int in execute_cmd (based on comment on #26006 from Giorgio ↵Anand V. Avati2009-04-021-1/+1
| | | | | | Marinelli <gio@reversiva.net> Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Changed few lines to ensure Optimization (lesser code).Bharat Shetty Barkur2009-04-021-3/+1
| | | | | | Changed few lines to ensure lesser code optimization while checking the EOF for the file pointed to by specfp. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* use (fgetc() != EOF) instaed of feof() in parserAnand V. Avati2009-04-011-2/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Enable glusterfs client to exit after a configured number of failed connects ↵Raghavendra G2009-04-011-0/+1
| | | | | | \ while fetching volume specification file from server Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Avoid infinite loop while parsing volume specification files on Linux/ARM.Raghavendra G2009-04-011-2/+4
| | | | | | - patch submitted by anonymous user (ref: bug #26006 on savannah). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add new type of option type INTERNET_ADDRESS for validationRaghavendra G2009-04-012-0/+126
| | | | | | | | - used to validate options like remote-host, bind-address. - Also validate options of translators created during fetch of volume specification file from remote server. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fix duplicate setting of values in inode->ctx and fd->ctxAnand V. Avati2009-03-262-10/+26
| | | | | | | | this patch avoids setting of duplicate key/value pairs in the context. note that consumers have to explicitly check for previous existance of key to avoid any kind of resource leak resulting from this overwrite. 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>
* fixed sys_<fops> related warnings. (on mac os x and opensolaris)2.0.0rc5Amar Tumballi2009-03-192-1/+2
| | | | | | The fix in posix will fix 'unresolved' symbol errors in Mac/Solaris/FreeBSD Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add system call abstraction layerVikas Gorur2009-03-175-23/+637
| | | | | | | | | - syscall.c provides platform-independent system calls - previous code for this from compat.c removed - posix xlator uses new functions from syscall.c - solaris_flistxattr added to compat.c Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add extra 'volume' parameter to inodelk/entrylk callsVikas Gorur2009-03-126-24/+71
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* xlator.c option validation should check for empty valid options list (for ↵Basavanagowda Kanur2009-03-121-4/+6
| | | | | | | | strings). 'if (!opt->value)' always fails as 'value' member is an array of size ZR_OPTION_MAX_ARRAY_SIZE and is always non-null. it should have been 'if (opt->value[0] == NULL)' instead. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fixed two more occurrences of poll_out variables used for logging.Bharat Shetty Barkur2009-03-101-2/+2
| | | | | | Changed the poll_in variable to poll_out variable at two more places in the code. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* added fgetxattr and fsetxattr FOPsVikas Gorur2009-03-079-22/+381
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* code changes in the usage of inode_ctx_get and inode_ctx_put after their ↵Raghavendra G2009-03-052-29/+53
| | | | | | implementation is changed to hold inode->lock. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Change to fix the build problems with bison 1.28 (in RHEL 4.6)Amar Tumballi2009-03-042-2/+0
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* inode_ctx_t locks addedAnand V. Avati2009-03-031-30/+54
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* changes in patchset and repo versionAmar Tumballi2009-03-031-1/+1
| | | | | | | noticed that if anyone pulls from git repo, the version says 'tla' and patchset also shows tla's patch. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fixed small error regarding the poll_out variableBharat Shetty Barkur2009-03-031-1/+1
| | | | | | Changed the poll_in variable to poll_out variable, so that the logging is relevant to the case of invalid poll_out value. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* volumefile modification awareness to make sure there are no inconsistencies.Amar Tumballi2009-02-273-0/+56
| | | | | | Complete (including feature to properly umount) in my sense. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* moved dht_hashfn_tea() to libglusterfs/hashfn.c as gf_dm_hashfn() (dm - ↵Basavanagowda Kanur2009-02-272-0/+105
| | | | | | | | davies-meyer). moved dht_hashfn_tea() to libglusterfs/src/hashfn.c as gf_dm_hashfn(). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-2644-44/+44
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fd->lock added to protect transactions for accessing and modifying fd->_ctx.Basavanagowda Kanur2009-02-262-33/+64
| | | | | | fd->_ctx access and modifications are now protected by fd->lock. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* __inode_unlink() should not be sent a NULL inode.Basavanagowda Kanur2009-02-261-0/+2
| | | | | | | | unlink_inode might be NULL in inode_unlink() under the following circumstances: 1. 'inode' got forget() and was unhashed. 2. 'inode' was replaced by a new inode object and the new object got forget() or was pruned out of the inode table. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* backtick support enhancementRaghavendra G2009-02-251-105/+101
| | | | | | | - text within backtick can span multiple lines - check exit status of command after execution Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* added lock_notify and lock_fnotify FOPs to everywhere necessary in ↵Vikas Gorur2009-02-239-2/+287
| | | | | | | | libglusterfs/* fixed indentation and resubmitting Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* attritbute and entry timeout values under volume now support float/double valuesHarshavardhana2009-02-213-4/+38
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* new function gf_string2double for float/double valuesHarshavardhana2009-02-212-0/+40
| | | | | | fixed warning Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* new functions dict_{get,set}_double for float/double valueHarshavardhana2009-02-212-0/+99
| | | | | | fixed warning Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fix to remove ''input' defined but not used' warning in building glusterfsAmar Tumballi2009-02-201-0/+1
| | | | | | needed to complete the build scripts without warnings Signed-off-by: Anand V. Avati <avati@dev.gluster.com>