summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add null pointer checks in "fini"Harshavardhana Ranganath2010-01-231-1/+6
| | | | | | | | Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 364 (Segfault in io-cache) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=364
* cluster/distribute: copy the stat structure while copying dentries in ↵Raghavendra G2009-11-191-0/+2
| | | | | | | | | | | | | readdir_cbk. - only the transformed inode number was being copied, leaving other fields of stat 0. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 371 (rm -rf fails on stat-prefetch.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=371
* 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
* shuffle hash layouts on directoriesAnand Avati2009-10-151-2/+44
| | | | | | | | | | | allow for hash layouts to be written differently for different directories to give a better spread for same filenames across directories Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 324 (distribute does not spread files of the same name among all servers) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=324
* 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
* added few missing options in translator's option arrayAmar Tumballi2009-10-071-0/+3
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-0739-39/+39
| | | | 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
* dht_stat_merge - use the highest uid when ambiguousAnand Avati2009-08-041-2/+3
| | | | | | | | | When directories on different subvolumes have different ownerships, use the highest uid/gid till self-heal resolves the inconsistency Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 191 (random Permission denied errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=191
* 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>