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>
此提交包含在:
Kent Overstreet
2013-10-24 17:07:04 -07:00
父節點 cdd972b164
當前提交 a34a8bfd4e
共有 7 個檔案被更改,包括 210 行新增182 行删除

查看文件

@@ -200,8 +200,9 @@ struct journal_device {
struct closure;
struct cache_set;
struct btree_op;
struct keylist;
void bch_journal(struct closure *);
atomic_t *bch_journal(struct cache_set *, struct keylist *, struct closure *);
void bch_journal_next(struct journal *);
void bch_journal_mark(struct cache_set *, struct list_head *);
void bch_journal_meta(struct cache_set *, struct closure *);