[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-bcache
Subject: what does bch_journal_meta do?
From: Pony Cheng <ponycheng0 () gmail ! com>
Date: 2018-08-23 12:11:54
Message-ID: CAATtUKnayH-2e-XgS-sP_Osfuo11Fe0vOJSFx-XWEPaOJxKpJQ () mail ! gmail ! com
[Download RAW message or body]
Hi all,
When I read the bcache source code, I confused about function
bch_journal_meta. What does this function do? It calls bch_journal and
when ret is not null, will increase ret's value, why decrease ret's
value outsize?
atomic_t *bch_journal(struct cache_set *c,
struct keylist *keys,
struct closure *parent)
{
...
ret = &fifo_back(&c->journal.pin);
atomic_inc(ret);
...
return ret;
}
void bch_journal_meta(struct cache_set *c, struct closure *cl)
{
struct keylist keys;
atomic_t *ref;
bch_keylist_init(&keys);
ref = bch_journal(c, &keys, cl);
if (ref)
atomic_dec_bug(ref);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic