if (mdt_object_remote(o)) {
/* This object is located on remote node.*/
+ /* Return -EIO for old client */
+ if (!mdt_is_dne_client(req->rq_export))
+ GOTO(out, rc = -EIO);
+
repbody->fid1 = *mdt_object_fid(o);
repbody->valid = OBD_MD_FLID | OBD_MD_MDS;
GOTO(out, rc = 0);
int rc;
ENTRY;
- desc = ptlrpc_prep_bulk_exp(req, rdpg->rp_npages, BULK_PUT_SOURCE,
- MDS_BULK_PORTAL);
- if (desc == NULL)
- RETURN(-ENOMEM);
+ desc = ptlrpc_prep_bulk_exp(req, rdpg->rp_npages, 1, BULK_PUT_SOURCE,
+ MDS_BULK_PORTAL);
+ if (desc == NULL)
+ RETURN(-ENOMEM);
if (!(exp_connect_flags(exp) & OBD_CONNECT_BRW_SIZE))
/* old client requires reply size in it's PAGE_SIZE,
if (exp_connect_flags(info->mti_exp) & OBD_CONNECT_64BITHASH)
rdpg->rp_attrs |= LUDA_64BITHASH;
rdpg->rp_count = min_t(unsigned int, reqbody->nlink,
- exp_brw_size(info->mti_exp));
+ exp_max_brw_size(info->mti_exp));
rdpg->rp_npages = (rdpg->rp_count + CFS_PAGE_SIZE - 1) >>
CFS_PAGE_SHIFT;
OBD_ALLOC(rdpg->rp_pages, rdpg->rp_npages * sizeof rdpg->rp_pages[0]);
if (req_ii->ii_count <= 0)
GOTO(out, rc = -EFAULT);
rdpg->rp_count = min_t(unsigned int, req_ii->ii_count << LU_PAGE_SHIFT,
- exp_brw_size(info->mti_exp));
+ exp_max_brw_size(info->mti_exp));
rdpg->rp_npages = (rdpg->rp_count + CFS_PAGE_SIZE -1) >> CFS_PAGE_SHIFT;
/* allocate pages to store the containers */
RETURN(-EINVAL);
}
- rc = lu_object_exists(&obj->mot_obj.mo_lu);
- if (rc <= 0) {
- if (rc == -1)
- rc = -EREMOTE;
- else
- rc = -ENOENT;
+ if (mdt_object_remote(obj))
+ rc = -EREMOTE;
+ else if (!mdt_object_exists(obj))
+ rc = -ENOENT;
+
+ if (rc < 0) {
mdt_object_put(env, obj);
CDEBUG(D_IOCTL, "nonlocal object "DFID": %d\n",
PFID(&fp->gf_fid), rc);