- if (req_capsule_get_size(tsi->tsi_pill, &RMF_CAPA1, RCL_CLIENT))
- mdt_set_capainfo(info, 0, &info->mti_body->mbo_fid1,
- req_capsule_client_get(info->mti_pill,
- &RMF_CAPA1));
-
- /* Coordinator information */
- hal_size = sizeof(*hal) +
- cfs_size_round(MTI_NAME_MAXLEN) /* fsname */ +
- cfs_size_round(sizeof(*hai));
-
- MDT_HSM_ALLOC(hal, hal_size);
- if (hal == NULL)
- GOTO(out_ucred, rc = -ENOMEM);
-
- hal->hal_version = HAL_VERSION;
- hal->hal_archive_id = 0;
- hal->hal_flags = 0;
- obd_uuid2fsname(hal->hal_fsname, mdt_obd_name(info->mti_mdt),
- MTI_NAME_MAXLEN);
- hal->hal_count = 1;
- hai = hai_first(hal);
- hai->hai_action = HSMA_NONE;
- hai->hai_cookie = 0;
- hai->hai_gid = 0;
- hai->hai_fid = info->mti_body->mbo_fid1;
- hai->hai_len = sizeof(*hai);
-
- rc = mdt_hsm_get_actions(info, hal);
- if (rc)
- GOTO(out_free, rc);
-
- /* cookie is used to give back request status */
- if (hai->hai_cookie == 0)
- hca->hca_state = HPS_WAITING;
- else
- hca->hca_state = HPS_RUNNING;