Lines Matching refs:bsi
10526 struct btrfs_swap_info *bsi) in btrfs_add_swap_extent() argument
10538 if (bsi->nr_pages >= sis->max) in btrfs_add_swap_extent()
10541 max_pages = sis->max - bsi->nr_pages; in btrfs_add_swap_extent()
10542 first_ppage = PAGE_ALIGN(bsi->block_start) >> PAGE_SHIFT; in btrfs_add_swap_extent()
10543 next_ppage = PAGE_ALIGN_DOWN(bsi->block_start + bsi->block_len) >> PAGE_SHIFT; in btrfs_add_swap_extent()
10551 if (bsi->start == 0) in btrfs_add_swap_extent()
10553 if (bsi->lowest_ppage > first_ppage_reported) in btrfs_add_swap_extent()
10554 bsi->lowest_ppage = first_ppage_reported; in btrfs_add_swap_extent()
10555 if (bsi->highest_ppage < (next_ppage - 1)) in btrfs_add_swap_extent()
10556 bsi->highest_ppage = next_ppage - 1; in btrfs_add_swap_extent()
10558 ret = add_swap_extent(sis, bsi->nr_pages, nr_pages, first_ppage); in btrfs_add_swap_extent()
10561 bsi->nr_extents += ret; in btrfs_add_swap_extent()
10562 bsi->nr_pages += nr_pages; in btrfs_add_swap_extent()
10584 struct btrfs_swap_info bsi = { in btrfs_swap_activate() local
10782 if (bsi.block_len && in btrfs_swap_activate()
10783 bsi.block_start + bsi.block_len == physical_block_start) { in btrfs_swap_activate()
10784 bsi.block_len += len; in btrfs_swap_activate()
10786 if (bsi.block_len) { in btrfs_swap_activate()
10787 ret = btrfs_add_swap_extent(sis, &bsi); in btrfs_swap_activate()
10791 bsi.start = start; in btrfs_swap_activate()
10792 bsi.block_start = physical_block_start; in btrfs_swap_activate()
10793 bsi.block_len = len; in btrfs_swap_activate()
10799 if (bsi.block_len) in btrfs_swap_activate()
10800 ret = btrfs_add_swap_extent(sis, &bsi); in btrfs_swap_activate()
10820 *span = bsi.highest_ppage - bsi.lowest_ppage + 1; in btrfs_swap_activate()
10821 sis->max = bsi.nr_pages; in btrfs_swap_activate()
10822 sis->pages = bsi.nr_pages - 1; in btrfs_swap_activate()
10823 sis->highest_bit = bsi.nr_pages - 1; in btrfs_swap_activate()
10824 return bsi.nr_extents; in btrfs_swap_activate()