- Correct rev 242734, segments can sometimes get stuck. Be a bit more

defensive with segment state.

Reported by:	 b. f. <bf1783@googlemail.com>
This commit is contained in:
Jeff Roberson 2012-11-09 04:04:25 +00:00
parent 5bcc8e2fbd
commit 53cc0bebb9

View File

@ -4291,13 +4291,16 @@ free_jsegs(jblocks)
jblocks->jb_oldestseg = jseg;
return;
}
if ((jseg->js_state & ALLCOMPLETE) != ALLCOMPLETE)
break;
if (jseg->js_seq > jblocks->jb_oldestwrseq)
break;
/*
* We can free jsegs that didn't write entries when
* oldestwrseq == js_seq.
*/
if (jseg->js_cnt != 0)
if (jseg->js_seq == jblocks->jb_oldestwrseq &&
jseg->js_cnt != 0)
break;
free_jseg(jseg, jblocks);
}