summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
Commit message (Collapse)AuthorAgeFilesLines
...
* 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: entry self-heal: Store parent_loc on the heap for ↵Vikas Gorur2009-10-221-7/+12
| | | | | | | | | impunge_parent_setattr. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 137 (Parent directory mtime not reset after a create in self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=137
* cluster/afr: entry self-heal: Set parent directory's attributes using a new ↵Vikas Gorur2009-10-221-24/+20
| | | | | | | | | | | | | | | | | | | | | frame. There was a race condition in assuming that afr_sh_entry_impunge_parent_setattr_cbk will always return before impunge_xattrop_cbk and impunge_setattr_cbk. This patch fixes two additional problems: 1) Building the parent_loc from impunge_local->loc after STACK_WIND to impunge_xattrop_cbk has happened. In a simple afr-posix configuration the stack will have been destroyed by the time building of parent_loc is attempted. 2) parent_loc built in impunge_newfile_cbk was not being loc_wipe'd. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 137 (Parent directory mtime not reset after a create in self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=137
* 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
* distribute - more NULL checkAnand V. Avati2009-10-161-3/+21
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* distribute,nufa: layout handling changesAnand V. Avati2009-10-167-136/+209
| | | | | | | | | | changes to make revalidate not fail but instead perform fresh lookup and swap inode context (layout) safely Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* fix double initialization of dht_local_tAnand V. Avati2009-10-161-7/+0
| | | | | | | | | | This was causing leak of the first initialized frame->local in every create call Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* NULL checks on local->loc.parentAnand V. Avati2009-10-161-17/+36
| | | | | | | | | | | check for presence of local->loc.parent != NULL before defering to pick ino for post/preparent parameters. local->loc.parent can be NULL legally when loc is describing "/" Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* 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
* cluster/afr: Set mtime of parent directory in self-heal properly.Vikas Gorur2009-10-133-5/+93
| | | | | | | | | | | While creating/deleting an entry as part of entry self-heal, set the parent directory's mtime to match that on the source subvolume. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 137 (Parent directory mtime not reset after a create in self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=137
* 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
* cluster/dht: Change STACK_UNWIND to STACK_UNWIND_STRICT.Vikas Gorur2009-10-084-98/+107
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 269 (Add a specialized STACK_UNWIND macro for each FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=269
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-0742-42/+42
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cluster/afr: Change STACK_UNWIND to STACK_UNWIND_STRICT.Vikas Gorur2009-10-076-98/+136
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 269 (Add a specialized STACK_UNWIND macro for each FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=269
* Removed remaining references to chmod, chown and utimens as part of setattr ↵Pavan Sondur2009-10-062-20/+18
| | | | | | | | | | | changes. Removed references to chmod, chown and utimes. Removed utimes references in AFR and writebehind. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
* unify: Support readdirp fopShehjar Tikoo2009-10-061-0/+24
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* map: Support readdirp fopShehjar Tikoo2009-10-061-13/+91
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* ha: Support readdirp fopShehjar Tikoo2009-10-061-18/+47
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* distribute: Support readdirp fopShehjar Tikoo2009-10-062-5/+112
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* afr: Support readdirp fopShehjar Tikoo2009-10-063-10/+77
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* 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
* distribute: NFS-friendly logic changesShehjar Tikoo2009-10-014-101/+320
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* ha: Handle memory allocation failuresShehjar Tikoo2009-10-012-15/+618
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* ha: NFS-friendly logic changesShehjar Tikoo2009-10-012-22/+46
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* stripe: NFS-friendly logic changesShehjar Tikoo2009-10-012-199/+361
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* unify: NFS-friendly logic changesShehjar Tikoo2009-10-013-112/+140
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-0118-204/+809
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: Introduce setattr and fsetattr fopsShehjar Tikoo2009-10-0117-2155/+814
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
* 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: Fix memory leak in "diff" self-heal algorithm.Vikas Gorur2009-09-241-0/+30
| | | | | | | | | FREE sh->private after diff self-heal is done. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 281 (memory leak in "diff" self heal algorithm) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=281
* cluster/afr: Add new option "data-self-heal-algorithm"Vikas Gorur2009-09-225-3/+36
| | | | | | | | | | option: data-self-heal-algorithm type: string default: "full" This option allows the user to specify the algorithm to be used for data self-heal. Currently supported values are "full" and "diff". Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cluster/afr: Add the "diff" self-heal algorithm.Vikas Gorur2009-09-223-2/+362
| | | | | | | | | | | The "diff" self-heal algorithm works as follows: For each block: Compute MD5 checksum on source and all sinks If checksum on a sink differs from source: Read block from source and write to sinks Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cluster/afr: Make the self-heal algorithm pluggable.Vikas Gorur2009-09-225-168/+287
| | | | | | | | Abstract the read/write loop part of data self-heal. This patch has support for the "full" (i.e., read and write entire file) algorithm. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cluster/afr: Open source and sinks in read/write mode during self-heal.Vikas Gorur2009-09-221-2/+2
| | | | | | | Since a self-heal algorithm (e.g., rsync) might want to both read and write from both the source and sink files, open them as O_RDWR. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Dumop inodectx addedVijay Bellur2009-09-161-0/+29
| | | | | | | | | | Added dumpop inodectx. Support for dumop inodectx added in dht, locks and client-protocol. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* cluster/dht: Support for dumpop priv.Vijay Bellur2009-09-161-0/+134
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* cluster/stripe, when dbench is run, client crashes because in stripe.c priv ↵Vinayak Hegde2009-09-161-1/+4
| | | | | | | | | is dreferenced without initialising. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 266 (In stripe client crashes after some time when disk space is full) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=266
* 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
* cluster/afr: Do not try to self-heal "/"Vikas Gorur2009-09-081-8/+16
| | | | | | | | | | If the root directory does not exist on a subvolume, don't try to create it. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 28 (Deleting a backend export directory in an AFR setup can cause a segfault while trying to self heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=28
* TAKE2[PATCH BUG:213 1/1] Support for Process State DumpVijay Bellur2009-08-191-0/+59
| | | | | | | | | Support for process state dump. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* 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
* 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