Lines Matching full:bsi
9723 struct btrfs_swap_info *bsi) in btrfs_add_swap_extent() argument
9735 if (bsi->nr_pages >= sis->max) in btrfs_add_swap_extent()
9738 max_pages = sis->max - bsi->nr_pages; in btrfs_add_swap_extent()
9739 first_ppage = PAGE_ALIGN(bsi->block_start) >> PAGE_SHIFT; in btrfs_add_swap_extent()
9740 next_ppage = PAGE_ALIGN_DOWN(bsi->block_start + bsi->block_len) >> PAGE_SHIFT; in btrfs_add_swap_extent()
9748 if (bsi->start == 0) in btrfs_add_swap_extent()
9750 if (bsi->lowest_ppage > first_ppage_reported) in btrfs_add_swap_extent()
9751 bsi->lowest_ppage = first_ppage_reported; in btrfs_add_swap_extent()
9752 if (bsi->highest_ppage < (next_ppage - 1)) in btrfs_add_swap_extent()
9753 bsi->highest_ppage = next_ppage - 1; in btrfs_add_swap_extent()
9755 ret = add_swap_extent(sis, bsi->nr_pages, nr_pages, first_ppage); in btrfs_add_swap_extent()
9758 bsi->nr_extents += ret; in btrfs_add_swap_extent()
9759 bsi->nr_pages += nr_pages; in btrfs_add_swap_extent()
9782 struct btrfs_swap_info bsi = { in btrfs_swap_activate() local
9980 if (bsi.block_len && in btrfs_swap_activate()
9981 bsi.block_start + bsi.block_len == physical_block_start) { in btrfs_swap_activate()
9982 bsi.block_len += len; in btrfs_swap_activate()
9984 if (bsi.block_len) { in btrfs_swap_activate()
9985 ret = btrfs_add_swap_extent(sis, &bsi); in btrfs_swap_activate()
9989 bsi.start = start; in btrfs_swap_activate()
9990 bsi.block_start = physical_block_start; in btrfs_swap_activate()
9991 bsi.block_len = len; in btrfs_swap_activate()
9997 if (bsi.block_len) in btrfs_swap_activate()
9998 ret = btrfs_add_swap_extent(sis, &bsi); in btrfs_swap_activate()
10020 *span = bsi.highest_ppage - bsi.lowest_ppage + 1; in btrfs_swap_activate()
10021 sis->max = bsi.nr_pages; in btrfs_swap_activate()
10022 sis->pages = bsi.nr_pages - 1; in btrfs_swap_activate()
10023 sis->highest_bit = bsi.nr_pages - 1; in btrfs_swap_activate()
10024 return bsi.nr_extents; in btrfs_swap_activate()