• Home
  • Raw
  • Download

Lines Matching full:iop

482 	struct data_insert_op	iop;  member
499 s->iop.status = bio->bi_status; in bch_cache_read_endio()
501 ptr_stale(s->iop.c, &b->key, 0)) { in bch_cache_read_endio()
502 atomic_long_inc(&s->iop.c->cache_read_races); in bch_cache_read_endio()
503 s->iop.status = BLK_STS_IOERR; in bch_cache_read_endio()
506 bch_bbio_endio(s->iop.c, bio, bio->bi_status, "reading from cache"); in bch_cache_read_endio()
520 if (bkey_cmp(k, &KEY(s->iop.inode, bio->bi_iter.bi_sector, 0)) <= 0) in cache_lookup_fn()
523 if (KEY_INODE(k) != s->iop.inode || in cache_lookup_fn()
526 unsigned int sectors = KEY_INODE(k) == s->iop.inode in cache_lookup_fn()
557 bch_cut_front(&KEY(s->iop.inode, n->bi_iter.bi_sector, 0), bio_key); in cache_lookup_fn()
558 bch_cut_back(&KEY(s->iop.inode, bio_end_sector(n), 0), bio_key); in cache_lookup_fn()
580 struct search *s = container_of(cl, struct search, iop.cl); in cache_lookup()
587 ret = bch_btree_map_keys(&s->op, s->iop.c, in cache_lookup()
588 &KEY(s->iop.inode, bio->bi_iter.bi_sector, 0), in cache_lookup()
601 * And after that happened, s->iop.status is still its initial value in cache_lookup()
612 if (!s->iop.status) in cache_lookup()
613 s->iop.status = BLK_STS_IOERR; in cache_lookup()
628 s->iop.status = bio->bi_status; in request_endio()
649 * s->iop.status by this failure, the status will be decided in backing_request_endio()
652 if (unlikely(s->iop.writeback && in backing_request_endio()
658 s->iop.status = bio->bi_status; in backing_request_endio()
676 s->orig_bio->bi_status = s->iop.status; in bio_complete()
706 atomic_dec(&s->iop.c->search_inflight); in search_free()
708 if (s->iop.bio) in search_free()
709 bio_put(s->iop.bio); in search_free()
713 mempool_free(s, &s->iop.c->search); in search_free()
736 s->iop.c = d->c; in search_alloc()
737 s->iop.bio = NULL; in search_alloc()
738 s->iop.inode = d->id; in search_alloc()
739 s->iop.write_point = hash_long((unsigned long) current, 16); in search_alloc()
740 s->iop.write_prio = 0; in search_alloc()
741 s->iop.status = 0; in search_alloc()
742 s->iop.flags = 0; in search_alloc()
743 s->iop.flush_journal = op_is_flush(bio->bi_opf); in search_alloc()
744 s->iop.wq = bcache_wq; in search_alloc()
766 if (s->iop.replace_collision) in cached_dev_read_error_done()
767 bch_mark_cache_miss_collision(s->iop.c, s->d); in cached_dev_read_error_done()
769 if (s->iop.bio) in cached_dev_read_error_done()
770 bio_free_pages(s->iop.bio); in cached_dev_read_error_done()
791 s->iop.status = 0; in cached_dev_read_error()
797 closure_bio_submit(s->iop.c, bio, cl); in cached_dev_read_error()
808 if (s->iop.replace_collision) in cached_dev_cache_miss_done()
809 bch_mark_cache_miss_collision(s->iop.c, s->d); in cached_dev_cache_miss_done()
811 if (s->iop.bio) in cached_dev_cache_miss_done()
812 bio_free_pages(s->iop.bio); in cached_dev_cache_miss_done()
831 if (s->iop.bio) { in cached_dev_read_done()
832 bio_reset(s->iop.bio); in cached_dev_read_done()
833 s->iop.bio->bi_iter.bi_sector = in cached_dev_read_done()
835 bio_copy_dev(s->iop.bio, s->cache_miss); in cached_dev_read_done()
836 s->iop.bio->bi_iter.bi_size = s->insert_bio_sectors << 9; in cached_dev_read_done()
837 bch_bio_map(s->iop.bio, NULL); in cached_dev_read_done()
839 bio_copy_data(s->cache_miss, s->iop.bio); in cached_dev_read_done()
851 if (s->iop.bio && in cached_dev_read_done()
852 !test_bit(CACHE_SET_STOPPING, &s->iop.c->flags)) { in cached_dev_read_done()
853 BUG_ON(!s->iop.replace); in cached_dev_read_done()
854 closure_call(&s->iop.cl, bch_data_insert, NULL, cl); in cached_dev_read_done()
865 bch_mark_cache_accounting(s->iop.c, s->d, in cached_dev_read_done_bh()
866 !s->cache_missed, s->iop.bypass); in cached_dev_read_done_bh()
867 trace_bcache_read(s->orig_bio, !s->cache_missed, s->iop.bypass); in cached_dev_read_done_bh()
869 if (s->iop.status) in cached_dev_read_done_bh()
871 else if (s->iop.bio || verify(dc)) in cached_dev_read_done_bh()
887 if (s->cache_miss || s->iop.bypass) { in cached_dev_cache_miss()
895 s->iop.c->gc_stats.in_use < CUTOFF_CACHE_READA) in cached_dev_cache_miss()
901 s->iop.replace_key = KEY(s->iop.inode, in cached_dev_cache_miss()
905 ret = bch_btree_insert_check_key(b, &s->op, &s->iop.replace_key); in cached_dev_cache_miss()
909 s->iop.replace = true; in cached_dev_cache_miss()
934 bch_mark_cache_readahead(s->iop.c, s->d); in cached_dev_cache_miss()
937 s->iop.bio = cache_bio; in cached_dev_cache_miss()
940 closure_bio_submit(s->iop.c, cache_bio, &s->cl); in cached_dev_cache_miss()
949 closure_bio_submit(s->iop.c, miss, &s->cl); in cached_dev_cache_miss()
957 closure_call(&s->iop.cl, cache_lookup, NULL, cl); in cached_dev_read()
979 bch_keybuf_check_overlapping(&s->iop.c->moving_gc_keys, &start, &end); in cached_dev_write()
987 s->iop.bypass = false; in cached_dev_write()
988 s->iop.writeback = true; in cached_dev_write()
999 s->iop.bypass = true; in cached_dev_write()
1003 s->iop.bypass)) { in cached_dev_write()
1004 s->iop.bypass = false; in cached_dev_write()
1005 s->iop.writeback = true; in cached_dev_write()
1008 if (s->iop.bypass) { in cached_dev_write()
1009 s->iop.bio = s->orig_bio; in cached_dev_write()
1010 bio_get(s->iop.bio); in cached_dev_write()
1018 closure_bio_submit(s->iop.c, bio, cl); in cached_dev_write()
1020 } else if (s->iop.writeback) { in cached_dev_write()
1022 s->iop.bio = bio; in cached_dev_write()
1034 s->iop.status = BLK_STS_RESOURCE; in cached_dev_write()
1042 closure_bio_submit(s->iop.c, flush, cl); in cached_dev_write()
1045 s->iop.bio = bio_clone_fast(bio, GFP_NOIO, &dc->disk.bio_split); in cached_dev_write()
1048 closure_bio_submit(s->iop.c, bio, cl); in cached_dev_write()
1052 closure_call(&s->iop.cl, bch_data_insert, NULL, cl); in cached_dev_write()
1061 if (s->iop.flush_journal) in cached_dev_nodata()
1062 bch_journal_meta(s->iop.c, cl); in cached_dev_nodata()
1066 closure_bio_submit(s->iop.c, bio, cl); in cached_dev_nodata()
1218 s->iop.bypass = check_should_bypass(dc, bio); in cached_dev_submit_bio()
1272 if (s->iop.flush_journal) in flash_dev_nodata()
1273 bch_journal_meta(s->iop.c, cl); in flash_dev_nodata()
1305 bch_keybuf_check_overlapping(&s->iop.c->moving_gc_keys, in flash_dev_submit_bio()
1309 s->iop.bypass = (bio_op(bio) == REQ_OP_DISCARD) != 0; in flash_dev_submit_bio()
1310 s->iop.writeback = true; in flash_dev_submit_bio()
1311 s->iop.bio = bio; in flash_dev_submit_bio()
1313 closure_call(&s->iop.cl, bch_data_insert, NULL, cl); in flash_dev_submit_bio()
1315 closure_call(&s->iop.cl, cache_lookup, NULL, cl); in flash_dev_submit_bio()