Lines Matching refs:cluster

157 	struct file_extent_cluster cluster;  member
2679 const struct file_extent_cluster *cluster = &rc->cluster; in prealloc_file_extent_cluster() local
2688 u64 prealloc_start = cluster->start - offset; in prealloc_file_extent_cluster()
2689 u64 prealloc_end = cluster->end - offset; in prealloc_file_extent_cluster()
2707 BUG_ON(cluster->start != cluster->boundary[0]); in prealloc_file_extent_cluster()
2714 for (nr = 0; nr < cluster->nr; nr++) { in prealloc_file_extent_cluster()
2717 start = cluster->boundary[nr] - offset; in prealloc_file_extent_cluster()
2718 if (nr + 1 < cluster->nr) in prealloc_file_extent_cluster()
2719 end = cluster->boundary[nr + 1] - 1 - offset; in prealloc_file_extent_cluster()
2721 end = cluster->end - offset; in prealloc_file_extent_cluster()
2747 u64 start = rc->cluster.start - offset; in setup_relocation_extent_mapping()
2748 u64 end = rc->cluster.end - offset; in setup_relocation_extent_mapping()
2757 em->disk_bytenr = rc->cluster.start; in setup_relocation_extent_mapping()
2781 static u64 get_cluster_boundary_end(const struct file_extent_cluster *cluster, in get_cluster_boundary_end() argument
2785 if (cluster_nr >= cluster->nr - 1) in get_cluster_boundary_end()
2786 return cluster->end; in get_cluster_boundary_end()
2789 return cluster->boundary[cluster_nr + 1] - 1; in get_cluster_boundary_end()
2796 const struct file_extent_cluster *cluster = &rc->cluster; in relocate_one_folio() local
2801 const pgoff_t last_index = (cluster->end - offset) >> PAGE_SHIFT; in relocate_one_folio()
2869 cur = max(folio_start, cluster->boundary[*cluster_nr] - offset); in relocate_one_folio()
2872 u64 extent_start = cluster->boundary[*cluster_nr] - offset; in relocate_one_folio()
2873 u64 extent_end = get_cluster_boundary_end(cluster, in relocate_one_folio()
2911 if (in_range(cluster->boundary[*cluster_nr] - offset, in relocate_one_folio()
2913 u64 boundary_start = cluster->boundary[*cluster_nr] - in relocate_one_folio()
2931 if (*cluster_nr >= cluster->nr) in relocate_one_folio()
2954 const struct file_extent_cluster *cluster = &rc->cluster; in relocate_file_extent_cluster() local
2956 u64 cur_file_offset = cluster->start - offset; in relocate_file_extent_cluster()
2961 if (!cluster->nr) in relocate_file_extent_cluster()
2978 while (cur_file_offset < cluster->end - offset) { in relocate_file_extent_cluster()
2984 WARN_ON(cluster_nr != cluster->nr); in relocate_file_extent_cluster()
2994 struct file_extent_cluster *cluster = &rc->cluster; in relocate_data_extent() local
2998 if (cluster->nr > 0 && extent_key->objectid != cluster->end + 1) { in relocate_data_extent()
3002 cluster->nr = 0; in relocate_data_extent()
3016 if (cluster->nr > 0 && cluster->owning_root != root->relocation_src_root) { in relocate_data_extent()
3024 root->relocation_src_root = cluster->owning_root; in relocate_data_extent()
3028 cluster->nr = 0; in relocate_data_extent()
3033 if (!cluster->nr) { in relocate_data_extent()
3034 cluster->start = extent_key->objectid; in relocate_data_extent()
3035 cluster->owning_root = root->relocation_src_root; in relocate_data_extent()
3038 BUG_ON(cluster->nr >= MAX_EXTENTS); in relocate_data_extent()
3039 cluster->end = extent_key->objectid + extent_key->offset - 1; in relocate_data_extent()
3040 cluster->boundary[cluster->nr] = extent_key->objectid; in relocate_data_extent()
3041 cluster->nr++; in relocate_data_extent()
3043 if (cluster->nr >= MAX_EXTENTS) { in relocate_data_extent()
3047 cluster->nr = 0; in relocate_data_extent()
3472 memset(&rc->cluster, 0, sizeof(rc->cluster)); in prepare_to_relocate()