Lines Matching refs:ooa_hdr
400 struct ctl_ooa *ooa_hdr,
2438 struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries) in ctl_ioctl_fill_ooa() argument
2460 if (*cur_fill_num >= ooa_hdr->alloc_num) { in ctl_ioctl_fill_ooa()
2664 struct ctl_ooa *ooa_hdr; in ctl_ioctl() local
2668 ooa_hdr = (struct ctl_ooa *)addr; in ctl_ioctl()
2670 if ((ooa_hdr->alloc_len == 0) in ctl_ioctl()
2671 || (ooa_hdr->alloc_num == 0)) { in ctl_ioctl()
2674 ooa_hdr->alloc_len, ooa_hdr->alloc_num); in ctl_ioctl()
2679 if (ooa_hdr->alloc_len != (ooa_hdr->alloc_num * in ctl_ioctl()
2683 __func__, ooa_hdr->alloc_len, in ctl_ioctl()
2684 ooa_hdr->alloc_num,sizeof(struct ctl_ooa_entry)); in ctl_ioctl()
2689 entries = malloc(ooa_hdr->alloc_len, M_CTL, M_WAITOK | M_ZERO); in ctl_ioctl()
2692 if ((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0 && in ctl_ioctl()
2693 (ooa_hdr->lun_num >= ctl_max_luns || in ctl_ioctl()
2694 softc->ctl_luns[ooa_hdr->lun_num] == NULL)) { in ctl_ioctl()
2698 __func__, (uintmax_t)ooa_hdr->lun_num); in ctl_ioctl()
2705 if (ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) { in ctl_ioctl()
2708 ooa_hdr, entries); in ctl_ioctl()
2711 lun = softc->ctl_luns[ooa_hdr->lun_num]; in ctl_ioctl()
2712 ctl_ioctl_fill_ooa(lun, &cur_fill_num, ooa_hdr, in ctl_ioctl()
2717 ooa_hdr->fill_num = min(cur_fill_num, ooa_hdr->alloc_num); in ctl_ioctl()
2718 ooa_hdr->fill_len = ooa_hdr->fill_num * in ctl_ioctl()
2720 retval = copyout(entries, ooa_hdr->entries, ooa_hdr->fill_len); in ctl_ioctl()
2723 __func__, ooa_hdr->fill_len); in ctl_ioctl()
2726 getbinuptime(&ooa_hdr->cur_bt); in ctl_ioctl()
2728 if (cur_fill_num > ooa_hdr->alloc_num) { in ctl_ioctl()
2729 ooa_hdr->dropped_num = cur_fill_num -ooa_hdr->alloc_num; in ctl_ioctl()
2730 ooa_hdr->status = CTL_OOA_NEED_MORE_SPACE; in ctl_ioctl()
2732 ooa_hdr->dropped_num = 0; in ctl_ioctl()
2733 ooa_hdr->status = CTL_OOA_OK; in ctl_ioctl()