• Home
  • Raw
  • Download

Lines Matching refs:w

42 	struct jset *j, *data = ca->set->journal.w[0].data;  in journal_read_bucket()
698 j->cur = (j->cur == j->w) in bch_journal_next()
699 ? &j->w[1] in bch_journal_next()
700 : &j->w[0]; in bch_journal_next()
720 struct journal_write *w = bio->bi_private; in journal_write_endio() local
722 cache_set_err_on(bio->bi_status, w->c, "journal io error"); in journal_write_endio()
723 closure_put(&w->c->journal.io); in journal_write_endio()
731 struct journal_write *w = (j->cur == j->w) in journal_write_done() local
732 ? &j->w[1] in journal_write_done()
733 : &j->w[0]; in journal_write_done()
735 __closure_wake_up(&w->wait); in journal_write_done()
753 struct journal_write *w = c->journal.cur; in journal_write_unlocked() local
755 unsigned int i, sectors = set_blocks(w->data, block_bytes(ca)) * in journal_write_unlocked()
763 if (!w->need_write) { in journal_write_unlocked()
775 c->journal.blocks_free -= set_blocks(w->data, block_bytes(ca)); in journal_write_unlocked()
777 w->data->btree_level = c->root->level; in journal_write_unlocked()
779 bkey_copy(&w->data->btree_root, &c->root->key); in journal_write_unlocked()
780 bkey_copy(&w->data->uuid_bucket, &c->uuid_bucket); in journal_write_unlocked()
782 w->data->prio_bucket[ca->sb.nr_this_dev] = ca->prio_buckets[0]; in journal_write_unlocked()
783 w->data->magic = jset_magic(&ca->sb); in journal_write_unlocked()
784 w->data->version = BCACHE_JSET_VERSION; in journal_write_unlocked()
785 w->data->last_seq = last_seq(&c->journal); in journal_write_unlocked()
786 w->data->csum = csum_set(w->data); in journal_write_unlocked()
800 bio->bi_private = w; in journal_write_unlocked()
801 bch_bio_map(bio, w->data); in journal_write_unlocked()
803 trace_bcache_journal_write(bio, w->data->keys); in journal_write_unlocked()
808 ca->journal.seq[ca->journal.cur_idx] = w->data->seq; in journal_write_unlocked()
838 struct journal_write *w = c->journal.cur; in journal_try_write() local
840 w->need_write = true; in journal_try_write()
864 struct journal_write *w = c->journal.cur; in journal_wait_for_write() local
866 sectors = __set_blocks(w->data, w->data->keys + nkeys, in journal_wait_for_write()
872 return w; in journal_wait_for_write()
887 BUG_ON(!w->data->keys); in journal_wait_for_write()
928 struct journal_write *w; in bch_journal() local
938 w = journal_wait_for_write(c, bch_keylist_nkeys(keys)); in bch_journal()
940 memcpy(bset_bkey_last(w->data), keys->keys, bch_keylist_bytes(keys)); in bch_journal()
941 w->data->keys += bch_keylist_nkeys(keys); in bch_journal()
947 closure_wait(&w->wait, parent); in bch_journal()
949 } else if (!w->dirty) { in bch_journal()
950 w->dirty = true; in bch_journal()
976 free_pages((unsigned long) c->journal.w[1].data, JSET_BITS); in bch_journal_free()
977 free_pages((unsigned long) c->journal.w[0].data, JSET_BITS); in bch_journal_free()
991 j->w[0].c = c; in bch_journal_alloc()
992 j->w[1].c = c; in bch_journal_alloc()
995 !(j->w[0].data = (void *) __get_free_pages(GFP_KERNEL|__GFP_COMP, JSET_BITS)) || in bch_journal_alloc()
996 !(j->w[1].data = (void *) __get_free_pages(GFP_KERNEL|__GFP_COMP, JSET_BITS))) in bch_journal_alloc()