bcache: Refactor journalling flow control

Making things less asynchronous that don't need to be - bch_journal()
only has to block when the journal or journal entry is full, which is
emphatically not a fast path. So make it a normal function that just
returns when it finishes, to make the code and control flow easier to
follow.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
Kent Overstreet
2013-10-24 17:07:04 -07:00
parent cdd972b164
commit a34a8bfd4e
7 changed files with 210 additions and 182 deletions

View File

@@ -110,7 +110,7 @@ static void write_moving(struct closure *cl)
bkey_copy(&s->op.replace, &io->w->key);
closure_init(&s->op.cl, cl);
bch_insert_data(&s->op.cl);
bch_data_insert(&s->op.cl);
}
continue_at(cl, write_moving_finish, bch_gc_wq);