summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
Commit message (Collapse)AuthorAgeFilesLines
* dht: initialize layout typeAnand Avati2010-01-233-5/+6
| | | | | | | | | | | Instead of relying on CALLOC's zero initialization which happens to be the value of DHT_HASH_TYPE_DM, explicitly set the value Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 523 (Hash type is not initialized in dht_layout_new) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=523
* 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
* stripe entry self healAmar Tumballi2010-01-191-10/+97
| | | | | | | | | | | Create the entry (either regular file or directory), when its missing in some of the subvolumes and available on some. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 535 (stripe entry self-heal..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=535
* 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/unify: don't call xl_init_tree on namespace node.Raghavendra G2010-01-141-11/+0
| | | | | | | | | | | | | | | | | | | | - just before xl_init_tree call on namespace, unify node is set as parent of namespace node and since xl->ready of unify node is set only after return from init call, calling xl_init_tree on namespace node will result in execution of init of unify node for the second time. This results in following bugs: * since during second execution, parent of namespace node is unify, init of unify xlator fails. * even if init did not fail, re-execution of init in itself is bad, since it results in memory leaks etc. Worse, it can result in infinite recursive calls into init of unify node. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 518 (unify does not start) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=518
* 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
* properly ref/unref fd in stripe_opendir_cbkAmar Tumballi2009-12-221-0/+5
| | | | | | | | | | fixes the crash due to dereferencing NULL fd pointer Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 497 (Client crashes in fuse_fd_cbk while running ltp tests) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=497
* distribute: Dont dereference sbuf on failed readlink_cbkShehjar Tikoo2009-12-181-0/+4
| | | | | | | | | | | This fixes a crash that was caused due to a NULL pointer deref because a NULL sbuf is returned if the readlink fop fails. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 492 (distribute crashes in readlink) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=492
* cluster/dht: Check for pointers before de-referencing in dht_stat_merge()Vijay Bellur2009-12-161-0/+3
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 463 (Crash in dht_stat_merge ()) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=463
* more cleanup in stripe stat structuresAmar Tumballi2009-12-151-335/+83
| | | | | | | | | | Removed few more 'fops' from stripe. More cleaner stat structure return. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 340 (Kernel Compilation fail in stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=340
* 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
* Save st_dev properly in stbuf.st_dev from the same subvolume.Harshavardhana Ranganath2009-12-061-1/+1
| | | | | | | | Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
* distribute: more cases of st_dev settingAnand Avati2009-12-061-1/+4
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
* distribute: return st_dev from the same subvol from where itransform is ↵Anand Avati2009-12-062-0/+5
| | | | | | | | | | | | | | performed distribute should return st_dev from the same subvolume it itransforms the inode number. this is to ensure that there will not be false replacements of inodes in inode management Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
* THIS: set THIS pointers before forget/release/releasedir callbacksAnand Avati2009-12-061-1/+1
| | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* 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
* corrected the stripe's stat structure return logic.Amar Tumballi2009-12-062-354/+260
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 340 (Kernel Compilation fail in stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=340
* 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
* posix-compliance test now passes over stripeAmar Tumballi2009-12-031-36/+51
| | | | | | | | | | | | | * needed to have ctime in the statbuffer from first subvolume. * unlink should be sent to all subvolumes no matter what. (earlier it was sent to all nodes only in case of regular files, causing directory not empty type of errors in 'rm -rf' cases) Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 321 (over distributed-stripe set-up, annihilate.sh fails.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=321
* 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
* fix leaks pointed out by cppcheck static analyzerCsaba Henk2009-11-301-1/+3
| | | | | | | | | | | | | | | | | | | See http://cppcheck.sf.net [./build/libglusterfs/src/y.tab.c:2104]: (error) Memory leak: cmd [./libglusterfs/src/md5.c:306]: (error) Resource leak: f [./xlators/debug/io-stats/src/io-stats.c:1396]: (error) Possible null pointer dereference: this - otherwise it is redundant to check if this is null at line 1402 [./xlators/cluster/stripe/src/stripe.c:3597]: (error) Memory leak: dup_str [./xlators/debug/trace/src/trace.c:2426]: (error) Possible null pointer dereference: this - otherwise it is redundant to check if this is null at line 2429 These appear in rarely hit error cases or test/demo code so nothing serious, in fact. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 420 (fix leaks pointed out by cppcheck static analyzer) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=420
* 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
* moved unify from 'cluster/unify' to 'legacy/cluster/unify'Amar Tumballi2009-11-281-1/+1
| | | | | | | | | | | | maintaining unify is not feasible, and its design of namespace is not scalable too. hence moving it to 'legacy/' directory.. Thanks to unify, we learnt something about rename(). 'cluster/unify' has served GlusterFS well for more than 2years, and its the time to say goodbye :-( Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* fixes in nufaAmar Tumballi2009-11-263-96/+92
| | | | | | | | | | | | | | | Now nufa uses dht_conf->private variable to store its contents, and doesn't pollute distribute's structures. It used to hang earlier as layout_lock was not INIT()'d. whitespace-cleanup done on the code too. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 409 (implement a switch scheduler) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=409
* switch translator addedAmar Tumballi2009-11-263-1/+1059
| | | | | | | | | | | switch translator is a wrapper around distribute to work for a pattern based scheduling. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 409 (implement a switch scheduler) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=409
* don't allow stripe with just one subvolumeAmar Tumballi2009-11-261-1/+7
| | | | | | | | | | | | stripe code assumes in many places that it will have more than one subvolume, but the strict check was not there in init, hence, if somebody configures stripe with just one subvolume, it will cause many fops with frame loss. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 340 (Kernel Compilation fail in stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=340
* 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