summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
Commit message (Collapse)AuthorAgeFilesLines
* cluster/afr: Fix possible NULL dereference in readdirp_cbkv3.0.4rc1Vikas Gorur2010-03-171-16/+18
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 722 (Segfault in glusterfs 3.0.3 replicate/afr_readdirp_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=722
* dht: preserve and return proper pre/postparent structures during unlinkAnand Avati2010-03-041-1/+3
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 689 (Segfault (11) on op UNLINK) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=689
* 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
* stripe read fix (when read() is done on a sparse file over glusterfs)Amar Tumballi2010-03-012-12/+69
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 536 (fsx tool fails over stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=536
* dht: fix READDIR semantics which got broken in ↵Anand Avati2010-02-231-30/+21
| | | | | | | | | | 512dcad823feb199d78f5b66a09bc404ccb899e8 Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 584 (automatically configure 'lookup-unhashed' option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=584
* dht: fix leak introduced in 137f94ed123b1c7c7ada541aaa599679e19888f6Anand Avati2010-02-221-1/+4
| | | | | | | | | | | dht_layout_t was getting leaked in dht_readdirp_cbk when dht_layout_get was called but was not unref'ed Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 584 (automatically configure 'lookup-unhashed' option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=584
* dht: unlink stale linkfiles in rmdir to prevent ENOTEMPTYAnand Avati2010-02-223-14/+244
| | | | | | | | | | | | Thanks to He Xaobing <allreol@gmail.com>, this patch is inspired by http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=188#c2 Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 188 ([ glusterfs 2.0.6rc2 ] - "Directory not empty" on rm -rf) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=188
* cluster/stripe: Set op_ret as failure if inode is not being set in lookup cbkVijay Bellur2010-02-201-1/+2
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 560 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=560
* 'lookup-unhashed' option of distribute should be 'auto' by default.Amar Tumballi2010-02-065-22/+76
| | | | | | | | | | | | | | * Added 'auto' option, older boolean options works as they used to. * This option should make 'create' rate faster, also handles self-healing of linkfile properly in case of scaling to more servers or filesystem is getting full. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 584 (automatically configure 'lookup-unhashed' option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=584
* cluster/dht: Check for size 0 in check_is_linkfile()Vijay Bellur2010-01-281-1/+3
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 574 (Sticky bit files are not listed in the output of ls on a dht volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=574
* 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