Lines Matching refs:lun_req

2929 		struct ctl_lun_req *lun_req;  in ctl_ioctl()  local
2935 lun_req = (struct ctl_lun_req *)addr; in ctl_ioctl()
2936 tmp_args_nvl = lun_req->args_nvl; in ctl_ioctl()
2938 backend = ctl_backend_find(lun_req->backend); in ctl_ioctl()
2940 lun_req->status = CTL_LUN_ERROR; in ctl_ioctl()
2941 snprintf(lun_req->error_str, in ctl_ioctl()
2942 sizeof(lun_req->error_str), in ctl_ioctl()
2944 lun_req->backend); in ctl_ioctl()
2948 if (lun_req->args != NULL) { in ctl_ioctl()
2949 if (lun_req->args_len > CTL_MAX_ARGS_LEN) { in ctl_ioctl()
2950 lun_req->status = CTL_LUN_ERROR; in ctl_ioctl()
2951 snprintf(lun_req->error_str, sizeof(lun_req->error_str), in ctl_ioctl()
2955 packed = malloc(lun_req->args_len, M_CTL, M_WAITOK); in ctl_ioctl()
2956 if (copyin(lun_req->args, packed, lun_req->args_len) != 0) { in ctl_ioctl()
2958 lun_req->status = CTL_LUN_ERROR; in ctl_ioctl()
2959 snprintf(lun_req->error_str, sizeof(lun_req->error_str), in ctl_ioctl()
2963 lun_req->args_nvl = nvlist_unpack(packed, in ctl_ioctl()
2964 lun_req->args_len, 0); in ctl_ioctl()
2967 if (lun_req->args_nvl == NULL) { in ctl_ioctl()
2968 lun_req->status = CTL_LUN_ERROR; in ctl_ioctl()
2969 snprintf(lun_req->error_str, sizeof(lun_req->error_str), in ctl_ioctl()
2974 lun_req->args_nvl = nvlist_create(0); in ctl_ioctl()
2976 lun_req->result_nvl = NULL; in ctl_ioctl()
2978 nvlist_destroy(lun_req->args_nvl); in ctl_ioctl()
2979 lun_req->args_nvl = tmp_args_nvl; in ctl_ioctl()
2981 if (lun_req->result_nvl != NULL) { in ctl_ioctl()
2982 if (lun_req->result != NULL) { in ctl_ioctl()
2983 packed = nvlist_pack(lun_req->result_nvl, in ctl_ioctl()
2986 lun_req->status = CTL_LUN_ERROR; in ctl_ioctl()
2987 snprintf(lun_req->error_str, in ctl_ioctl()
2988 sizeof(lun_req->error_str), in ctl_ioctl()
2993 if (packed_len > lun_req->result_len) { in ctl_ioctl()
2994 lun_req->status = CTL_LUN_ERROR; in ctl_ioctl()
2995 snprintf(lun_req->error_str, in ctl_ioctl()
2996 sizeof(lun_req->error_str), in ctl_ioctl()
3002 if (copyout(packed, lun_req->result, packed_len)) { in ctl_ioctl()
3003 lun_req->status = CTL_LUN_ERROR; in ctl_ioctl()
3004 snprintf(lun_req->error_str, in ctl_ioctl()
3005 sizeof(lun_req->error_str), in ctl_ioctl()
3011 lun_req->result_len = packed_len; in ctl_ioctl()
3015 nvlist_destroy(lun_req->result_nvl); in ctl_ioctl()