body = lustre_msg_buf(req->rq_reqmsg, 0);
ll_ino2fid(&body->fid1, ino, 0, type);
body->valid = valid;
- mds_pack_req_body(req);
if (S_ISREG(type)) {
struct client_obd *mdc = &class_conn2obd(conn)->u.cli;
} else if (valid & OBD_MD_LINKNAME) {
bufcount = 2;
size[1] = ea_size;
+ body->size = ea_size;
+ CDEBUG(D_INODE, "allocating %d bytes for symlink in packet\n",
+ ea_size);
}
req->rq_replen = lustre_msg_size(bufcount, size);
+ mds_pack_req_body(req);
rc = ptlrpc_queue_wait(req);
rc = ptlrpc_check_status(req, rc);
size[1] = mds->mds_max_mdsize;
} else if (body->valid & OBD_MD_LINKNAME) {
bufcount = 2;
- size[1] = inode->i_size + 1;
+ size[1] = MIN(inode->i_size + 1, body->size);
+ CDEBUG(D_INODE, "symlink size: %d, reply space: %d\n",
+ inode->i_size + 1, body->size);
}
if (OBD_FAIL_CHECK(OBD_FAIL_MDS_GETATTR_PACK)) {