summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
Commit message (Collapse)AuthorAgeFilesLines
* Unwind lk using struct flock from a successful serverRaghavendra Bhat2010-05-111-1/+2
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 882 (directory traversing problem (client crash)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=882
* cluster/afr: Send the struct flock returned by the server to the user only ↵Pavan Sondur2010-04-271-2/+2
| | | | | | | | | | in the UNWIND path. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 521 (SPECFS validation fails over distribute + replicate) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=521
* cluster/afr: Check for call_count in ENTRY_RENAME_TRANSACTION.Vijay Bellur2010-04-201-1/+2
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 824 (Crash in afr rename transaction) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=824
* cluster/afr: Send flock returned by locks xlator to user.Pavan Sondur2010-01-241-1/+1
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 521 (SPECFS validation fails over distribute + replicate) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=521
* cluster/afr: Don't try to self-heal if there are locks heldVikas Gorur2009-10-302-1/+18
| | | | | | | | | | | If the inodelk_count or entrylk_count is positive on a file/directory, don't try to do self-heal on it. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 326 ([2.0.8rc9] Spurious self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=326
* cluster/afr: Prevent spurious entry self-heal.Vikas Gorur2009-10-231-2/+13
| | | | | | | | | | | | | | If the initial lookup shows that 'pending' is positive, then self-heal will hold a lock and do a lookup again. This lookup might show that 'pending' is zero everywhere. However, entry self-heal used to consider this as a case of 'no sources' and try to merge the directories. This patch checks for that case and does not do the merge. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 326 ([2.0.8rc9] Spurious self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=326
* cluster/afr: Attempt to set fd ctx in create only if the call has succeeded.Vikas Gorur2009-10-201-10/+9
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 325 (crash in afr_fd_ctx_set) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=325
* cluster/afr: Unlock only those paths which have been locked during rename.Vikas Gorur2009-10-161-77/+141
| | | | | | | | | | | For ENTRY_RENAME_TRANSACTIONs, keep track separately whether the lower_path and the higher_path have been locked, and unlock only those which have been. 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: Hold lock on all names under "victim" in rmdirVikas Gorur2009-10-161-2/+23
| | | | | | | | | | | | | | When an rmdir is being done, hold a lock on all names under it, so that new entries cannot be created while the rmdir is in progress. Without this lock, rmdir and create operations under the victim directory race with each other leading to inconsistencies among the subvolumes. 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
* afr transaction: fix op_ret check during lockingAnand Avati2009-10-131-3/+3
| | | | | | | 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
* prevent spurious unlocks from afr selfhealAnand Avati2009-10-136-23/+90
| | | | | | | | | | afr selfheal now remembers all the nodes on which locks were successfully held and sends unlocks only to those nodes 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
* afr transaction prevent spurious unlocksAnand Avati2009-10-131-2/+4
| | | | | | | | | mark a subvol with held lock only if op_ret == 0 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: Hold second lock after first lock has been granted for rename ↵Vikas Gorur2009-10-121-30/+84
| | | | | | | | | | | | transactions. Hold the lock on the {higher_path} only after the lock on the {lower_path} has been granted successfully. 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
* replicate: fix missing frame in entry-self-healAnand Avati2009-10-121-0/+7
| | | | | | | | | | | when files on all backend nodes are missing, the logic in afr_sh_entry_erase_pending is broken and results in missing lookup frame. this causes processes to enter into uninterruptible sleep state. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 311 (missing frame (lookup) when entry-selfheal finds missing files in all backend nodes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=311
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-0718-18/+18
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cluster/afr: Initialize local->first_up_child in AFR_LOCAL_INIT.Vikas Gorur2009-10-052-29/+29
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 285 ("first up child" can change during a transaction) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=285
* cluster/afr: dir-write: Fix inode number handling.Vikas Gorur2009-09-282-24/+41
| | | | | | | | | | | | | | | | | | | create, mkdir, symlink, mknod: Prefer to return itransform'd inode number from the first_up_child. If not, fall back on any other child that returned succcess. link, rename: Return the same inode number that was passed as part of loc_t. Also adds a new member to afr_local_t, local->first_up_child which is initialized at the start of the transaction. This fixes the race where a subvolume might go down during the transaction and thus have the first_up_child change. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 285 ("first up child" can change during a transaction) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=285
* cluster/afr: Check op_ret in afr_getxattr_cbk before accessing dictVikas Gorur2009-09-081-1/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 250 (Crash in replicate getxattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=250
* Filter changelog xattrs in replicatev2.0.6Vikas Gorur2009-08-071-1/+64
| | | | | | | | | | | The AFR changelog xattrs, "trusted.afr.*" are now filtered and prevented from being visible on the mountpoint. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 9 (replicate's pending xattr's should not be visible on the mountpoint) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=9
* 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>
* 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>
* 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>
* 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>
* afr logging cleanupAnand V. Avati2009-04-284-52/+45
|
* 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>
* 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>