summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.c
Commit message (Collapse)AuthorAgeFilesLines
* Check return value of afr_sh_select_source.2.0.0rc8Vikas Gorur2009-04-201-1/+0
| | | | | | If select_source returns -1, abort self-heal. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Minor fix in afr_sh_build_pending_matrix.Vikas Gorur2009-04-201-3/+0
| | | | | | Remove incorrect check for xattr[i] being NULL. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix two memory leaks in afr self heal code.Vikas Gorur2009-04-171-0/+4
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Changed xattr format of afr changelog to support adding and removing of ↵Vikas Gorur2009-04-161-135/+104
| | | | | | subvolumes while keeping existing data. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Compulsorily do self heal if file sizes differ.Vikas Gorur2009-04-091-14/+85
| | | | | | | | | If file sizes differ, then compulsorily do self-heal. If no 'wise' sources are found, then pick a 'fool' with the biggest file size. If even 'fools' aren't found, pick the 'innocent' source with the biggest file size. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Handle files which have no pending xattrs at all.Vikas Gorur2009-04-091-1/+27
| | | | | | | | If a pending xattr key is non-existent on a file (call such files 'ignorant'), make all other non-ignorant subvolumes point towards the ignorant one. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Erase xattr during self-heal based on original dict.Vikas Gorur2009-04-091-3/+17
| | | | | | | | Decrement xattr during self-heal based on the original dict instead of pending_matrix, as the pending_matrix might have been altered later. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix in return value of afr_sh_mark_sourcesVikas Gorur2009-04-061-0/+2
| | | | | | | | | | | | afr_sh_mark_sources now returns: -1 if two wise subvols conflict (split-brain) 0 if all subvols are innocent (no self-heal needed) >0 if sources found Also, changes to callers of afr_sh_mark_sources to handle return value properly. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Made self heal logic more precise.Vikas Gorur2009-03-241-22/+233
| | | | | | | | | Discard earlier patch sent for the same error. This patch fixes it more comprehensively. This solves the spurious split-brain seen by many users. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add extra 'volume' parameter to inodelk/entrylk callsVikas Gorur2009-03-121-0/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-261-1/+1
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Added all filesVikas Gorur2009-02-181-0/+1073