Lines Matching refs:lun_req
2884 struct ctl_lun_req *lun_req;
2890 lun_req = (struct ctl_lun_req *)addr;
2891 tmp_args_nvl = lun_req->args_nvl;
2893 backend = ctl_backend_find(lun_req->backend);
2895 lun_req->status = CTL_LUN_ERROR;
2896 snprintf(lun_req->error_str,
2897 sizeof(lun_req->error_str),
2899 lun_req->backend);
2903 if (lun_req->args != NULL) {
2904 packed = malloc(lun_req->args_len, M_CTL, M_WAITOK);
2905 if (copyin(lun_req->args, packed, lun_req->args_len) != 0) {
2907 lun_req->status = CTL_LUN_ERROR;
2908 snprintf(lun_req->error_str, sizeof(lun_req->error_str),
2912 lun_req->args_nvl = nvlist_unpack(packed,
2913 lun_req->args_len, 0);
2916 if (lun_req->args_nvl == NULL) {
2917 lun_req->status = CTL_LUN_ERROR;
2918 snprintf(lun_req->error_str, sizeof(lun_req->error_str),
2923 lun_req->args_nvl = nvlist_create(0);
2926 nvlist_destroy(lun_req->args_nvl);
2927 lun_req->args_nvl = tmp_args_nvl;
2929 if (lun_req->result_nvl != NULL) {
2930 if (lun_req->result != NULL) {
2931 packed = nvlist_pack(lun_req->result_nvl,
2934 lun_req->status = CTL_LUN_ERROR;
2935 snprintf(lun_req->error_str,
2936 sizeof(lun_req->error_str),
2941 if (packed_len > lun_req->result_len) {
2942 lun_req->status = CTL_LUN_ERROR;
2943 snprintf(lun_req->error_str,
2944 sizeof(lun_req->error_str),
2950 if (copyout(packed, lun_req->result, packed_len)) {
2951 lun_req->status = CTL_LUN_ERROR;
2952 snprintf(lun_req->error_str,
2953 sizeof(lun_req->error_str),
2959 lun_req->result_len = packed_len;
2963 nvlist_destroy(lun_req->result_nvl);