Lines Matching refs:ooa_hdr
467 struct ctl_ooa *ooa_hdr,
2392 struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries) in ctl_ioctl_fill_ooa() argument
2412 if (*cur_fill_num >= ooa_hdr->alloc_num) { in ctl_ioctl_fill_ooa()
2616 struct ctl_ooa *ooa_hdr; in ctl_ioctl() local
2620 ooa_hdr = (struct ctl_ooa *)addr; in ctl_ioctl()
2622 if ((ooa_hdr->alloc_len == 0) in ctl_ioctl()
2623 || (ooa_hdr->alloc_num == 0)) { in ctl_ioctl()
2626 ooa_hdr->alloc_len, ooa_hdr->alloc_num); in ctl_ioctl()
2631 if (ooa_hdr->alloc_len != (ooa_hdr->alloc_num * in ctl_ioctl()
2635 __func__, ooa_hdr->alloc_len, in ctl_ioctl()
2636 ooa_hdr->alloc_num,sizeof(struct ctl_ooa_entry)); in ctl_ioctl()
2641 entries = malloc(ooa_hdr->alloc_len, M_CTL, M_WAITOK | M_ZERO); in ctl_ioctl()
2644 "dump\n", __func__, ooa_hdr->alloc_len); in ctl_ioctl()
2650 if ((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0 && in ctl_ioctl()
2651 (ooa_hdr->lun_num >= ctl_max_luns || in ctl_ioctl()
2652 softc->ctl_luns[ooa_hdr->lun_num] == NULL)) { in ctl_ioctl()
2656 __func__, (uintmax_t)ooa_hdr->lun_num); in ctl_ioctl()
2663 if (ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) { in ctl_ioctl()
2666 ooa_hdr, entries); in ctl_ioctl()
2669 lun = softc->ctl_luns[ooa_hdr->lun_num]; in ctl_ioctl()
2670 ctl_ioctl_fill_ooa(lun, &cur_fill_num, ooa_hdr, in ctl_ioctl()
2675 ooa_hdr->fill_num = min(cur_fill_num, ooa_hdr->alloc_num); in ctl_ioctl()
2676 ooa_hdr->fill_len = ooa_hdr->fill_num * in ctl_ioctl()
2678 retval = copyout(entries, ooa_hdr->entries, ooa_hdr->fill_len); in ctl_ioctl()
2681 __func__, ooa_hdr->fill_len); in ctl_ioctl()
2684 getbinuptime(&ooa_hdr->cur_bt); in ctl_ioctl()
2686 if (cur_fill_num > ooa_hdr->alloc_num) { in ctl_ioctl()
2687 ooa_hdr->dropped_num = cur_fill_num -ooa_hdr->alloc_num; in ctl_ioctl()
2688 ooa_hdr->status = CTL_OOA_NEED_MORE_SPACE; in ctl_ioctl()
2690 ooa_hdr->dropped_num = 0; in ctl_ioctl()
2691 ooa_hdr->status = CTL_OOA_OK; in ctl_ioctl()