Lines Matching refs:extent

286 		first = map->extent[idx].first;  in map_id_range_down_base()
287 last = first + map->extent[idx].count - 1; in map_id_range_down_base()
290 return &map->extent[idx]; in map_id_range_down_base()
297 struct uid_gid_extent *extent; in map_id_range_down() local
302 extent = map_id_range_down_base(extents, map, id, count); in map_id_range_down()
304 extent = map_id_range_down_max(extents, map, id, count); in map_id_range_down()
307 if (extent) in map_id_range_down()
308 id = (id - extent->first) + extent->lower_first; in map_id_range_down()
333 first = map->extent[idx].lower_first; in map_id_up_base()
334 last = first + map->extent[idx].count - 1; in map_id_up_base()
336 return &map->extent[idx]; in map_id_up_base()
360 struct uid_gid_extent *extent; in map_id_up() local
365 extent = map_id_up_base(extents, map, id); in map_id_up()
367 extent = map_id_up_max(extents, map, id); in map_id_up()
370 if (extent) in map_id_up()
371 id = (id - extent->lower_first) + extent->first; in map_id_up()
585 struct uid_gid_extent *extent = v; in uid_m_show() local
593 lower = from_kuid(lower_ns, KUIDT_INIT(extent->lower_first)); in uid_m_show()
596 extent->first, in uid_m_show()
598 extent->count); in uid_m_show()
606 struct uid_gid_extent *extent = v; in gid_m_show() local
614 lower = from_kgid(lower_ns, KGIDT_INIT(extent->lower_first)); in gid_m_show()
617 extent->first, in gid_m_show()
619 extent->count); in gid_m_show()
627 struct uid_gid_extent *extent = v; in projid_m_show() local
635 lower = from_kprojid(lower_ns, KPROJIDT_INIT(extent->lower_first)); in projid_m_show()
638 extent->first, in projid_m_show()
640 extent->count); in projid_m_show()
656 return &map->extent[pos]; in m_start()
715 struct uid_gid_extent *extent) in mappings_overlap() argument
720 upper_first = extent->first; in mappings_overlap()
721 lower_first = extent->lower_first; in mappings_overlap()
722 upper_last = upper_first + extent->count - 1; in mappings_overlap()
723 lower_last = lower_first + extent->count - 1; in mappings_overlap()
731 prev = &new_map->extent[idx]; in mappings_overlap()
758 static int insert_extent(struct uid_gid_map *map, struct uid_gid_extent *extent) in insert_extent() argument
775 memcpy(forward, map->extent, in insert_extent()
776 map->nr_extents * sizeof(map->extent[0])); in insert_extent()
783 dest = &map->extent[map->nr_extents]; in insert_extent()
787 *dest = *extent; in insert_extent()
871 extent0 = &new_map->extent[idx]; in verify_root_map()
913 struct uid_gid_extent extent; in map_write() local
975 extent.first = simple_strtoul(pos, &pos, 10); in map_write()
980 extent.lower_first = simple_strtoul(pos, &pos, 10); in map_write()
985 extent.count = simple_strtoul(pos, &pos, 10); in map_write()
995 if ((extent.first == (u32) -1) || in map_write()
996 (extent.lower_first == (u32) -1)) in map_write()
1002 if ((extent.first + extent.count) <= extent.first) in map_write()
1004 if ((extent.lower_first + extent.count) <= in map_write()
1005 extent.lower_first) in map_write()
1009 if (mappings_overlap(&new_map, &extent)) in map_write()
1016 ret = insert_extent(&new_map, &extent); in map_write()
1039 e = &new_map.extent[idx]; in map_write()
1066 memcpy(map->extent, new_map.extent, in map_write()
1067 new_map.nr_extents * sizeof(new_map.extent[0])); in map_write()
1155 if ((new_map->nr_extents == 1) && (new_map->extent[0].count == 1) && in new_idmap_permitted()
1157 u32 id = new_map->extent[0].lower_first; in new_idmap_permitted()