summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* Preserve atime/mtime during data self heal.Vikas Gorur2009-05-261-8/+51
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* stripe init 'block-size' pattern parsing bug fixed.2.0.1Amar Tumballi2009-05-081-59/+78
| | | | | | ref: http://savannah.nongnu.org/bugs/?26416 Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Set op_errno properly in afr_flush.Vikas Gorur2009-05-081-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* afr self-heal: update file size of the returning stat buf with source file's ↵Anand V. Avati2009-05-061-0/+1
| | | | size
* Do not lock entire file for metadata operations.Vikas Gorur2009-05-052-8/+8
| | | | | | | | Metadata operations now lock only a single byte at offset (LLONG_MAX - 1) instead of the whole file, to avoid contention with writev(). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Made afr_flush a 'quick-unwind' transaction.Vikas Gorur2009-05-051-6/+67
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* cluster/unify - unify_forget() should not try to access inode->ctx, if ↵Basavanagowda Kanur2009-04-301-1/+1
| | | | | | inode->st_mode is not set. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* dht logging cleanupAnand V. Avati2009-04-283-10/+14
|
* afr logging cleanupAnand V. Avati2009-04-284-52/+45
|
* log message cleanup in distributeAnand V. Avati2009-04-249-291/+242
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Cleaned up log messages in replicate.Vikas Gorur2009-04-2410-186/+179
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Do not fail lookup() in case of split-brain.Vikas Gorur2009-04-231-6/+0
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* "option unhashed-sticky-bit on/off"krishna2009-04-233-5/+25
| | | | | | | | "option unhashed-sticky-bit on/off" will configure distribute to set or not the S_ISVTX bit in the stat.st_mode of the actual file in case it is pointed to by the link file. This can be enabled during migration. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* replicate dir self-heal - when creating a missing dir/file, set pending ↵Anand V. Avati2009-04-231-13/+68
| | | | xattrs on source subvolume for that dir/file
* fix in afr directory self-heal (partial healing)Anand V. Avati2009-04-231-0/+5
| | | | impunge loop was 'continued' on a different subvolume in certain cases, resulting in healing of partial files
* afr_lookup_cbk - self-heal getting missedAnand V. Avati2009-04-221-25/+25
| | | | | | | | compare for mismatching sizes and attributes before overwriting local->stbuf for read-child subvolume. This causes files with differing sizes on backed not to get self-healed if xattrs were missing. Also add the ESTALE check for compulsorily failing revalidates in case of 2nd unwind and beyond Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Check return value of afr_sh_select_source.Vikas Gorur2009-04-203-1/+18
| | | | | | If select_source returns -1, abort self-heal. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Minor fix in afr_sh_build_pending_matrix.Vikas Gorur2009-04-201-3/+0
| | | | | | Remove incorrect check for xattr[i] being NULL. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* afr-transaction: handle double flushesAnand V. Avati2009-04-201-1/+3
| | | | __if_fd_pre_op_done - reset fd_ctx->pre_op_done to 0 so that double flushes do not result in two xattrop() calls
* Fix two memory leaks in afr self heal code.Vikas Gorur2009-04-171-0/+4
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fixed parameter to finodelk in STACK_WIND in dhtVikas Gorur2009-04-171-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Use original pid when calling the FOP in afr transaction.Vikas Gorur2009-04-162-3/+42
| | | | | | | | Save the original pid while locking and restore it after the FOP is done. This ensures posix-locks can release locks (fcntl) properly. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* cluster/distribute bug fix - try to create linkfile in ↵Basavanagowda Kanur2009-04-163-16/+68
| | | | | | | | dht_lookup_everywhere_cbk(), only if hashed subvolume can be determined, else error out with ENOENT. -- with local fixes (avati) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Changed xattr format of afr changelog to support adding and removing of ↵Vikas Gorur2009-04-1611-287/+322
| | | | | | subvolumes while keeping existing data. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* cluster/unify link() should be sent to only one subvolume.Basavanagowda Kanur2009-04-141-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* bug fixes in dht-disk-usage feature.Amar Tumballi2009-04-144-35/+72
| | | | | | fixes bugs seen with dht's disk usage. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Send statbuf from the same subvolume, even across revalidates.Vikas Gorur2009-04-131-5/+14
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>