Description of problem: gluster volume heal volume-name info split-brain command do not list any file if file count is less that 1024. Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. create a replicate volume with 2 bricks. 2. create 10 split-brain files. 3. Execute gluster volume heal volumename info split-brain Actual results: No of files are always shown 0. Expected results: Should print all the files in split-brain Additional info: Currently values from the history buffer are always taken from current index to either ( 1.buffer_lenth_used) or 2.(end of the buffer and then from start of the buffer upto current index) to follow LIFO. But it may happen that number of entries are less that 1024. In that case current index and buffer_length_used are equal and it will nerver take any entry from buffer.
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#1) for review on master by venkatesh somyajulu (vsomyaju)
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#2) for review on master by venkatesh somyajulu (vsomyaju)
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#3) for review on master by venkatesh somyajulu (vsomyaju)
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#4) for review on master by venkatesh somyajulu (vsomyaju)
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#5) for review on master by venkatesh somyajulu (vsomyaju)
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#6) for review on master by venkatesh somyajulu (vsomyaju)
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#7) for review on master by venkatesh somyajulu (vsomyaju)
COMMIT: http://review.gluster.org/5197 committed in master by Anand Avati (avati) ------ commit 77e6caa440fb27d97fc9c6330c3598763c2351f5 Author: Venkatesh Somyajulu <vsomyaju> Date: Wed Jun 12 16:59:13 2013 +0530 libglusterfs: Fix circular buffer to dump entries if count is less than 1024 Problem: To dump the values present in the circular buffer, index always moves from current index to used_len. But if circular buffer is not completely filled even once then next index to be filled and used length value are always same which means it will never dump any value. Fix: Modified the logic of buffer traversing to dump values so that it will still maintain FIFO and cover both the cases where buffer is either partially filled or being used more than once. Change-Id: If73a5e481cca1751d57aba1136c2d25d23ce073c BUG: 972459 Signed-off-by: Venkatesh Somyajulu <vsomyaju> Reviewed-on: http://review.gluster.org/5197 Reviewed-by: Jeff Darcy <jdarcy> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Raghavendra Bhat <raghavendra>