- rc = req_capsule_server_pack(info->fti_pill);
- if (rc)
- RETURN(err_serious(rc));
-
- opc = req_capsule_client_get(info->fti_pill, &RMF_FLD_OPC);
- if (opc != NULL) {
- in = req_capsule_client_get(info->fti_pill, &RMF_FLD_MDFLD);
- if (in == NULL)
- RETURN(err_serious(-EPROTO));
- out = req_capsule_server_get(info->fti_pill, &RMF_FLD_MDFLD);
- if (out == NULL)
- RETURN(err_serious(-EPROTO));
- *out = *in;
-
- /* For old 2.0 client, the 'lsr_flags' is uninitialized.
- * Set it as 'LU_SEQ_RANGE_MDT' by default.
- * Old 2.0 liblustre client cannot talk with new 2.1 server. */
- if (!(exp->exp_connect_flags & OBD_CONNECT_64BITHASH) &&
- !exp->exp_libclient)
- out->lsr_flags = LU_SEQ_RANGE_MDT;
-
- rc = fld_server_handle(lu_site2md(site)->ms_server_fld,
- req->rq_svc_thread->t_env,
- *opc, out, info);
- } else
- rc = err_serious(-EPROTO);
-
- RETURN(rc);
-}
+ switch (opc) {
+ case FLD_LOOKUP:
+ rc = fld_server_lookup(env, fld, range->lsr_start, range);
+ break;
+ default:
+ rc = -EINVAL;
+ break;
+ }