Lines Matching +full:slice +full:- +full:per +full:- +full:line

128 	if (dp->p.generic == NULL) {  in dm_get_associated_descriptors()
134 switch (dp->type) { in dm_get_associated_descriptors()
212 if (dp->p.generic == NULL) { in dm_get_attributes()
218 switch (dp->type) { in dm_get_attributes()
359 if (dp->p.generic == NULL) { in dm_get_name()
365 switch (dp->type) { in dm_get_name()
424 if (dp->p.generic == NULL) { in dm_get_stats()
430 switch (dp->type) { in dm_get_stats()
487 return (-1); in dm_get_type()
492 return (dp->type); in dm_get_type()
535 * Convenience function to get slice stats
538 dm_get_slice_stats(char *slice, nvlist_t **dev_stats, int *errp) in dm_get_slice_stats() argument
545 if (slice == NULL) { in dm_get_slice_stats()
553 devp = dm_get_descriptor_by_name(DM_SLICE, slice, errp); in dm_get_slice_stats()
561 * Checks for overlapping slices. If the given device is a slice, and it
562 * overlaps with any non-backup slice on the disk, return true with a detailed
568 dm_descriptor_t slice = 0; in dm_isoverlapping() local
581 slice = dm_get_descriptor_by_name(DM_SLICE, slicename, errp); in dm_isoverlapping()
582 if (slice == 0) in dm_isoverlapping()
589 media = dm_get_associated_descriptors(slice, DM_MEDIA, errp); in dm_isoverlapping()
605 slice_attrs = dm_get_attributes(slice, errp); in dm_isoverlapping()
621 end_block = (start_block + size) - 1; in dm_isoverlapping()
649 ret = -1; in dm_isoverlapping()
653 other_end = (other_size + other_start) - 1; in dm_isoverlapping()
660 ret = -1; in dm_isoverlapping()
666 * on this media in the same region as this slice. in dm_isoverlapping()
668 * Slice 2 is the backup slice if it is the size in dm_isoverlapping()
670 * If slice 2 is the overlap and slice 2 is the size of in dm_isoverlapping()
671 * the whole disk, continue. If another slice is found in dm_isoverlapping()
672 * that overlaps with our slice, return it. in dm_isoverlapping()
673 * There is the potential that there is more than one slice in dm_isoverlapping()
674 * that our slice overlaps with, however, we only return in dm_isoverlapping()
675 * the first overlapping slice we find. in dm_isoverlapping()
686 ret = -1; in dm_isoverlapping()
704 ret = -1; in dm_isoverlapping()
725 if (slice) in dm_isoverlapping()
726 dm_free_descriptor(slice); in dm_isoverlapping()
732 * Get the full list of swap entries. Returns -1 on error, or >= 0 to
749 return (-1); in dm_get_swapentries()
760 return (-1); in dm_get_swapentries()
767 return (-1); in dm_get_swapentries()
771 tbl->swt_n = count; in dm_get_swapentries()
773 tbl->swt_ent[i].ste_path = ptr; in dm_get_swapentries()
783 return (-1); in dm_get_swapentries()
796 free(stp->swt_ent[0].ste_path); in dm_free_swapentries()
801 * Check a slice to see if it's being used by swap.
816 return (-1); in dm_inuse_swap()
827 while (count--) { in dm_inuse_swap()
828 if (strcmp(dev_name, tbl->swt_ent[count].ste_path) == 0) { in dm_inuse_swap()
876 * Slice stats for swap devices are only returned if mounted in dm_inuse()
879 * to perform in-use checking. in dm_inuse()
905 * block name, we might not be able to get the slice in dm_inuse()
971 strcmp(data, "-") == 0) { in dm_inuse()
1260 return (-1); in build_usage_string()
1272 * are listed 1 per line for ease of in build_usage_string()
1279 return (-1); in build_usage_string()