summaryrefslogtreecommitdiffstats
path: root/libglusterfs
Commit message (Collapse)AuthorAgeFilesLines
* 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
* break inode_path if the length of the path crosses PATH_MAXAmar Tumballi2009-07-171-0/+7
| | | | | | | 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
* Fixes for MacOSX and Solaris buildv2.0.4Harshavardhana Ranganath2009-07-093-42/+103
| | | | | | Fixes for Solaris and MacOSX build errors. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* 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>
* 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>
* libglusterfs-fd: Simplify gf_roundup_power_of_twoShehjar Tikoo2009-06-301-30/+10
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Remove gf_fd_unused_get2Shehjar Tikoo2009-06-302-40/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Prevent gf_fd_put'ing of unallocated fdShehjar Tikoo2009-06-301-1/+11
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Chain newly allocated fdentries.Shehjar Tikoo2009-06-301-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Change GF_FDENTRY_ALLOCATED constantShehjar Tikoo2009-06-301-3/+2
| | | | | | | | | This change is being brought in so that we can differentiate between fdentry_ts when debugging using gdb. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Turn fd-table O(1)Shehjar Tikoo2009-06-302-66/+125
| | | | | | | | | This commit reduces CPU usage of gf_fd_unused_get drastically by making it O(1) instead of O(n). Related to: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=16 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>
* gf-dirent: add support for stat attribute in dir entry (to work likeAnand V. Avati2009-06-262-5/+13
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Removed the swap being done for __noswap functions.Vijay Bellur2009-06-171-3/+3
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Add empty and NULL dirents list checksShehjar Tikoo2009-06-082-0/+12
| | | | | | | | | | | | These checks are needed in case a higher layer intends to delink the dirent list and passes a NULL pointer to fop_readdir_cbk_stub for the entries parameter. Consequently, the gf_dirent_free must guard against an empty list because the stub that is passed to it mgiht have an empty dirent list. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Move fstab parsing into booster from libglusterfstag-release-2.0Shehjar Tikoo2009-05-203-393/+2
| | | | | | | | | | | This is another attempt at fixing build problems on Solaris. I am told that booster build is disabled on Solaris and I know that it is disabled on Mac OS X also. Getting it to work on both these systems is now on my TODO list, mainly because on both these systems, we can have a glusterfs client running without requiring FUSE. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* mem-pool: Restructure mem-pool behaviourShehjar Tikoo2009-05-192-31/+55
| | | | | | | | | | | | | | | | | | This commit changes mem-pool behaviour to return a directly usable address by performing the required adjustment on the address being returned. This is different from the previous behaviour where we're trying to fit into the requested size, the list_head*2 also. This is not efficient enough in terms of space but hopefully works better than not having any mem-pool at all. Besides, I am not comfortable with mem-pool meta-data and caller-useable memory area being the same because of the potential for mem-pool's data structure corruption. PS: Please do read the comments in the code for more info during review. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* mem-pool: Fix #define spellingShehjar Tikoo2009-05-191-3/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* mem-pool: Remove hard coded value for pad boundaryShehjar Tikoo2009-05-191-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* mem-pool: Fix memory leak in mem-pool init phaseShehjar Tikoo2009-05-191-1/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.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-162-0/+230
| | | | | | | | | - 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>
* booster: Add fstab parsing supportShehjar Tikoo2009-05-083-2/+393
| | | | | | | | | | | | | This commit changes the booster.conf format from a simple custom format to that of the /etc/fstab.c See booster_mount(..) for the mount options supported/required for LD_PRELOADing booster. I'll write a small help doc soon. This commit also brings in fstab parsing code into libglusterfs because Darwin libc only supports reading the hardcoded /etc/fstab. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* valid_host_name(): accept string lengths upto 75 chars (the limit accepted ↵Anand V. Avati2009-05-071-1/+1
| | | | by glibc resolver)
* transport shortcut b/w client and serverAnand V. Avati2009-05-072-2/+118
| | | | | | This patch makes the server pass back the transport pointer of the client. If the UUID matches, the client makes the local transport 'shortcut' with the remote transport (pointer received from server) The shortcut simulates a socket queue. Instead of serialized messages going over the network and getting queued in the tcp socket queue, the messages get queued in a transport specific queue picked by a polling thread.
* libglusterfs log cleanupAnand V. Avati2009-04-282-10/+6
|
* log message supressing in DNS resolutionAnand V. Avati2009-04-241-4/+4
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Cleaned up log messages in xlator.cVikas Gorur2009-04-241-20/+20
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Cleaned up log messages in spec.yVikas Gorur2009-04-241-31/+28
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Cleaned up log messages in inode.cVikas Gorur2009-04-241-41/+4
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Changed logging format to remove line number & function name from NORMAL and ↵Vikas Gorur2009-04-241-4/+10
| | | | | | higher levels. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Introduce new log level GF_LOG_TRACE.Vikas Gorur2009-04-242-4/+5
| | | | | | | TRACE is the most verbose log level, meant to have a full trace of operation. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Remove log level TRACE and the macro GF_TRACE.Vikas Gorur2009-04-242-8/+0
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* iobuf: Define MAP_ANONYMOUSShehjar Tikoo2009-04-241-0/+11
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* iobuf_pool->arenas_cnt should be incremented in iobuf_arena_alloc, and not ↵Anand V. Avati2009-04-221-1/+2
| | | | | | iobuf_pool_add_arena (to avoid counting of unpruned arenas) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* call-stub: Check for NULL in the correct variableShehjar Tikoo2009-04-221-1/+1
| | | | | | | | It looks like the argument fd was meant to be checked here instead of the fd in the call stub. This fixes a NULL fd bug that results in an EINVAL on opendir. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* inode.c - NULL check for the extra __inode_search performed, when presented ↵Anand V. Avati2009-04-201-0/+6
| | | | | | inode is not hashed. This bug fixes #967
* pruning buffer margin - do not destroy if no other non-filled arenas are in ↵Anand V. Avati2009-04-182-3/+26
| | | | the pool
* added 2 APIs iobuf_size and iobref_size to return the system memory usage by ↵Anand V. Avati2009-04-172-0/+46
| | | | an iobuf, and by all iobufs in an iobref respectively
* 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>