sbio 2152 drivers/md/raid1.c struct bio *sbio = r1_bio->bios[i]; sbio 2153 drivers/md/raid1.c blk_status_t status = sbio->bi_status; sbio 2155 drivers/md/raid1.c struct page **spages = get_resync_pages(sbio)->pages; sbio 2160 drivers/md/raid1.c if (sbio->bi_end_io != end_sync_read) sbio 2163 drivers/md/raid1.c sbio->bi_status = 0; sbio 2165 drivers/md/raid1.c bio_for_each_segment_all(bi, sbio, iter_all) sbio 2182 drivers/md/raid1.c sbio->bi_end_io = NULL; sbio 2187 drivers/md/raid1.c bio_copy_data(sbio, pbio); sbio 547 fs/btrfs/scrub.c struct scrub_bio *sbio = sctx->bios[sctx->curr]; sbio 549 fs/btrfs/scrub.c for (i = 0; i < sbio->page_count; i++) { sbio 550 fs/btrfs/scrub.c WARN_ON(!sbio->pagev[i]->page); sbio 551 fs/btrfs/scrub.c scrub_block_put(sbio->pagev[i]->sblock); sbio 553 fs/btrfs/scrub.c bio_put(sbio->bio); sbio 557 fs/btrfs/scrub.c struct scrub_bio *sbio = sctx->bios[i]; sbio 559 fs/btrfs/scrub.c if (!sbio) sbio 561 fs/btrfs/scrub.c kfree(sbio); sbio 591 fs/btrfs/scrub.c struct scrub_bio *sbio; sbio 593 fs/btrfs/scrub.c sbio = kzalloc(sizeof(*sbio), GFP_KERNEL); sbio 594 fs/btrfs/scrub.c if (!sbio) sbio 596 fs/btrfs/scrub.c sctx->bios[i] = sbio; sbio 598 fs/btrfs/scrub.c sbio->index = i; sbio 599 fs/btrfs/scrub.c sbio->sctx = sctx; sbio 600 fs/btrfs/scrub.c sbio->page_count = 0; sbio 601 fs/btrfs/scrub.c btrfs_init_work(&sbio->work, scrub_bio_end_io_worker, NULL, sbio 1633 fs/btrfs/scrub.c struct scrub_bio *sbio; sbio 1648 fs/btrfs/scrub.c sbio = sctx->wr_curr_bio; sbio 1649 fs/btrfs/scrub.c if (sbio->page_count == 0) { sbio 1652 fs/btrfs/scrub.c sbio->physical = spage->physical_for_dev_replace; sbio 1653 fs/btrfs/scrub.c sbio->logical = spage->logical; sbio 1654 fs/btrfs/scrub.c sbio->dev = sctx->wr_tgtdev; sbio 1655 fs/btrfs/scrub.c bio = sbio->bio; sbio 1658 fs/btrfs/scrub.c sbio->bio = bio; sbio 1661 fs/btrfs/scrub.c bio->bi_private = sbio; sbio 1663 fs/btrfs/scrub.c bio_set_dev(bio, sbio->dev->bdev); sbio 1664 fs/btrfs/scrub.c bio->bi_iter.bi_sector = sbio->physical >> 9; sbio 1666 fs/btrfs/scrub.c sbio->status = 0; sbio 1667 fs/btrfs/scrub.c } else if (sbio->physical + sbio->page_count * PAGE_SIZE != sbio 1669 fs/btrfs/scrub.c sbio->logical + sbio->page_count * PAGE_SIZE != sbio 1675 fs/btrfs/scrub.c ret = bio_add_page(sbio->bio, spage->page, PAGE_SIZE, 0); sbio 1677 fs/btrfs/scrub.c if (sbio->page_count < 1) { sbio 1678 fs/btrfs/scrub.c bio_put(sbio->bio); sbio 1679 fs/btrfs/scrub.c sbio->bio = NULL; sbio 1687 fs/btrfs/scrub.c sbio->pagev[sbio->page_count] = spage; sbio 1689 fs/btrfs/scrub.c sbio->page_count++; sbio 1690 fs/btrfs/scrub.c if (sbio->page_count == sctx->pages_per_wr_bio) sbio 1699 fs/btrfs/scrub.c struct scrub_bio *sbio; sbio 1704 fs/btrfs/scrub.c sbio = sctx->wr_curr_bio; sbio 1706 fs/btrfs/scrub.c WARN_ON(!sbio->bio->bi_disk); sbio 1712 fs/btrfs/scrub.c btrfsic_submit_bio(sbio->bio); sbio 1717 fs/btrfs/scrub.c struct scrub_bio *sbio = bio->bi_private; sbio 1718 fs/btrfs/scrub.c struct btrfs_fs_info *fs_info = sbio->dev->fs_info; sbio 1720 fs/btrfs/scrub.c sbio->status = bio->bi_status; sbio 1721 fs/btrfs/scrub.c sbio->bio = bio; sbio 1723 fs/btrfs/scrub.c btrfs_init_work(&sbio->work, scrub_wr_bio_end_io_worker, NULL, NULL); sbio 1724 fs/btrfs/scrub.c btrfs_queue_work(fs_info->scrub_wr_completion_workers, &sbio->work); sbio 1729 fs/btrfs/scrub.c struct scrub_bio *sbio = container_of(work, struct scrub_bio, work); sbio 1730 fs/btrfs/scrub.c struct scrub_ctx *sctx = sbio->sctx; sbio 1733 fs/btrfs/scrub.c WARN_ON(sbio->page_count > SCRUB_PAGES_PER_WR_BIO); sbio 1734 fs/btrfs/scrub.c if (sbio->status) { sbio 1736 fs/btrfs/scrub.c &sbio->sctx->fs_info->dev_replace; sbio 1738 fs/btrfs/scrub.c for (i = 0; i < sbio->page_count; i++) { sbio 1739 fs/btrfs/scrub.c struct scrub_page *spage = sbio->pagev[i]; sbio 1746 fs/btrfs/scrub.c for (i = 0; i < sbio->page_count; i++) sbio 1747 fs/btrfs/scrub.c scrub_page_put(sbio->pagev[i]); sbio 1749 fs/btrfs/scrub.c bio_put(sbio->bio); sbio 1750 fs/btrfs/scrub.c kfree(sbio); sbio 2022 fs/btrfs/scrub.c struct scrub_bio *sbio; sbio 2027 fs/btrfs/scrub.c sbio = sctx->bios[sctx->curr]; sbio 2030 fs/btrfs/scrub.c btrfsic_submit_bio(sbio->bio); sbio 2037 fs/btrfs/scrub.c struct scrub_bio *sbio; sbio 2057 fs/btrfs/scrub.c sbio = sctx->bios[sctx->curr]; sbio 2058 fs/btrfs/scrub.c if (sbio->page_count == 0) { sbio 2061 fs/btrfs/scrub.c sbio->physical = spage->physical; sbio 2062 fs/btrfs/scrub.c sbio->logical = spage->logical; sbio 2063 fs/btrfs/scrub.c sbio->dev = spage->dev; sbio 2064 fs/btrfs/scrub.c bio = sbio->bio; sbio 2067 fs/btrfs/scrub.c sbio->bio = bio; sbio 2070 fs/btrfs/scrub.c bio->bi_private = sbio; sbio 2072 fs/btrfs/scrub.c bio_set_dev(bio, sbio->dev->bdev); sbio 2073 fs/btrfs/scrub.c bio->bi_iter.bi_sector = sbio->physical >> 9; sbio 2075 fs/btrfs/scrub.c sbio->status = 0; sbio 2076 fs/btrfs/scrub.c } else if (sbio->physical + sbio->page_count * PAGE_SIZE != sbio 2078 fs/btrfs/scrub.c sbio->logical + sbio->page_count * PAGE_SIZE != sbio 2080 fs/btrfs/scrub.c sbio->dev != spage->dev) { sbio 2085 fs/btrfs/scrub.c sbio->pagev[sbio->page_count] = spage; sbio 2086 fs/btrfs/scrub.c ret = bio_add_page(sbio->bio, spage->page, PAGE_SIZE, 0); sbio 2088 fs/btrfs/scrub.c if (sbio->page_count < 1) { sbio 2089 fs/btrfs/scrub.c bio_put(sbio->bio); sbio 2090 fs/btrfs/scrub.c sbio->bio = NULL; sbio 2099 fs/btrfs/scrub.c sbio->page_count++; sbio 2100 fs/btrfs/scrub.c if (sbio->page_count == sctx->pages_per_rd_bio) sbio 2313 fs/btrfs/scrub.c struct scrub_bio *sbio = bio->bi_private; sbio 2314 fs/btrfs/scrub.c struct btrfs_fs_info *fs_info = sbio->dev->fs_info; sbio 2316 fs/btrfs/scrub.c sbio->status = bio->bi_status; sbio 2317 fs/btrfs/scrub.c sbio->bio = bio; sbio 2319 fs/btrfs/scrub.c btrfs_queue_work(fs_info->scrub_workers, &sbio->work); sbio 2324 fs/btrfs/scrub.c struct scrub_bio *sbio = container_of(work, struct scrub_bio, work); sbio 2325 fs/btrfs/scrub.c struct scrub_ctx *sctx = sbio->sctx; sbio 2328 fs/btrfs/scrub.c BUG_ON(sbio->page_count > SCRUB_PAGES_PER_RD_BIO); sbio 2329 fs/btrfs/scrub.c if (sbio->status) { sbio 2330 fs/btrfs/scrub.c for (i = 0; i < sbio->page_count; i++) { sbio 2331 fs/btrfs/scrub.c struct scrub_page *spage = sbio->pagev[i]; sbio 2339 fs/btrfs/scrub.c for (i = 0; i < sbio->page_count; i++) { sbio 2340 fs/btrfs/scrub.c struct scrub_page *spage = sbio->pagev[i]; sbio 2348 fs/btrfs/scrub.c bio_put(sbio->bio); sbio 2349 fs/btrfs/scrub.c sbio->bio = NULL; sbio 2351 fs/btrfs/scrub.c sbio->next_free = sctx->first_free; sbio 2352 fs/btrfs/scrub.c sctx->first_free = sbio->index;