summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* adding an option to mount.glusterfs for server failover while fetching ↵Amar Tumballi2009-08-041-13/+25
| | | | | | | | | | | | | | volume files. Thanks to Cory Meyer <cory.meyer@gmail.com> With this option, 'single point of failure', in case of volfile server can be avoided. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 185 (Request to support secondary volfile-server option in mount.glusterfs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=185
* logging related bug fix in server_lookup()Amar Tumballi2009-08-041-4/+3
| | | | | | | | | | | | When 'dict_unserialize' failed, the log message was trying to print 'state->loc.path' and 'state->ino', which gets filled in later stages in flow. Caused segmentation fault when there was a failure. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 189 (segfault in server-lookup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=189
* cluster/afr: inode-read: Check stat buf for NULL before attempting to set ↵Vikas Gorur2009-08-041-3/+4
| | | | | | | | | inode number. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 184 ([ glusterfs 2.0.6rc2 ] - Client Segfault while running fs-perf-test) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=184
* afr: fix afr_utimens to wait for success of utimens on atleast ↵Raghavendra G2009-07-301-1/+1
| | | | | | | | | | | | | priv->wait_count children. - need_unwind was initialised to 1 in afr_utimens_wind_cbk causing replicate to unwind just after first reply, irrespective of whether it was a success or failure. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 71 (dns failure causing "Transport endpoint is not connected") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=71
* replicate: Return ino from first subvolume on inode creation fopsShehjar Tikoo2009-07-301-9/+28
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 177 (replicate: On file/dir creation, replicate returns inode from random subvolumes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=177
* server-protocol: fix in server-loc-fill()Amar Tumballi2009-07-281-3/+0
| | | | | | | | | | | | to continue with 'hashed' inode, even if inode_path() on the inode fails. This will is needed for few lock operations, to unlock the lock held on inode. (ie, it fixes 'rm -rf *' hang issue, seen from multiple clients). Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* cluster/afr: Use user-supplied struct flock to STACK_WINDVikas Gorur2009-07-271-1/+0
| | | | | | | | | | | | afr_lk_cbk: Use the original struct flock supplied by the user to do further STACK_WIND's, and not the flock returned by the previous STACK_WIND. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 159 (Client hangs when coherent byte range locks is attempted in replicate setup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=159
* protocol/server: add checks for updatation of loc->parent in entrylk() or ↵Basavanagowda Kanur2009-07-271-3/+6
| | | | | | | | | | | | | inodelk(). entrylk() and inodelk() should try to update loc->parent only if parent is not-NULL. because it is not an error to have loc->parent == NULL for entrylk() and inodelk() operations. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 162 (Replication segfaults with many nodes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=162
* cluster/afr: Return same inode number in stat buf for readv_cbkVikas Gorur2009-07-272-0/+4
| | | | | | | | | | Remember the inode number that had been returned in lookup_cbk and set the stat buf->ino to the same. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 166 (libglusterfsclient: Cached stat buf inode is different from ino in inode_t) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=166
* cluster/afr: Set inode number in unwind_buf in the inode-write calls.Vikas Gorur2009-07-271-17/+17
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 166 (libglusterfsclient: Cached stat buf inode is different from ino in inode_t) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=166
* Return stat from read subvolume in dir-write ops.Vikas Gorur2009-07-272-52/+83
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 138 (create family calls do not return stat buf from read child) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=138
* Return stat info from read-child in all the inode-write opsVikas Gorur2009-07-272-18/+205
| | | | | | | | | | | Also modifies the inode-write ops to wait for the call to read-child to return (whether success or failure) before unwinding. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 125 (stat information not returned from the same subvolume always) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=125
* Do not failover readdir in replicateAnand Avati2009-07-171-34/+18
| | | | | | | | | | | | Backport of http://patches.gluster.com/patch/561/ to release-2.0 Also, the failover version of afr_readdir_cbk is buggy and crashes when it is called after a failover inevitably Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 150 (AFR readdir should not failover to other subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=150
* server: don't check for 'loc->parent' in entrylk and inodelk callsAmar Tumballi2009-07-171-4/+2
| | | | | | | | | | | | the lock operation on entry or inode is going to happen on only one inode, and it doesn't need dentry (with info on parent) for the lock operation to complete. Hence, in server_{inode,entry}lk() calls after server_loc_fill, we -should not- be checking for parent inode. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* change mount.glusterfs.in to work with non-bash shells too.Amar Tumballi2009-07-171-3/+3
| | | | | | | | | | | | removed 'fuction ' prefix to function definitions which was very much /bin/bash specific. Thanks to Brent A. Nelson <brent@phys.ufl.edu> for the patch. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 139 (tiny glitch in mount.glusterfs in 2.0.4) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=139
* Add a random initial offset to the afr round robin indexErick Tryzelaar2009-07-161-0/+3
| | | | | | | | | | | | | | | This patch helps to distribute load across an afr cluster when you have clients with the same access patterns, such as in benchmarking or map-reduce. By randomly offsetting the initial read_child_rr, clients should distribute reads over the afr nodes on average. A better solution could be to randomly shuffle the children instead of chosing a different initial offset. This should average the reads better across the nodes, but I'm not sure if there are any other consequences to doing this. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* fuse-bridge: Export user.glusterfs-booster-mount xattrShehjar Tikoo2009-07-161-0/+3
| | | | | | | | | | | | | | | This needs to be exported in order to have the booster Mount Point Bypass technique work through libglusterfsclient. Booster uses the mount point to register with libglusterfsclient as a VMP. Subsequently, all file operations on the mounted GlusterFS mount point get redirected to libglusterfsclient. This fixes bug 136. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 136 (booster does not redirect ops on GlusterFS mount point into libglusterfsclient) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=136
* Return inode number always from the first up subvolume in AFR.Vikas Gorur2009-07-092-10/+16
| | | | | | | Also fixes a bug in the "KLUDGE" part. It was setting lookup_buf when it should have been setting local->cont.lookup.buf Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* detabify fuse-bridge.c (and other whitespace fixes)Csaba Henk2009-07-081-738/+738
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* protocol/server: use translated flags in protocol/server open and create fopsAnand Avati2009-07-071-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* protocol/client: use translated flags in protocol/client open and create fopsAnand Avati2009-07-071-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* write-behind: set default window-size to 1MB.Raghavendra G2009-07-071-1/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* use fuse_reply_iov() in fuse_readv_cbkBasavanagowda Kanur2009-07-071-0/+4
| | | | | | | | | | | | changes come in two places. configure.ac - define HAVE_FUSE_REPLY_IOV if fuse_reply_iov is available in libfuse. mount/fuse - use fuse_reply_iov() in place of fuse_reply_vec(), if HAVE_FUSE_REPLY_IOV is defined. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Set timestamps properly when creating missing entries.v2.0.3Vikas Gorur2009-07-061-3/+37
| | | | | | | In AFR self-heal set timestamp of a freshly created missing entry to that of the source entry. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* performance/write-behind - bug fix in open() and create().Basavanagowda Kanur2009-07-021-1/+5
| | | | | | | | open() & create() calls should reset frame->local to NULL. bz# 104 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* fuse 2.8 support for xlator/fuseHarshavardhana2009-07-012-0/+23
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Fix typos in my previous commit 6010e2a4eCsaba Henk2009-07-011-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* fuse: instead of having a fixed option list, assemble it using ↵Csaba Henk2009-07-011-56/+40
| | | | | | | | "fuse_opt_add_arg" This makes it easier to adjust the option list, and also reduces redundancy. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* build warning fixesAmar Tumballi2009-06-301-2/+2
| | | | | | integer typecast warnings fixed Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* enhancement in write-behindAmar Tumballi2009-06-301-13/+22
| | | | | | | | | Write calls should not be pushed to background only when the mandatory locking is enabled, in all other cases (eg: O_SYNC, O_DIRECT etc), we should not be 'caching' any data, but the calls can be pushed to the background Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* client_xattrop: use dict_allocate_and_serialize during serializing xattrRaghavendra G2009-06-301-10/+7
| | | | | | | | - though the previous commit fixes bug #29, this patch fixes bugs arising in similar situations where xattrop is initiated by xlators other than afr. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cluster/afr - use different dictionaries for sending xattrop requests to ↵Basavanagowda Kanur2009-06-301-24/+50
| | | | | | | | | | | | | | | | each of the subvolume - This patch fixes bug #29. - Using separate copies of dictionaries also eliminates a potential bug in a setup consisting of afr with a posix and client, each having io-threads on top as children. Since posix_xattrop after performing required operations on the xattr array passed in dictionary, sets the result at the same key and in the same dictionary passed as input argument, there can be race conditions where in the results of the operation on posix-child can be sent to the other child as input argument for xattrop, which ofcourse is wrong. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* client: Replace saved_fds dict with listShehjar Tikoo2009-06-302-158/+177
| | | | | | | | | | | Thhie change removes a huge inefficiency in file open path where every open resulted in dictionary operations in order to let the client maintain a list of fd_t's being used over a particular client context. Resolves: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=16 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Turn fd-table O(1)Shehjar Tikoo2009-06-301-16/+16
| | | | | | | | | 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>
* Fix some trivial typos.Erick Tryzelaar2009-06-291-1/+1
| | | | | | | I noticed that there were some minor spelling mistakes/typos in some of the source files. This patch fixes the ones I've found. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* version check between client/server made more specific to protocol only.Amar Tumballi2009-06-292-9/+9
| | | | | | | | | 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>
* 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>
* 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>
* 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>
* 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-091-6/+10
| | | | | | | | | | 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>