summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove absolute path for init scripts.Harshavardhana2009-05-291-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* socket: New option: Set receive and send buffer sizeShehjar Tikoo2009-05-292-3/+76
| | | | | | | ..and hope for a chance to improve performance on high speed links like 10GigE. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Fix mismatch in size of used buffer to prevent an infinite loopPavan Sondur2009-05-291-1/+1
| | | | | | A mismatch in the size of the used buffer, between reading and then further writing caused an infinite loop and big files(1Mb, 10Mb etc) could not be downloaded through the lighttpd web service using mod_glusterfs. This is because the big file which is broken up into chunks, has a read and a subsequent write. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Do itransform in AFR readdir.Vikas Gorur2009-05-261-3/+10
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Always do itransform of the inode number from the first up child.Vikas Gorur2009-05-261-8/+17
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* add booster_fstab.h in noinst_HEADERS to fix build breakage after 'make dist'Anand Avati2009-05-261-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Preserve atime/mtime during data self heal.Vikas Gorur2009-05-261-8/+51
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* fix crash in __socket_reset. Previously iobuf_p was an allocated pointer, ↵Anand Avati2009-05-221-2/+2
| | | | | | but since introduction of IObuf it is no more. Now iobuf has to be unref'ed instead. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: use xlator_init() for initializing xlatorsAnand V. Avati2009-05-222-2/+2
| | | | 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: bootstrap @THIS in fuse threadAnand V. Avati2009-05-221-0/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: unify now uses xlator_notify for setting THISAnand V. Avati2009-05-221-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: protocol/client now uses xlator_notify for setting THISAnand V. Avati2009-05-221-12/+9
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: ib-verbs now uses xlator_notify for setting THISAnand V. Avati2009-05-221-4/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* THIS: socket now uses xlator_notify for setting THISAnand V. Avati2009-05-221-4/+4
| | | | 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-224-4/+215
| | | | | | | 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>
* Check for returns when apxs fails and disable mod_glusterfsHarshavardhana2009-05-211-4/+10
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* mem-pool,io-threads: Destroy mem-pool on deallocationShehjar Tikoo2009-05-213-0/+17
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Move fstab parsing into booster from libglusterfsShehjar Tikoo2009-05-206-436/+436
| | | | | | | | | | | 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>
* add xlator debug/io-statsCsaba Henk2009-05-205-1/+1536
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* add 'non-blocking-io' to the options array in sockets.Amar Tumballi2009-05-201-0/+3
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-threads: Use boolean enums instead of integer 1Shehjar Tikoo2009-05-201-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-threads: Change mutexes/condvars to spinlocks/semaphoresShehjar Tikoo2009-05-202-36/+80
| | | | | | | | | | | | | | | | | It seems that use of mutexes is resulting in pretty high thread sleep and wake-up cost. What is worse, if a worker thread has acquired a lock, there is a possibility of the main glusterfs thread being put to sleep. We change the use of mutexes into spinlock. At the same time, we cannot anymore use condvars for notification since the condvar interface depends on mutexes itself. Semaphores come to out rescue. Luckily, even the pthread semaphores have a timedwait interface to allow our idle worker threads to make an exit decision. Further, it is possible that spinlocks are not available on all systems so all this is curtained behind #defines so we can fall back to mutexes and condvars implementation. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-threads: Reduce default max for threads to 64Shehjar Tikoo2009-05-201-1/+1
| | | | | | | | | We've had complaints from users who've used autoscaling option with default settings for min and max threads, about high memory consumption because of the large default value for max-threads. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-threads: Support mem-pool allocator for iot_request_tShehjar Tikoo2009-05-202-23/+44
| | | | | | | | | | | | | | | | This commit brings in support for allocation of iot_request_t's in io-threads through the use of the mem-pool. We're hoping that the overheads of hundreds and thousands of small allocations can be avoided through this. The important point to note is that the memory pool is not for the translator as a whole but there is one small memory pool for each worker thread. Not only does that help us avoid malloc overheads for small allocations like iot_request_t but also avoid contention on the heap data structures when multiple threads want an iot_request_t from the pool. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-threads: Add graceful shutdown of worker threadsRaghavendra G2009-05-202-25/+79
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-threads: handle memory allocation failuresRaghavendra G2009-05-201-197/+760
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Change errno to EAGAIN in readv/writevVikas Gorur2009-05-191-6/+7
| | | | | | | | When mandatory locks are enabled and a read/write would block due to a lock and if the fd is opened with O_NONBLOCK, return EAGAIN (previously EWOULDBLOCK). Signed-off-by: Anand V. Avati <avati@amp.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>
* booster: Fall back to remaining real_* functorsShehjar Tikoo2009-05-191-13/+36
| | | | | | | | | It is possible that some of the real_* functors for stat family of syscalls are NULL. I've seen this on libc. In that case, this commit attempts to use any available function that performs an equivalent operation. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Dont de-init fd tables on VMP-init failureShehjar Tikoo2009-05-191-17/+5
| | | | | | | | In case the init procedure for VMP fails, we want to continue using booster through the old approach, which means leaving the fd-table intact. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Do not read info for non-glusterfs mount pointsShehjar Tikoo2009-05-191-0/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Appropriate changes to statvfs struct for Solaris host.Harshavardhana Ranganath2009-05-191-0/+13
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Comply with EEXIST rule on renameShehjar Tikoo2009-05-181-8/+0
| | | | | | | | During a rename, if the new file exists, the old name needs to over-write the new name. We're returning EEXIST, which is wrong behaviour. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: __do_path_resolve: Fix pathname resolution bugShehjar Tikoo2009-05-181-1/+1
| | | | | | | | | | | In __do_path_resolve, we need to use the new_loc.path as the input for resolution rather than the resolved variable, simply because we're not interested in resolving the names that have been resolved, as pointed out by the variable name 'resolved'. Instead, we need to resolve new_loc, which stores the next component in the path to be looked up. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Wipe loc->ino in libgf_client_loc_wipeShehjar Tikoo2009-05-181-0/+1
| | | | | | | | | | | | | | | | Not cleaning up the ino member of a loc_t results in SIGABRT in __inode_link because in some cases, the loc->ino is different from loc->inode->ino. This happens especially in code blocks which re-use a loc_t structure for pointing at different inodes/files. For eg, if a loc_t has been assigned an inode and an ino, and followed by a libgf_client_loc_wipe, then re-use of this loc in say libgf_client_lookup results the SIGABRT because libgf_client_lookup calls inode_link with the same loc_t. However, this loc_t has just been assigned a new inode pointer but the ino member still contains a previous inode's inode number. This difference in inode numbers results in an assertion failure, so the SIGABRT. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add telldir APIShehjar Tikoo2009-05-182-0/+38
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add seekdir APIShehjar Tikoo2009-05-182-0/+36
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add rewinddir APIShehjar Tikoo2009-05-182-0/+37
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Refine readdir entry parsing logicShehjar Tikoo2009-05-181-25/+19
| | | | | | | | Here I am only refining the entry parsing code in order to clarify the exit conditions from the loop. There were a few workloads where this loop went infinite. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Add telldir APIShehjar Tikoo2009-05-182-0/+35
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Add seekdir APIShehjar Tikoo2009-05-182-0/+32
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Add rewinddir APIShehjar Tikoo2009-05-182-1/+33
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>