On 4.09.2018 20:57, Josef Bacik wrote: > On Mon, Sep 03, 2018 at 05:19:19PM +0300, Nikolay Borisov wrote: >> >> >> On 30.08.2018 20:42, Josef Bacik wrote: >>> + if (flush_state == ALLOC_CHUNK_FORCE && !commit_cycles) >>> + flush_state++; >> >> This is a bit obscure. So if we allocated a chunk and !commit_cycles >> just break from the loop? What's the reasoning behind this ? > > I'll add a comment, but it doesn't break the loop, it just goes to COMMIT_TRANS. > The idea is we don't want to force a chunk allocation if we're experiencing a > little bit of pressure, because we could end up with a drive full of empty > metadata chunks. We want to try committing the transaction first, and then if > we still have issues we can force a chunk allocation. Thanks, I think it will be better if this check is moved up somewhere before the the if (flush_state > commit trans). > > Josef >
