Lines Matching refs:extent
281 first = map->extent[idx].first; in map_id_range_down_base()
282 last = first + map->extent[idx].count - 1; in map_id_range_down_base()
285 return &map->extent[idx]; in map_id_range_down_base()
292 struct uid_gid_extent *extent; in map_id_range_down() local
297 extent = map_id_range_down_base(extents, map, id, count); in map_id_range_down()
299 extent = map_id_range_down_max(extents, map, id, count); in map_id_range_down()
302 if (extent) in map_id_range_down()
303 id = (id - extent->first) + extent->lower_first; in map_id_range_down()
328 first = map->extent[idx].lower_first; in map_id_up_base()
329 last = first + map->extent[idx].count - 1; in map_id_up_base()
331 return &map->extent[idx]; in map_id_up_base()
355 struct uid_gid_extent *extent; in map_id_up() local
360 extent = map_id_up_base(extents, map, id); in map_id_up()
362 extent = map_id_up_max(extents, map, id); in map_id_up()
365 if (extent) in map_id_up()
366 id = (id - extent->lower_first) + extent->first; in map_id_up()
580 struct uid_gid_extent *extent = v; in uid_m_show() local
588 lower = from_kuid(lower_ns, KUIDT_INIT(extent->lower_first)); in uid_m_show()
591 extent->first, in uid_m_show()
593 extent->count); in uid_m_show()
601 struct uid_gid_extent *extent = v; in gid_m_show() local
609 lower = from_kgid(lower_ns, KGIDT_INIT(extent->lower_first)); in gid_m_show()
612 extent->first, in gid_m_show()
614 extent->count); in gid_m_show()
622 struct uid_gid_extent *extent = v; in projid_m_show() local
630 lower = from_kprojid(lower_ns, KPROJIDT_INIT(extent->lower_first)); in projid_m_show()
633 extent->first, in projid_m_show()
635 extent->count); in projid_m_show()
651 return &map->extent[pos]; in m_start()
710 struct uid_gid_extent *extent) in mappings_overlap() argument
715 upper_first = extent->first; in mappings_overlap()
716 lower_first = extent->lower_first; in mappings_overlap()
717 upper_last = upper_first + extent->count - 1; in mappings_overlap()
718 lower_last = lower_first + extent->count - 1; in mappings_overlap()
726 prev = &new_map->extent[idx]; in mappings_overlap()
753 static int insert_extent(struct uid_gid_map *map, struct uid_gid_extent *extent) in insert_extent() argument
770 memcpy(forward, map->extent, in insert_extent()
771 map->nr_extents * sizeof(map->extent[0])); in insert_extent()
778 dest = &map->extent[map->nr_extents]; in insert_extent()
782 *dest = *extent; in insert_extent()
854 struct uid_gid_extent extent; in map_write() local
916 extent.first = simple_strtoul(pos, &pos, 10); in map_write()
921 extent.lower_first = simple_strtoul(pos, &pos, 10); in map_write()
926 extent.count = simple_strtoul(pos, &pos, 10); in map_write()
936 if ((extent.first == (u32) -1) || in map_write()
937 (extent.lower_first == (u32) -1)) in map_write()
943 if ((extent.first + extent.count) <= extent.first) in map_write()
945 if ((extent.lower_first + extent.count) <= in map_write()
946 extent.lower_first) in map_write()
950 if (mappings_overlap(&new_map, &extent)) in map_write()
957 ret = insert_extent(&new_map, &extent); in map_write()
980 e = &new_map.extent[idx]; in map_write()
1007 memcpy(map->extent, new_map.extent, in map_write()
1008 new_map.nr_extents * sizeof(new_map.extent[0])); in map_write()
1092 if ((new_map->nr_extents == 1) && (new_map->extent[0].count == 1) && in new_idmap_permitted()
1094 u32 id = new_map->extent[0].lower_first; in new_idmap_permitted()