mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
bcachefs: jset_entry for loops declare loop iter
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
eb386617be
commit
0b5961b0d8
@ -510,8 +510,6 @@ int bch2_journal_keys_sort(struct bch_fs *c)
|
||||
{
|
||||
struct genradix_iter iter;
|
||||
struct journal_replay *i, **_i;
|
||||
struct jset_entry *entry;
|
||||
struct bkey_i *k;
|
||||
struct journal_keys *keys = &c->journal_keys;
|
||||
size_t nr_keys = 0, nr_read = 0;
|
||||
|
||||
|
@ -574,8 +574,6 @@ void bch2_journal_keys_to_write_buffer_end(struct bch_fs *c, struct journal_keys
|
||||
static int bch2_journal_keys_to_write_buffer(struct bch_fs *c, struct journal_buf *buf)
|
||||
{
|
||||
struct journal_keys_to_wb dst;
|
||||
struct jset_entry *entry;
|
||||
struct bkey_i *k;
|
||||
int ret = 0;
|
||||
|
||||
bch2_journal_keys_to_write_buffer_start(c, &dst, le64_to_cpu(buf->data->seq));
|
||||
|
@ -40,7 +40,6 @@ static void bch2_journal_replay_to_text(struct printbuf *out, struct bch_fs *c,
|
||||
|
||||
bch2_journal_ptrs_to_text(out, c, j);
|
||||
|
||||
struct jset_entry *entry;
|
||||
for_each_jset_entry_type(entry, &j->j, BCH_JSET_ENTRY_datetime) {
|
||||
struct jset_entry_datetime *datetime =
|
||||
container_of(entry, struct jset_entry_datetime, entry);
|
||||
@ -394,7 +393,6 @@ static int journal_entry_btree_keys_validate(struct bch_fs *c,
|
||||
static void journal_entry_btree_keys_to_text(struct printbuf *out, struct bch_fs *c,
|
||||
struct jset_entry *entry)
|
||||
{
|
||||
struct bkey_i *k;
|
||||
bool first = true;
|
||||
|
||||
jset_entry_for_each_key(entry, k) {
|
||||
@ -1815,7 +1813,6 @@ static int bch2_journal_write_prep(struct journal *j, struct journal_buf *w)
|
||||
if (!wb.wb)
|
||||
bch2_journal_keys_to_write_buffer_start(c, &wb, seq);
|
||||
|
||||
struct bkey_i *k;
|
||||
jset_entry_for_each_key(i, k) {
|
||||
ret = bch2_journal_key_to_wb(c, &wb, i->btree_id, k);
|
||||
if (ret) {
|
||||
|
@ -39,12 +39,12 @@ static inline struct jset_entry *__jset_entry_type_next(struct jset *jset,
|
||||
}
|
||||
|
||||
#define for_each_jset_entry_type(entry, jset, type) \
|
||||
for (entry = (jset)->start; \
|
||||
for (struct jset_entry *entry = (jset)->start; \
|
||||
(entry = __jset_entry_type_next(jset, entry, type)); \
|
||||
entry = vstruct_next(entry))
|
||||
|
||||
#define jset_entry_for_each_key(_e, _k) \
|
||||
for (_k = (_e)->start; \
|
||||
for (struct bkey_i *_k = (_e)->start; \
|
||||
_k < vstruct_last(_e); \
|
||||
_k = bkey_next(_k))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user