Lines Matching refs:dev_state

141 	struct btrfsic_dev_state *dev_state;  member
312 struct btrfsic_dev_state *dev_state,
320 struct btrfsic_dev_state *dev_state,
331 b->dev_state = NULL; in btrfsic_block_init()
409 ds->dummy_block_for_bio_bh_flush.dev_state = ds; in btrfsic_dev_state_init()
443 ((unsigned int)((uintptr_t)b->dev_state->bdev))) & in btrfsic_block_hashtable_add()
466 if (b->dev_state->bdev == bdev && b->dev_bytenr == dev_bytenr) in btrfsic_block_hashtable_lookup()
489 ((unsigned int)((uintptr_t)l->block_ref_to->dev_state->bdev)) ^ in btrfsic_block_link_hashtable_add()
490 ((unsigned int)((uintptr_t)l->block_ref_from->dev_state->bdev))) in btrfsic_block_link_hashtable_add()
521 if (l->block_ref_to->dev_state->bdev == bdev_ref_to && in btrfsic_block_link_hashtable_lookup()
523 l->block_ref_from->dev_state->bdev == bdev_ref_from && in btrfsic_block_link_hashtable_lookup()
587 struct btrfsic_dev_state *dev_state; in btrfsic_process_superblock() local
592 dev_state = btrfsic_dev_state_lookup(device->bdev->bd_dev); in btrfsic_process_superblock()
593 BUG_ON(NULL == dev_state); in btrfsic_process_superblock()
596 state, dev_state, device, i, in btrfsic_process_superblock()
670 state->latest_superblock->dev_state-> in btrfsic_process_superblock()
699 struct btrfsic_dev_state *dev_state, in btrfsic_process_superblock_dev_mirror() argument
747 superblock_tmp->dev_state = dev_state; in btrfsic_process_superblock_dev_mirror()
760 dev_state->bdev, dev_bytenr, in btrfsic_process_superblock_dev_mirror()
773 *selected_dev_state = dev_state; in btrfsic_process_superblock_dev_mirror()
1481 if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state) || in btrfsic_map_block()
1610 b_all->logical_bytenr, b_all->dev_state->bdev, in btrfsic_dump_database()
1617 b_all->logical_bytenr, b_all->dev_state->bdev, in btrfsic_dump_database()
1622 l->block_ref_to->dev_state->bdev, in btrfsic_dump_database()
1631 b_all->logical_bytenr, b_all->dev_state->bdev, in btrfsic_dump_database()
1636 l->block_ref_from->dev_state->bdev, in btrfsic_dump_database()
1684 static void btrfsic_process_written_block(struct btrfsic_dev_state *dev_state, in btrfsic_process_written_block() argument
1694 struct btrfsic_state *state = dev_state->state; in btrfsic_process_written_block()
1695 struct block_device *bdev = dev_state->bdev; in btrfsic_process_written_block()
1744 dev_state, in btrfsic_process_written_block()
1753 bytenr, dev_state->bdev, in btrfsic_process_written_block()
1762 bytenr, dev_state->bdev, in btrfsic_process_written_block()
1779 bytenr, dev_state->bdev, dev_bytenr, in btrfsic_process_written_block()
1792 dev_state->bdev, dev_bytenr, block->mirror_num, in btrfsic_process_written_block()
1807 dev_state->bdev, dev_bytenr, block->mirror_num, in btrfsic_process_written_block()
1836 block_ctx.dev = dev_state; in btrfsic_process_written_block()
1880 block->flush_gen = dev_state->last_flush_gen + 1; in btrfsic_process_written_block()
1936 dev_state->bdev, dev_bytenr); in btrfsic_process_written_block()
1950 btrfsic_cmp_log_and_dev_bytenr(state, bytenr, dev_state, in btrfsic_process_written_block()
1955 bytenr, dev_state->bdev, dev_bytenr); in btrfsic_process_written_block()
1958 block_ctx.dev = dev_state; in btrfsic_process_written_block()
1971 block->dev_state = dev_state; in btrfsic_process_written_block()
1978 block->flush_gen = dev_state->last_flush_gen + 1; in btrfsic_process_written_block()
2012 block->logical_bytenr, block->dev_state->bdev, in btrfsic_process_written_block()
2052 struct btrfsic_dev_state *const dev_state = block->dev_state; in btrfsic_bio_end_io() local
2054 if ((dev_state->state->print_mask & in btrfsic_bio_end_io()
2058 btrfsic_get_block_type(dev_state->state, block), in btrfsic_bio_end_io()
2059 block->logical_bytenr, dev_state->bdev, in btrfsic_bio_end_io()
2064 dev_state->last_flush_gen++; in btrfsic_bio_end_io()
2065 if ((dev_state->state->print_mask & in btrfsic_bio_end_io()
2068 dev_state->bdev, in btrfsic_bio_end_io()
2069 dev_state->last_flush_gen); in btrfsic_bio_end_io()
2096 superblock->dev_state->bdev, in btrfsic_process_written_superblock()
2105 superblock->dev_state->bdev, in btrfsic_process_written_superblock()
2253 block->logical_bytenr, block->dev_state->bdev, in btrfsic_check_all_ref_blocks()
2258 l->block_ref_to->dev_state->bdev, in btrfsic_check_all_ref_blocks()
2266 l->block_ref_to->dev_state->bdev, in btrfsic_check_all_ref_blocks()
2275 l->block_ref_to->dev_state->bdev, in btrfsic_check_all_ref_blocks()
2284 l->block_ref_to->dev_state->bdev, in btrfsic_check_all_ref_blocks()
2298 l->block_ref_to->dev_state->bdev, in btrfsic_check_all_ref_blocks()
2305 l->block_ref_to->dev_state->last_flush_gen) { in btrfsic_check_all_ref_blocks()
2310 l->block_ref_to->dev_state->bdev, in btrfsic_check_all_ref_blocks()
2313 l->block_ref_to->dev_state->last_flush_gen); in btrfsic_check_all_ref_blocks()
2351 block->logical_bytenr, block->dev_state->bdev, in btrfsic_is_block_ref_by_superblock()
2356 l->block_ref_from->dev_state->bdev, in btrfsic_is_block_ref_by_superblock()
2362 state->latest_superblock->dev_state->bdev == in btrfsic_is_block_ref_by_superblock()
2363 l->block_ref_from->dev_state->bdev) in btrfsic_is_block_ref_by_superblock()
2382 l->block_ref_from->dev_state->bdev, in btrfsic_print_add_link()
2386 l->block_ref_to->dev_state->bdev, l->block_ref_to->dev_bytenr, in btrfsic_print_add_link()
2397 l->block_ref_from->dev_state->bdev, in btrfsic_print_rem_link()
2401 l->block_ref_to->dev_state->bdev, l->block_ref_to->dev_bytenr, in btrfsic_print_rem_link()
2410 state->latest_superblock->dev_state->bdev == block->dev_state->bdev) in btrfsic_get_block_type()
2445 block->logical_bytenr, block->dev_state->bdev, in btrfsic_dump_tree_sub()
2499 from_block->dev_state->bdev, in btrfsic_block_link_lookup_or_add()
2546 struct btrfsic_dev_state *dev_state; in btrfsic_block_lookup_or_add() local
2552 dev_state = btrfsic_dev_state_lookup(block_ctx->dev->bdev->bd_dev); in btrfsic_block_lookup_or_add()
2553 if (NULL == dev_state) { in btrfsic_block_lookup_or_add()
2558 block->dev_state = dev_state; in btrfsic_block_lookup_or_add()
2569 block->logical_bytenr, dev_state->bdev, in btrfsic_block_lookup_or_add()
2585 struct btrfsic_dev_state *dev_state, in btrfsic_cmp_log_and_dev_bytenr() argument
2606 if (dev_state->bdev == block_ctx.dev->bdev && in btrfsic_cmp_log_and_dev_bytenr()
2618 bytenr, dev_state->bdev, dev_bytenr); in btrfsic_cmp_log_and_dev_bytenr()
2641 struct btrfsic_dev_state *dev_state; in __btrfsic_submit_bio() local
2649 dev_state = btrfsic_dev_state_lookup(bio->bi_bdev->bd_dev); in __btrfsic_submit_bio()
2650 if (NULL != dev_state && in __btrfsic_submit_bio()
2663 if (dev_state->state->print_mask & in __btrfsic_submit_bio()
2680 if (dev_state->state->print_mask & in __btrfsic_submit_bio()
2686 btrfsic_process_written_block(dev_state, dev_bytenr, in __btrfsic_submit_bio()
2691 } else if (NULL != dev_state && (bio->bi_opf & REQ_PREFLUSH)) { in __btrfsic_submit_bio()
2692 if (dev_state->state->print_mask & in __btrfsic_submit_bio()
2696 if (!dev_state->dummy_block_for_bio_bh_flush.is_iodone) { in __btrfsic_submit_bio()
2697 if ((dev_state->state->print_mask & in __btrfsic_submit_bio()
2702 dev_state->bdev); in __btrfsic_submit_bio()
2705 &dev_state->dummy_block_for_bio_bh_flush; in __btrfsic_submit_bio()
2710 block->flush_gen = dev_state->last_flush_gen + 1; in __btrfsic_submit_bio()
2868 b_all->logical_bytenr, b_all->dev_state->bdev, in btrfsic_unmount()