summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
Commit message (Collapse)AuthorAgeFilesLines
* iatt: changes across the codebaseAnand V. Avati2010-03-1615-333/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - libglusterfs -- call-stub -- inode -- protocol - libglusterfsclient - cluster/replicate - cluster/{dht,nufa,switch} - cluster/unify - cluster/HA - cluster/map - cluster/stripe - debug/error-gen - debug/trace - debug/io-stats - encryption/rot-13 - features/filter - features/locks - features/path-converter - features/quota - features/trash - mount/fuse - performance/io-threads - performance/io-cache - performance/quick-read - performance/read-ahead - performance/stat-prefetch - performance/symlink-cache - performance/write-behind - protocol/client - protocol/server - storage-posix Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
* replicate: Use link's parent ino for post/pre-parent not target dir'sShehjar Tikoo2010-03-041-1/+1
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
* replicate: Restore parent ino from saved inode numberShehjar Tikoo2010-03-041-0/+3
| | | | | | | | | | | | Not doing this was resulting in a 0 inode number being returned in postparent on lookup, which in turn results in a ESTALE at the NFS client since an inode number change was observed. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
* cluster/afr: Failover readdir calls.Vikas Gorur2010-03-044-46/+299
| | | | | | | | | | | | | | | | This patch makes the replicate readdir call fail over to the next subvolume if the first call fails. It takes care to ensure that entries are not duplicated. The failover behavior of readdir only comes into effect if the option 'strict-readdir' is on. Signed-off-by: Vikas Gorur <vikas@dev.gluster.com> Signed-off-by: root <root@client02.(none)> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 453 (afr_readdir does not fail over) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=453
* Fix memory access in afr's self-heal code (replace pointer casts by memcpy).Hraban Luyat2010-02-071-24/+30
| | | | | | | | | | | | | | | | The previous patch I submitted for this file (afr's self-heal code) introduced a terrible error. I overlooked the error checking in the original code and misplaced the memcpy (too early). So, please disregard the last one, this one is better :) hopefully. Apologies. Signed-off-by: Hraban Luyat <hraban@0brg.net> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 493 (tcp + dht + armv5tel: “brick: disk layout has invalid count 29696”) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=493
* cluster/afr: Send the struct flock returned by the server to the user.Vikas Gorur2010-01-211-1/+1
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@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: Pick a source for metadata self-heal even if all nodes are ↵Vikas Gorur2010-01-141-0/+28
| | | | | | | | | | | | | | | innocent. If metadata changelog has been disabled, all subvolumes will be innocent. In that case, simply pick the subvolume on which the file has the lowest uid as the source and sync other subvolumes to it. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 451 (metadata self-heal does not a pick a source if mode/times have been changed at the backend) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=451
* cluster/afr: Use dict_ref instead of dict_copy_with_ref.Vikas Gorur2010-01-081-2/+2
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 509 (Crash in afr_local_cleanup ()) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=509
* cluster/afr: Allocate diff algorithm loop_state structures only once.Vikas Gorur2009-12-282-47/+167
| | | | | | | | | | | | Instead of CALLOC'ing a loop_state structure at the beginning of every loop, keep a table of allocated structures and reuse them. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* cluster/afr: Report number of blocks healed during diff self-heal.Vikas Gorur2009-12-282-1/+18
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* cluster/afr: Sync the parent directory's mtime during missing entries self-heal.Vikas Gorur2009-12-071-6/+26
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> 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: Don't do entry self-heal in the background.Vikas Gorur2009-12-071-5/+0
| | | | | | | | 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: Hold inode lock on 0-infinity for a flush transaction.Vikas Gorur2009-12-071-1/+1
| | | | | | | | 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
* afr: fix fd ref leak in self-healAnand Avati2009-12-061-1/+3
| | | | | | | | | | sh->healing_fd should be ref'ed only when healing_fd_opened is not set Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Fix inode_ref's for local->cont.lookup.inodeVikas Gorur2009-12-051-4/+8
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* afr: fix memory leaksAnand Avati2009-12-043-14/+36
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Don't mark the fop as failed if rmdir returns ENOTEMPTY.Vikas Gorur2009-12-031-1/+1
| | | | | | | | | | | Marking the fop as failed in the ENOTEMPTY case led to spurious entry self-heals. 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: Don't do transactional flush if pre-op has been nowhere done.Vikas Gorur2009-12-031-18/+106
| | | | | | | | | | | If a pre-op has not been done on any subvolume at all, there is no reason to make flush a transaction call. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 427 (flush on a file opened read-only should not hold locks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=427
* cluster/afr: Add log messages when setattr fails in self-heal.Vikas Gorur2009-12-022-0/+14
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> 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: Fix conditional typo.Vikas Gorur2009-12-021-1/+2
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* storage/posix: Added janitor thread.Vikas Gorur2009-12-024-17/+16
| | | | | | | | | | | | | | | | | | The janitor thread deletes all files and directories in the "/" GF_REPLICATE_TRASH_DIR directory. This directory is used by replicate self-heal to dump files and directories it deletes. This is needed because letting replicate walk the directory tree and delete a directory and all its children is too racy. Instead, replicate self-heal only does an atomic rename(), and the janitor thread takes care of actually deleting them. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 227 (replicate selfheal does not remove directory with contents in it) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=227
* fixes to compile on MacOSX (no fuse client)Amar Tumballi2009-12-011-1/+1
| | | | | | | | | | | | | | | These changes are required to make GlusterFS compile on MacOSX (10.5). Currently glusterfs server component alone will work over Mac, and it has to be built with following options to ./configure. "bash$ ./configure --disable-fuse-client --disable-fusermount " Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
* afr: remove memcpy of @local contents in afr_local_copyAnand Avati2009-12-011-8/+23
| | | | | | | | | | | | copy out members which are needed. memcpy of full local causes a copy of pointers without references and results in various corruption errors Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* afr: fix fd reference leakAnand Avati2009-12-011-1/+1
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Don't do memcpy of afr_local_t in afr_local_copy.Vikas Gorur2009-12-013-20/+7
| | | | | | | | | | | | For the background self-heal frame's local_t, copy only required members --- not a wholesale memcpy. The memcpy lead to pointers being copied and then double free'd. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* cluster/afr: Set file size properly before unwinding from self-heal.Vikas Gorur2009-12-011-2/+5
| | | | | | | | | | | Set the buf.st_size of the original frame's afr_local_t, and not the copy_frame'd one. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* cluster/afr: Set the self-heal "source" as read subvolume even when not ↵Vikas Gorur2009-12-015-29/+117
| | | | | | | | | | | | | | doing self-heal. This patch sets the read-subvolume equal to the self-heal "source" even if we're not doing self-heal (because some one else is already doing it). Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* cluster/afr: Preserve generation number along with inode in lookup and ↵Vikas Gorur2009-11-303-3/+26
| | | | | | | | | | | | | creation fops. This fixes fuse_create_cbk conflict warnings and random errors while running dbench (typically open handle failure with ENOENT). Signed-off-by: Vikas Gorur <vikas@gluster.com> 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
* cluster/afr: Refactored lookup_cbk and introduce precedence of errors.Vikas Gorur2009-11-302-117/+303
| | | | | | | | | | | | | Error handling in afr_lookup_cbk was faulty because it did not give priority to errors such as ESTALE over ENOENT, and ENOENT over other errors. This patch fixes that, and also breaks up afr_lookup_cbk into multiple logical functions. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 205 ([ glusterfs 2.0.6rc4 ] - Hard disk failure not handled correctly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=205
* afr: fix crash in afr_sh_data_closeAnand Avati2009-11-291-0/+3
| | | | | | | | | | | | when active_sink count is 0, the code proceeded into a dangerous loop resulting in a crash while issuing the call or in the callback afr_sh_data_setattr_cbk or afr_sh_data_flush_cbk Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* afr: handle fdctx->pre_op_done handlingAnand Avati2009-11-291-0/+1
| | | | | | | | | | | | reset pre_op_done[i] to 0 after issuing a postop in flush. this was missed during the introduction of pre_op_done[] array and was resulting in a lot of spurious self heals when spurious flushes were received Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* afr: fix logic to break out of diff/checksum loopAnand Avati2009-11-281-9/+5
| | | | | | | | | | | | When checksum fop returns error, mark for terminating the loop at the end of the iteration (when all checksum calls of that iteration return) and not immediately Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* cluster/afr: Include "common-utils.h" instead of alloca.hVikas Gorur2009-11-261-1/+1
| | | | | | | | | | | alloca.h should be included on a platform-specific basis. Lets common-utils.h handle that. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 349 (FreeBSD compilation error (alloca.h).) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=349
* cluster/afr: Do self-heal on unopened fds.Vikas Gorur2009-11-256-26/+232
| | | | | | | | | | | | | | This patch completes the previous patch for self-heal of open fds in replicate. If an fd was never opened on a subvolume, we remember that and do the open after we've done self-heal on that fd. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Refactored the self-heal interface.Vikas Gorur2009-11-249-167/+141
| | | | | | | | | | Cleaned up the self-heal interface to callers. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Do self-heal on reopened fds.Vikas Gorur2009-11-2410-229/+699
| | | | | | | | | | | | | | | | | | | | | | | This patch brings in partial support for self-heal of open fds. The precondition is that the fd should have been opened successfully during the initial open() (or create()), and we assume that protocol/client has successfully reopened the fd when the subvolume comes back up. It works by doing an "up/down flush" (a dummy flush transaction to do post-op wherever necessary) and then triggering data self-heal on the file in the post-post-op hook of the dummy flush transaction. This ensures that any writes that come in during self-heal will wait until self-heal completes. The up/down flush is also done when a subvolume goes down, so that post-op is done on all subvolumes where pre-op was done. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Provide a post-post_op hook in the transaction.Vikas Gorur2009-11-242-6/+23
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Refactored the data self-heal algorithm.Vikas Gorur2009-11-242-143/+248
| | | | | | | | | | | | | | | | | | Refactored the operation of the data self-heal algorithm as: * open all fd's (if fd not supplied by caller) * lock 0-0 (if lock not supplied by caller) * fxattrop, fstat (instead of lookup) ... self heal ... * unlock (if lock not supplied by caller) * close (if fd not supplied by caller). Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Hold blocking locks for data self-heal.Vikas Gorur2009-11-244-35/+62
| | | | | | | | | | | Data self-heal now holds blocking locks, and instead of locking on all subvolumes, it only locks on {data-lock-server-count} subvolumes. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Set read-child = source regardless of foreground/background ↵Vikas Gorur2009-11-241-1/+2
| | | | | | | | | | self-heal Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/afr: Fix inode context bitmasks.Vikas Gorur2009-11-244-17/+11
| | | | | | | | | | | Set opendir_done and split_brain flags correctly in the inode context. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* cluster/afr: Fix double-free in opendir self-heal callback.Vikas Gorur2009-11-241-1/+4
| | | | | | | | | | | local->cont.opendir.checksum was being free'd both in the self-heal completion function and self-heal unwind. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* cluster/afr: Unlock only those paths which have been locked during rename.Vikas Gorur2009-11-241-77/+142
| | | | | | | | | | | 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: Fix handling of revalidate lookups.Vikas Gorur2009-11-242-24/+38
| | | | | | | | | | | | | | | | This patch does two things related to revalidate: 1) If a revalidate fails on any subvolume, the entire lookup call is failed. 2) Self-heal is not triggered on a revalidate if revalidate has failed on any subvolume. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 389 (auto-heal fails randomly and causes "Stale NFS file handle" errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=389
* cluster/afr: Handle op_ret properly in opendir_cbkVikas Gorur2009-11-191-2/+3
| | | | | | | | | | | Change the success condition to op_ret >= 0 instead of op_ret == 0. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* cluster/afr: Fix self-heal loop driver termination logic.Vikas Gorur2009-11-131-7/+19
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
* cluster/afr: Ensure directory contents are in sync during opendir.Vikas Gorur2009-11-135-10/+281
| | | | | | | | | | | | | | | | | | | | | | The problem: If some files on the first subvolume disappeared without leaving a trace in the entry changelog (this can happen, for example, when an fsck has deleted files or when a hard drive is replaced), those files would never be self-healed even though they would be present on the second subvolume. This is because readdir is sent only to the first subvolume, and since the files don't appear in the directory listing, no lookup would ever be sent on them. This patch fixes this problem by doing a readdir on all the subvolumes during the first opendir on a directory inode. If a discrepancy in the contents is detected, entry self-heal in a special "force merge" mode is triggered on that directory. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* cluster/afr: Refactored inode context bitmasks.Vikas Gorur2009-11-131-6/+10
| | | | | | | | | | | Defined symbolic constants for the bit masks and made 'split-brain' a single bit field in the ctx. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* cluster/afr: In fop structure afr_readdirp is not correctly registered.vinayak hegde2009-11-051-1/+1
| | | | | | | | Signed-off-by: Vinayak Hegde <vinayak@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 360 (All fop fails when stat-prefetch is loaded on afr.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=360
* cluster/afr: Bail out of the self-heal driver loops as soon as possibleVikas Gorur2009-11-031-4/+4
| | | | | | | | | | | | Don't wait for the next recursive call to sh_{full,diff}_loop_driver to decide that we've reached the end of file, as the frame could have been destroyed by that time (if subvolumes are posix). Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320