• Home
  • Raw
  • Download

Lines Matching refs:block

224 	struct btrfsic_block *block;  member
247 struct btrfsic_block *block,
255 struct btrfsic_block *block,
266 struct btrfsic_block *block,
277 struct btrfsic_block *const block,
281 const struct btrfsic_block *block,
284 struct btrfsic_block *const block,
291 const struct btrfsic_block *block);
294 const struct btrfsic_block *block,
898 sf->block = first_block; in btrfsic_process_metablock()
905 sf->block->generation = btrfs_stack_header_generation(sf->hdr); in btrfsic_process_metablock()
974 sf->block, in btrfsic_process_metablock()
1005 next_stack->block = sf->next_block; in btrfsic_process_metablock()
1020 sf->block, in btrfsic_process_metablock()
1073 sf->block, in btrfsic_process_metablock()
1099 next_stack->block = sf->next_block; in btrfsic_process_metablock()
1167 struct btrfsic_block *block, in btrfsic_create_link_to_next_block() argument
1266 l->block_ref_from = block; in btrfsic_create_link_to_next_block()
1273 list_add(&l->node_ref_to, &block->ref_to_list); in btrfsic_create_link_to_next_block()
1309 struct btrfsic_block *block, in btrfsic_handle_extent_data() argument
1437 next_block, block, in btrfsic_handle_extent_data()
1686 struct btrfsic_block *block; in btrfsic_process_written_block() local
1704 block = btrfsic_block_hashtable_lookup(bdev, dev_bytenr, in btrfsic_process_written_block()
1706 if (NULL != block) { in btrfsic_process_written_block()
1710 if (block->is_superblock) { in btrfsic_process_written_block()
1724 btrfsic_dump_tree_sub(state, block, 0); in btrfsic_process_written_block()
1728 if (!block->is_superblock) { in btrfsic_process_written_block()
1743 if (block->logical_bytenr != bytenr && in btrfsic_process_written_block()
1744 !(!block->is_metadata && in btrfsic_process_written_block()
1745 block->logical_bytenr == 0)) in btrfsic_process_written_block()
1749 block->mirror_num, in btrfsic_process_written_block()
1751 block), in btrfsic_process_written_block()
1752 block->logical_bytenr); in btrfsic_process_written_block()
1756 dev_bytenr, block->mirror_num, in btrfsic_process_written_block()
1758 block)); in btrfsic_process_written_block()
1760 block->logical_bytenr = bytenr; in btrfsic_process_written_block()
1768 bytenr = block->logical_bytenr; in btrfsic_process_written_block()
1772 block->mirror_num, in btrfsic_process_written_block()
1773 btrfsic_get_block_type(state, block)); in btrfsic_process_written_block()
1778 list_empty(&block->ref_to_list) ? ' ' : '!', in btrfsic_process_written_block()
1779 list_empty(&block->ref_from_list) ? ' ' : '!'); in btrfsic_process_written_block()
1780 if (btrfsic_is_block_ref_by_superblock(state, block, 0)) { in btrfsic_process_written_block()
1782 btrfsic_get_block_type(state, block), bytenr, in btrfsic_process_written_block()
1783 dev_state->name, dev_bytenr, block->mirror_num, in btrfsic_process_written_block()
1784 block->generation, in btrfsic_process_written_block()
1785 btrfs_disk_key_objectid(&block->disk_key), in btrfsic_process_written_block()
1786 block->disk_key.type, in btrfsic_process_written_block()
1787 btrfs_disk_key_offset(&block->disk_key), in btrfsic_process_written_block()
1794 if (!block->is_iodone && !block->never_written) { in btrfsic_process_written_block()
1796 btrfsic_get_block_type(state, block), bytenr, in btrfsic_process_written_block()
1797 dev_state->name, dev_bytenr, block->mirror_num, in btrfsic_process_written_block()
1798 block->generation, in btrfsic_process_written_block()
1813 list_for_each_entry_safe(l, tmp, &block->ref_to_list, in btrfsic_process_written_block()
1835 block->never_written = 0; in btrfsic_process_written_block()
1836 block->iodone_w_error = 0; in btrfsic_process_written_block()
1838 block->is_iodone = 0; in btrfsic_process_written_block()
1841 block->orig_bio_private = in btrfsic_process_written_block()
1843 block->orig_bio_end_io = in btrfsic_process_written_block()
1845 block->next_in_same_bio = NULL; in btrfsic_process_written_block()
1846 bio->bi_private = block; in btrfsic_process_written_block()
1855 block->orig_bio_private = in btrfsic_process_written_block()
1857 block->orig_bio_end_io = in btrfsic_process_written_block()
1859 block->next_in_same_bio = chained_block; in btrfsic_process_written_block()
1860 bio->bi_private = block; in btrfsic_process_written_block()
1863 block->is_iodone = 1; in btrfsic_process_written_block()
1864 block->orig_bio_private = NULL; in btrfsic_process_written_block()
1865 block->orig_bio_end_io = NULL; in btrfsic_process_written_block()
1866 block->next_in_same_bio = NULL; in btrfsic_process_written_block()
1870 block->flush_gen = dev_state->last_flush_gen + 1; in btrfsic_process_written_block()
1871 block->submit_bio_bh_rw = submit_bio_bh_rw; in btrfsic_process_written_block()
1873 block->logical_bytenr = bytenr; in btrfsic_process_written_block()
1874 block->is_metadata = 1; in btrfsic_process_written_block()
1875 if (block->is_superblock) { in btrfsic_process_written_block()
1880 block, in btrfsic_process_written_block()
1886 btrfsic_dump_tree_sub(state, block, 0); in btrfsic_process_written_block()
1889 block->mirror_num = 0; /* unknown */ in btrfsic_process_written_block()
1892 block, in btrfsic_process_written_block()
1900 block->is_metadata = 0; in btrfsic_process_written_block()
1901 block->mirror_num = 0; /* unknown */ in btrfsic_process_written_block()
1902 block->generation = BTRFSIC_GENERATION_UNKNOWN; in btrfsic_process_written_block()
1904 && list_empty(&block->ref_from_list)) { in btrfsic_process_written_block()
1911 btrfsic_block_hashtable_remove(block); in btrfsic_process_written_block()
1912 list_del(&block->all_blocks_node); in btrfsic_process_written_block()
1913 btrfsic_block_free(block); in btrfsic_process_written_block()
1954 block = btrfsic_block_alloc(); in btrfsic_process_written_block()
1955 if (NULL == block) { in btrfsic_process_written_block()
1959 block->dev_state = dev_state; in btrfsic_process_written_block()
1960 block->dev_bytenr = dev_bytenr; in btrfsic_process_written_block()
1961 block->logical_bytenr = bytenr; in btrfsic_process_written_block()
1962 block->is_metadata = is_metadata; in btrfsic_process_written_block()
1963 block->never_written = 0; in btrfsic_process_written_block()
1964 block->iodone_w_error = 0; in btrfsic_process_written_block()
1965 block->mirror_num = 0; /* unknown */ in btrfsic_process_written_block()
1966 block->flush_gen = dev_state->last_flush_gen + 1; in btrfsic_process_written_block()
1967 block->submit_bio_bh_rw = submit_bio_bh_rw; in btrfsic_process_written_block()
1969 block->is_iodone = 0; in btrfsic_process_written_block()
1972 block->orig_bio_private = bio->bi_private; in btrfsic_process_written_block()
1973 block->orig_bio_end_io = bio->bi_end_io; in btrfsic_process_written_block()
1974 block->next_in_same_bio = NULL; in btrfsic_process_written_block()
1975 bio->bi_private = block; in btrfsic_process_written_block()
1984 block->orig_bio_private = in btrfsic_process_written_block()
1986 block->orig_bio_end_io = in btrfsic_process_written_block()
1988 block->next_in_same_bio = chained_block; in btrfsic_process_written_block()
1989 bio->bi_private = block; in btrfsic_process_written_block()
1992 block->is_iodone = 1; in btrfsic_process_written_block()
1993 block->orig_bio_private = NULL; in btrfsic_process_written_block()
1994 block->orig_bio_end_io = NULL; in btrfsic_process_written_block()
1995 block->next_in_same_bio = NULL; in btrfsic_process_written_block()
2000 block->logical_bytenr, block->dev_state->name, in btrfsic_process_written_block()
2001 block->dev_bytenr, block->mirror_num); in btrfsic_process_written_block()
2002 list_add(&block->all_blocks_node, &state->all_blocks_list); in btrfsic_process_written_block()
2003 btrfsic_block_hashtable_add(block, &state->block_hashtable); in btrfsic_process_written_block()
2006 ret = btrfsic_process_metablock(state, block, in btrfsic_process_written_block()
2025 struct btrfsic_block *block = (struct btrfsic_block *)bp->bi_private; in btrfsic_bio_end_io() local
2034 BUG_ON(NULL == block); in btrfsic_bio_end_io()
2035 bp->bi_private = block->orig_bio_private; in btrfsic_bio_end_io()
2036 bp->bi_end_io = block->orig_bio_end_io; in btrfsic_bio_end_io()
2040 struct btrfsic_dev_state *const dev_state = block->dev_state; in btrfsic_bio_end_io()
2046 btrfsic_get_block_type(dev_state->state, block), in btrfsic_bio_end_io()
2047 block->logical_bytenr, dev_state->name, in btrfsic_bio_end_io()
2048 block->dev_bytenr, block->mirror_num); in btrfsic_bio_end_io()
2049 next_block = block->next_in_same_bio; in btrfsic_bio_end_io()
2050 block->iodone_w_error = iodone_w_error; in btrfsic_bio_end_io()
2051 if (block->submit_bio_bh_rw & REQ_PREFLUSH) { in btrfsic_bio_end_io()
2059 if (block->submit_bio_bh_rw & REQ_FUA) in btrfsic_bio_end_io()
2060 block->flush_gen = 0; /* FUA completed means block is in btrfsic_bio_end_io()
2062 block->is_iodone = 1; /* for FLUSH, this releases the block */ in btrfsic_bio_end_io()
2063 block = next_block; in btrfsic_bio_end_io()
2064 } while (NULL != block); in btrfsic_bio_end_io()
2203 struct btrfsic_block *const block, in btrfsic_check_all_ref_blocks() argument
2233 list_for_each_entry(l, &block->ref_to_list, node_ref_to) { in btrfsic_check_all_ref_blocks()
2237 btrfsic_get_block_type(state, block), in btrfsic_check_all_ref_blocks()
2238 block->logical_bytenr, block->dev_state->name, in btrfsic_check_all_ref_blocks()
2239 block->dev_bytenr, block->mirror_num, in btrfsic_check_all_ref_blocks()
2292 l->block_ref_to->mirror_num, block->flush_gen, in btrfsic_check_all_ref_blocks()
2308 const struct btrfsic_block *block, in btrfsic_is_block_ref_by_superblock() argument
2325 list_for_each_entry(l, &block->ref_from_list, node_ref_from) { in btrfsic_is_block_ref_by_superblock()
2329 btrfsic_get_block_type(state, block), in btrfsic_is_block_ref_by_superblock()
2330 block->logical_bytenr, block->dev_state->name, in btrfsic_is_block_ref_by_superblock()
2331 block->dev_bytenr, block->mirror_num, in btrfsic_is_block_ref_by_superblock()
2385 const struct btrfsic_block *block) in btrfsic_get_block_type() argument
2387 if (block->is_superblock && in btrfsic_get_block_type()
2388 state->latest_superblock->dev_bytenr == block->dev_bytenr && in btrfsic_get_block_type()
2389 state->latest_superblock->dev_state->bdev == block->dev_state->bdev) in btrfsic_get_block_type()
2391 else if (block->is_superblock) in btrfsic_get_block_type()
2393 else if (block->is_metadata) in btrfsic_get_block_type()
2405 const struct btrfsic_block *block, in btrfsic_dump_tree_sub() argument
2423 btrfsic_get_block_type(state, block), in btrfsic_dump_tree_sub()
2424 block->logical_bytenr, block->dev_state->name, in btrfsic_dump_tree_sub()
2425 block->dev_bytenr, block->mirror_num); in btrfsic_dump_tree_sub()
2432 if (list_empty(&block->ref_to_list)) { in btrfsic_dump_tree_sub()
2436 if (block->mirror_num > 1 && in btrfsic_dump_tree_sub()
2443 list_for_each_entry(l, &block->ref_to_list, node_ref_to) { in btrfsic_dump_tree_sub()
2519 struct btrfsic_block *block; in btrfsic_block_lookup_or_add() local
2521 block = btrfsic_block_hashtable_lookup(block_ctx->dev->bdev, in btrfsic_block_lookup_or_add()
2524 if (NULL == block) { in btrfsic_block_lookup_or_add()
2527 block = btrfsic_block_alloc(); in btrfsic_block_lookup_or_add()
2528 if (!block) in btrfsic_block_lookup_or_add()
2534 btrfsic_block_free(block); in btrfsic_block_lookup_or_add()
2537 block->dev_state = dev_state; in btrfsic_block_lookup_or_add()
2538 block->dev_bytenr = block_ctx->dev_bytenr; in btrfsic_block_lookup_or_add()
2539 block->logical_bytenr = block_ctx->start; in btrfsic_block_lookup_or_add()
2540 block->is_metadata = is_metadata; in btrfsic_block_lookup_or_add()
2541 block->is_iodone = is_iodone; in btrfsic_block_lookup_or_add()
2542 block->never_written = never_written; in btrfsic_block_lookup_or_add()
2543 block->mirror_num = mirror_num; in btrfsic_block_lookup_or_add()
2547 btrfsic_get_block_type(state, block), in btrfsic_block_lookup_or_add()
2548 block->logical_bytenr, dev_state->name, in btrfsic_block_lookup_or_add()
2549 block->dev_bytenr, mirror_num); in btrfsic_block_lookup_or_add()
2550 list_add(&block->all_blocks_node, &state->all_blocks_list); in btrfsic_block_lookup_or_add()
2551 btrfsic_block_hashtable_add(block, &state->block_hashtable); in btrfsic_block_lookup_or_add()
2559 return block; in btrfsic_block_lookup_or_add()
2681 struct btrfsic_block *const block = in __btrfsic_submit_bio() local
2684 block->is_iodone = 0; in __btrfsic_submit_bio()
2685 block->never_written = 0; in __btrfsic_submit_bio()
2686 block->iodone_w_error = 0; in __btrfsic_submit_bio()
2687 block->flush_gen = dev_state->last_flush_gen + 1; in __btrfsic_submit_bio()
2688 block->submit_bio_bh_rw = bio->bi_opf; in __btrfsic_submit_bio()
2689 block->orig_bio_private = bio->bi_private; in __btrfsic_submit_bio()
2690 block->orig_bio_end_io = bio->bi_end_io; in __btrfsic_submit_bio()
2691 block->next_in_same_bio = NULL; in __btrfsic_submit_bio()
2692 bio->bi_private = block; in __btrfsic_submit_bio()