summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* version check between client/server made more specific to protocol only.Amar Tumballi2009-06-293-9/+14
| | | | | | | | | 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>
* dht_readdir_cbk: use stat attributes in the READDIRPLUS dirents toAnand V. Avati2009-06-261-22/+21
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* rename dht_first_up_child to dht_first_up_subvolAnand V. Avati2009-06-262-2/+3
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* set 'lookup unhashed' mode to be on by defaultAnand V. Avati2009-06-261-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* posix_readdir: fill stat structure into dir entryAnand V. Avati2009-06-261-0/+23
| | | | 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>
* mount script to take arguments like nfsAmar Tumballi2009-06-241-17/+34
| | | | | | | | | | | | | | | | | Ref: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=37 earlier instead of path, it used to take port number, which is an option (-o server-port=<port>), now. new syntax is bash# mount -t glusterfs <hostname>:<path/key> [mountpoint] [This patch is backward compatible with earlier syntax] bash# mount -t glusterfs <hostname>:<port> [mountpoint] Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Added a new option transport.socket.nodelay.Vijay Bellur2009-06-242-0/+51
| | | | | | Release 2.0 compatible patch for optionally setting NODELAY. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* server-protocol: interpret the 'op' value properly when a packet is received.Amar Tumballi2009-06-231-4/+3
| | | | | | | | | Ref: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=35 The check done earlier was not handling the case when a 'op' is == MAX_VALUE (which is not defined), and used to skip to the next array (like gf_mops[MAX] == gf_cbks[0]) Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* check if the 'key' is the volume file name itself.Amar Tumballi2009-06-231-14/+34
| | | | | | | | With this patch, one can fetch any volumefile which is not pre-defined in volume file with 'option' in server protocol volume, instead clients can fetch the volume files based on the key name itself [From the confdir only] Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* mount.glusterfs.in correctness in case of duplicate mountAmar Tumballi2009-06-231-2/+2
| | | | | | | | mount.<fstype> script/program should return success in case when it finds duplicate mounts. It was returning failure earlier. Someversions of automount programs had issues with this behavior. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* glusterfsd - build proper mount/fuse structure.Basavanagowda Kanur2009-06-221-2/+17
| | | | | | | | | | while appending mount/fuse to a translator tree, make sure that <xlator_t-of-fuse>->next points to the first xlator in the list of xlators and not the subvolume of mount/fuse. NOTE: tree traversal should always happen through <xlator_t>->children Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* local->loc should be filled in dht-mknod()Amar Tumballi2009-06-181-0/+9
| | | | | | | local->loc should be properly filled while creating a linkfile. otherwise this causes the segfault in underlying client-protocol layer. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* change the log level of disk full message in dht-diskusageAmar Tumballi2009-06-181-3/+3
| | | | | | | | the current msg is getting printed in warning level. Instead changed it to debug, as the msg specific each node being full is already getting printed in higher priority, hence this msg looks excessive. 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>
* libglusterfsclient: Call inode_lookup to prevent pruningShehjar Tikoo2009-06-121-5/+7
| | | | | | | | | | | | | This bug shows up while using unfs3 with replicate. The absence of an inode_lookup on a looked-up/created inode results in it getting pruned from the inode table. Consequently, a subsequent lookup for the inode results in a different inode number being returned by replicate. This breaks unfs3 because it tries to remember the inode numbers returned by two different stat-family calls. Resolves: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=11 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* read-ahead: return with error code EBADF for fops on fds without file set in ↵Raghavendra G2009-06-111-11/+45
| | | | | | | | | | | their context. - since a successful open/create will _always_ set a pointer to ra_file_t in context of fd, this fix makes sense. - an example of operations on bad fd can be afr sending read on the child which was down during open. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* read-ahead: unwind with a return value of -1 and error code of ENOMEM on ↵Raghavendra G2009-06-111-0/+4
| | | | | | memory allocation for ra_file in open/create Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* removed unused option 'page-size' in io-cacheAmar Tumballi2009-06-091-5/+0
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Print PID after daemonizing glusterfs.Vikas Gorur2009-06-092-8/+21
| | | | | | | | | | PID used to be printed before glusterfs became a daemon, which is incorrect since becoming a daemon involves forking and thus the PID changes. Fixes bug #8. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* configure.ac: print summary to stdoutAnand V. Avati2009-06-091-2/+0
|
* server-helpers: cleanup connection only if there are no active transports.Raghavendra G2009-06-083-129/+194
| | | | | | | | | | | - thanks to Ioannis Aslanidis <iaslanidis@flumotion.com> for reporting. - breakup the server_connection_cleanup into smaller procedures. - do following operations in a single atomic operation. 1. conn->active_transports-- 2. collecting pointer to lock table and all fds if there are no active transports this will avoid any race conditions. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Fix crash in afr data self heal. Bugzilla ID: 3Vikas Gorur2009-06-081-0/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: Avoid dirent copies in readdir cbkShehjar Tikoo2009-06-082-7/+16
| | | | | | | | | We can avoid memory allocation, de-allocation and data copies by just using the entries passed to us from a lower layer and by de-linking the entries from the original list. 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>
* ib-verbs error log enhancementAmar Tumballi2009-06-031-3/+10
| | | | | | | | | | | | | Earlier it was thought that only not having 'opensm' running will cause handshake errors in ib-verbs. Recently understood that even having a wrong 'ib-verbs.port' option can also cause the same behavior, and it took more than 5-6 e-mail iterations with the user and lot of brain cycle in support team to understand the problem. Made the log message more descriptive, so user can be find the cause, or can send us email without wasting time. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-cache: prevent frames from getting woken up while page is getting validatedAnand Avati2009-06-031-1/+1
| | | | | | | | | | | | | | | | 1. A page will be put on the inode waitq if the 'freshness' has to be verified with an fstat() 2. while the fstat is in transit, other calls (like lookup) can update ioc_inode->tv, resetting the freshness (page still on inode waitq) 3. Another read request on the same page, after the updated freshness, will wake up the page frames neglecting the fact that the page is also waiting on the inode (waiting for the fstat completion) 4. once the page's frames are woken, the page becomes elegible for purging and can get destroyed for various reasons, leaving a destroyed page pointer in the inode's waitq 5. fstat returns and hits the destroyed page pointer causing a crash The fix is to all together disable cache hits when any page of the same inode is under validation. The otherwise cache hit will now be subjected to the ongoing validation by getting queued to the inode waitq. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* unify getdents count reduced to 512 (from 1024)Amar Tumballi2009-06-031-1/+1
| | | | | | | | | | | | Thanks to Krishna <krishna (at) gluster.com> for pointing this out. When a unify self-heal of large directory (directory with lot of entries) is done, the getdents_cbk used to fail because of new limit of buffer size (128KB). Noticed that earlier it used to streach upto 4MB, hence the value 1024 worked fine. By reducing it to 512, noticed, we can fit in well within 128KB limit, and hence unify self-heal goes through. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: Increase readdir block sizeShehjar Tikoo2009-06-031-1/+1
| | | | | | | | | | | | | | This improves the potential for pre-fetching a larger number of dirents. Consider that, with 255 chars as the max name length for each dirent, in the worst case scenario, where we actually have files with such large names, we're not getting more than 4 entries with the current block size of 1024. Generally also, increasing the size to 4k provides us with a higher chance that directories with low to medium number of dirents will be pre-fetched in a single readdir fop. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: Add dirent pre-fetching and cachingShehjar Tikoo2009-06-032-64/+215
| | | | | | | | | | | | | | The fop interface is such that we're able to extract more than 1 dirent in a readdir fop. This commit now enables libglusterfsclient to read multiple entries on a glusterfs_readdir call. Once these have been pre-fetched, they're cached till either glusterfs_closedir ,glusterfs_rewinddir or glusterfs_seekdir are called. The current implementation is beneficial for sequential directory reading and probably indifferent to applications that do a lot of seekdir and rewinddir after opening the directory. This is because both these calls result in dirent cache invalidation. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: attr_timeout: Read timeout from booster fstabShehjar Tikoo2009-06-031-0/+17
| | | | | | | | | In order to expose the timeout values for stat and inode caching, this commit introduces a new fstab option "attr_timeout" that defines the number of seconds for which a looked up inode or a stat()'ed structure is valid in the cache. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: Simplify inode and stat cachingShehjar Tikoo2009-06-033-127/+94
| | | | | | | | | There is a mechanism for caching the inode numbers got from a lookup and a struct stat got from a stat or fstat but I wasnt sure if it worked. This commit simplifies cache updates and checks and the accompanying tests have made sure that the cache does work. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: Allocate right sized structureShehjar Tikoo2009-06-031-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Clean-up handling of log/fstab env variablesShehjar Tikoo2009-06-021-5/+14
| | | | | | | | | | | | | Handle two cases when deciding log/fstab file: 1. It turns out that that strdup or strlen doesnt actually check for NULL before trying to do its thing with the string so it seg-faults on seeing a NULL char pointer. 2. getenv can return an empty string if the env var was exported as: $ export GLUSTEFS_BOOSTER_LOG= Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Eliminate gluster context creation raceShehjar Tikoo2009-06-021-92/+133
| | | | | | | | | | | | When multiple threads try to create a glusterfs context using the glusterfs_init function, those threads end up using the global vairables in the vol file parser in an non-synchronized manner, resulting in a seg-fault. There is now a big lock around searches and additions from the mount table in do_open. This lock granularity could be reduced. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* booster: Clear up env var usageShehjar Tikoo2009-06-021-1/+14
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* bug fix in dht-diskusage when statvfs->f_blocks is 0Amar Tumballi2009-06-021-2/+3
| | | | | | | This can happen when 'option export-statfs-size off' is given in posix volume. Caused divide by 0 error. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Remove absolute path for init scripts.Harshavardhana2009-05-291-1/+1
| | | | 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>
* ib-verbs: Set receive and send window sizeShehjar Tikoo2009-05-262-0/+57
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* socket: Set receive and send window sizeShehjar Tikoo2009-05-262-0/+72
| | | | | | | This is experimental. We're hoping this improve performance on high speed links like 10GigE. 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>
* booster: Move fstab parsing into booster from libglusterfstag-release-2.0Shehjar 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>
* 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>