+ CERROR("Missing/short eadata\n");
+ RETURN(-EPROTO);
+ }
+ if (body->valid & OBD_MD_FLMODEASIZE) {
+ if (obddev->u.cli.cl_max_mds_easize <
+ body->max_mdsize) {
+ obddev->u.cli.cl_max_mds_easize =
+ body->max_mdsize;
+ CDEBUG(D_INFO, "maxeasize become %d\n",
+ body->max_mdsize);
+ }
+ if (obddev->u.cli.cl_max_mds_cookiesize <
+ body->max_cookiesize) {
+ obddev->u.cli.cl_max_mds_cookiesize =
+ body->max_cookiesize;
+ CDEBUG(D_INFO, "cookiesize become %d\n",
+ body->max_cookiesize);
+ }
+ }
+
+ /*
+ * We save the reply LOV EA in case we have to replay a
+ * create for recovery. If we didn't allocate a large
+ * enough request buffer above we need to reallocate it
+ * here to hold the actual LOV EA.
+ *
+ * To not save LOV EA if request is not going to replay
+ * (for example error one).
+ */
+ if ((it->it_op & IT_OPEN) && req->rq_replay) {
+ if (lustre_msg_buflen(req->rq_reqmsg,
+ DLM_INTENT_REC_OFF + 4) <
+ body->eadatasize)
+ mdc_realloc_openmsg(req, body, size);
+
+ lmm = lustre_msg_buf(req->rq_reqmsg,
+ DLM_INTENT_REC_OFF + 4,
+ body->eadatasize);
+ if (lmm)
+ memcpy(lmm, eadata, body->eadatasize);
+ }
+ }
+ if (body->valid & OBD_MD_FLRMTPERM) {
+ struct mdt_remote_perm *perm;
+
+ LASSERT(client_is_remote(exp));
+ perm = lustre_swab_repbuf(req, reply_off++,
+ sizeof(*perm),
+ lustre_swab_mdt_remote_perm);
+ if (perm == NULL) {
+ CERROR("missing remote permission!\n");
+ RETURN(-EPROTO);