summaryrefslogtreecommitdiffstats
path: root/libglusterfs
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* 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>
* Add command line option to specify central log server.Vikas Gorur2009-06-181-0/+2
| | | | | | | | | Added two command line options: --log-server SERVER --log-server-port PORT Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* adding an extra xlator option type, GF_OPTION_PERCENT_OR_SIZET.Amar Tumballi2009-06-182-3/+96
| | | | | | | | | | | Originally from Paul Rawson <plrca2@gmail.com> http://patches.gluster.com/patch/391/ : patch re-submitted with patching guidelines. with this patch, the xlator volume options get another type which can take arguments either in 'percent' or in 'bytes', which is useful in many cases. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Prevent gf_fd_put'ing of unallocated fdShehjar Tikoo2009-06-181-1/+11
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Chain newly allocated fdentries.Shehjar Tikoo2009-06-181-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Change GF_FDENTRY_ALLOCATED constantShehjar Tikoo2009-06-181-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>
* 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: Turn fd-table O(1)Shehjar Tikoo2009-06-152-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>
* write-behind: check for memory allocation failures and take appropriate actionRaghavendra G2009-06-151-0/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Log to a central server.Vikas Gorur2009-06-112-8/+397
| | | | | | | | | | | | | Several functions to support centralized logging: - create a logging thread upon init - gf_log submits log messages to the logging thread which in turn sends it to the server using the MOP log - on the server side, log messages from a client are written to the filename <log file name>.client-<transport-identifier> Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Functions to store a central log flag in TLS.Vikas Gorur2009-06-112-0/+64
| | | | | | | The flag is set in TLS so that a re-entry into gf_central_log does not deadlock. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Include glusterfs.h in dict.cVikas Gorur2009-06-111-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Added MOP log to libglusterfs/*Vikas Gorur2009-06-117-0/+52
| | | | 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>
* THIS: use xlator_init() for initializing xlatorsAnand V. Avati2009-05-221-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: add xlator_init() API to set @THISAnand V. Avati2009-05-222-0/+18
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: default_notify to use xlator_notify for THIS compatibilityAnand V. Avati2009-05-221-7/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: xlator_notify API to be used for propagating notifications with proper ↵Anand V. Avati2009-05-222-0/+19
| | | | | | THIS setting Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: set appropriately in call stub resumesAnand V. Avati2009-05-221-4/+11
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: set appropriately in STACK_* macrosAnand V. Avati2009-05-221-4/+21
| | | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* globals: add globals.h/c THIS: macro to access thread specific current ↵Anand V. Avati2009-05-223-2/+209
| | | | | | | xlator CTX: macro to access glusterfs global context (glusterfs_ctx_t) Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* mem-pool,io-threads: Destroy mem-pool on deallocationShehjar Tikoo2009-05-212-0/+16
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Move fstab parsing into booster from libglusterfsShehjar 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)