Lines Matching defs:bio

5 #include <linux/bio.h>
23 #include "bio.h"
96 * Structure to record info about the bio being assembled, and other info like
115 /* Caller should ensure the bio has at least some range added */
116 ASSERT(bbio->bio.bi_iter.bi_size);
118 if (btrfs_op(&bbio->bio) == BTRFS_MAP_READ &&
129 * Submit or fail the current bio in the bio_ctrl structure.
141 /* The bio is owned by the end_io handler now */
462 struct bio *bio = &bbio->bio;
463 int error = blk_status_to_errno(bio->bi_status);
467 ASSERT(!bio_flagged(bio, BIO_CLONED));
468 bio_for_each_segment_all(bvec, bio, iter_all) {
492 bio_put(bio);
537 * - bio can be merged as long as on-disk bytenr is contiguous
587 struct bio *bio = &bbio->bio;
591 * The offset to the beginning of a bio, since one bio can never be
597 ASSERT(!bio_flagged(bio, BIO_CLONED));
598 bio_for_each_segment_all(bvec, bio, iter_all) {
599 bool uptodate = !bio->bi_status;
610 bio->bi_iter.bi_sector, bio->bi_status,
667 bio_put(bio);
715 struct bio *bio = &bio_ctrl->bbio->bio;
716 struct bio_vec *bvec = bio_last_bvec_all(bio);
724 return bio->bi_iter.bi_sector == sector;
738 return bio_end_sector(bio) == sector &&
752 bbio->bio.bi_iter.bi_sector = disk_bytenr >> SECTOR_SHIFT;
776 bio_set_dev(&bbio->bio, fs_info->fs_devices->latest_dev->bdev);
777 wbc_init_bio(bio_ctrl->wbc, &bbio->bio);
783 * @page: page to add to the bio
785 * @pg_offset: offset of the new bio or to check whether we are adding
809 /* Allocate new bio if needed */
822 if (bio_add_page(&bio_ctrl->bbio->bio, page, len, pg_offset) != len) {
823 /* bio full: move on to a new one */
847 * we hit the bio limit of UINT_MAX. bio_add_page() has all
848 * the checks required to make sure we don't overflow the bio,
852 * It's pretty hard to make a bio sized U32_MAX, but it can
859 /* Ordered extent boundary: move on to a new bio. */
1050 * single bio to populate the pages for the 2 ranges because
1063 * If the bio to read the compressed extent covers both ranges,
1070 * make the compressed bio endio callback populate the pages
1071 * for both ranges because each compressed bio is tightly
1138 * bio to do the cleanup.
1480 * Return %true is the extent buffer is submitted to bio.
1615 bool uptodate = !bbio->bio.bi_status;
1623 bio_for_each_segment_all(bvec, &bbio->bio, iter_all) {
1636 bio_put(&bbio->bio);
1678 bbio->bio.bi_iter.bi_sector = eb->start >> SECTOR_SHIFT;
1679 bio_set_dev(&bbio->bio, fs_info->fs_devices->latest_dev->bdev);
1680 wbc_init_bio(wbc, &bbio->bio);
1693 __bio_add_page(&bbio->bio, p, eb->len, eb->start - page_offset(p));
1703 __bio_add_page(&bbio->bio, p, PAGE_SIZE, 0);
1719 * - Flush write bio
1720 * We only flush bio if we may be unable to fit current extent buffers into
1721 * current bio.
1944 * If something went wrong, don't allow any metadata write bio to be
1989 * @bio_ctrl: holds context for the write, namely the bio
2137 * page in our current bio, and thus deadlock, so flush the
2138 * write bio here.
2152 * Submit the pages in the range to bio for call sites which delalloc range has
3962 bool uptodate = !bbio->bio.bi_status;
3980 bio_for_each_segment_all(bvec, &bbio->bio, iter_all) {
3998 bio_put(&bbio->bio);
4030 bbio->bio.bi_iter.bi_sector = eb->start >> SECTOR_SHIFT;
4035 __bio_add_page(&bbio->bio, eb->pages[0], eb->len,
4039 __bio_add_page(&bbio->bio, eb->pages[i], PAGE_SIZE, 0);