Lines Matching defs:req
133 p9_free_req(struct p9_client *clnt, struct p9_req_t *req)
136 if (req->tc != NULL) {
137 if (req->tc->tag != P9_NOTAG)
138 p9_tag_destroy(clnt, req->tc->tag);
139 p9_buffer_free(&req->tc);
142 if (req->rc != NULL)
143 p9_buffer_free(&req->rc);
145 uma_zfree(p9fs_req_zone, req);
152 struct p9_req_t *req;
158 req = uma_zalloc(p9fs_req_zone, M_WAITOK | M_ZERO);
159 req->tc = p9_buffer_alloc(alloc_msize);
160 req->rc = p9_buffer_alloc(alloc_msize);
165 req->tc->tag = P9_NOTAG;
166 p9_free_req(clnt, req);
169 req->tc->tag = tag;
170 return (req);
204 p9_client_check_return(struct p9_client *c, struct p9_req_t *req)
211 error = p9_parse_receive(req->rc, c);
219 if (req->rc->id != P9PROTO_RERROR && req->rc->id != P9PROTO_RLERROR)
226 if (req->rc->id == P9PROTO_RERROR) {
227 error = p9_buf_readf(req->rc, c->proto_version, "s?d", &ename, &ecode);
228 } else if (req->rc->id == P9PROTO_RLERROR) {
229 error = p9_buf_readf(req->rc, c->proto_version, "d", &ecode);
244 if (req->rc->id == P9PROTO_RERROR) {
247 } else if (req->rc->id == P9PROTO_RLERROR) {
252 if (req->rc->id == P9PROTO_RERROR) {
281 struct p9_req_t *req;
304 req = p9_get_request(c, error);
311 *error = p9_buf_prepare(req->tc, type);
318 *error = p9_buf_vwritef(req->tc, c->proto_version, fmt, ap);
325 *error = p9_buf_finalize(c, req->tc);
332 return (req);
334 p9_free_req(c, req);
348 struct p9_req_t *req;
351 req = p9_client_prepare_req(c, type, c->msize, error, fmt, ap);
359 *error = c->ops->request(c->handle, req);
369 *error = p9_client_check_return(c, req);
373 return (req);
375 p9_free_req(c, req);
447 struct p9_req_t *req;
458 req = p9_client_request(c, P9PROTO_TVERSION, &error, "ds",
462 req = p9_client_request(c, P9PROTO_TVERSION, &error, "ds",
466 req = p9_client_request(c, P9PROTO_TVERSION, &error, "ds",
477 error = p9_buf_readf(req->rc, c->proto_version, "ds", &msize, &version);
500 p9_free_req(c, req);
517 p9fs_req_zone = uma_zcreate("p9fs req zone",
608 struct p9_req_t *req;
621 req = p9_client_request(clnt, P9PROTO_TATTACH, error, "ddssd", fid->fid,
626 *error = p9_buf_readf(req->rc, clnt->proto_version, "Q", &qid);
637 p9_free_req(clnt, req);
641 if (req != NULL)
642 p9_free_req(clnt, req);
655 struct p9_req_t *req;
662 req = p9_client_request(clnt, P9PROTO_TREMOVE, &error, "d", fid->fid);
668 p9_free_req(clnt, req);
677 struct p9_req_t *req;
682 req = p9_client_request(clnt, P9PROTO_TUNLINKAT, &error, "dsd",
689 p9_free_req(clnt, req);
702 struct p9_req_t *req;
714 req = p9_client_request(clnt, P9PROTO_TCLUNK, &error, "d", fid->fid);
715 if (req != NULL) {
717 p9_free_req(clnt, req);
737 struct p9_req_t *req;
772 req = p9_client_request(clnt, P9PROTO_TWALK, error, "ddT", oldfid->fid,
780 *error = p9_buf_readf(req->rc, clnt->proto_version, "R", &nwqids,
803 p9_free_req(clnt, req);
808 p9_free_req(clnt, req);
822 struct p9_req_t *req;
836 req = p9_client_request(clnt, P9PROTO_TLOPEN, &error, "dd",
839 req = p9_client_request(clnt, P9PROTO_TOPEN, &error, "db",
845 error = p9_buf_readf(req->rc, clnt->proto_version, "Qd", &fid->qid,
858 p9_free_req(clnt, req);
870 struct p9_req_t *req;
886 req = p9_client_request(clnt, P9PROTO_TREADDIR, &error, "dqd",
890 P9_DEBUG(ERROR, "%s: couldn't allocate req in client_readdir\n",
895 error = p9_buf_readf(req->rc, clnt->proto_version, "D", &count,
900 p9_free_req(clnt, req);
908 p9_free_req(clnt, req);
923 struct p9_req_t *req;
941 req = p9_client_request(clnt, P9PROTO_TREAD, &error, "dqd", fid->fid,
948 error = p9_buf_readf(req->rc, clnt->proto_version, "D", &count,
971 p9_free_req(clnt, req);
974 p9_free_req(clnt, req);
989 struct p9_req_t *req;
1012 req = p9_client_request(clnt, P9PROTO_TWRITE, &error, "dqD", fid->fid,
1020 error = p9_buf_readf(req->rc, clnt->proto_version, "d", &ret);
1039 p9_free_req(clnt, req);
1042 p9_free_req(clnt, req);
1054 struct p9_req_t *req;
1067 req = p9_client_request(clnt, P9PROTO_TCREATE, &error, "dsdb?s",
1072 error = p9_buf_readf(req->rc, clnt->proto_version, "Qd", &qid, &mtu);
1082 p9_free_req(clnt, req);
1091 struct p9_req_t *req;
1099 req = p9_client_request(clnt, P9PROTO_TSTATFS, &error, "d", fid->fid);
1104 error = p9_buf_readf(req->rc, clnt->proto_version, "ddqqqqqqd",
1122 p9_free_req(clnt, req);
1133 struct p9_req_t *req;
1146 req = p9_client_request(clnt, P9PROTO_TRENAMEAT, &error, "dsds",
1152 p9_free_req(clnt, req);
1161 struct p9_req_t *req;
1170 req = p9_client_request(clnt, P9PROTO_TSYMLINK, &error, "dssd",
1176 error = p9_buf_readf(req->rc, clnt->proto_version, "Q", &qid);
1185 p9_free_req(clnt, req);
1194 struct p9_req_t *req;
1203 req = p9_client_request(clnt, P9PROTO_TLINK, &error, "dds", dfid->fid,
1208 p9_free_req(clnt, req);
1218 struct p9_req_t *req;
1225 req = p9_client_request(clnt, P9PROTO_TREADLINK, &error, "d", fid->fid);
1229 error = p9_buf_readf(req->rc, clnt->proto_version, "s", target);
1237 p9_free_req(clnt, req);
1248 struct p9_req_t *req;
1256 req = p9_client_request(clnt, P9PROTO_TGETATTR, &err, "dq", fid->fid,
1258 if (req == NULL) {
1263 err = p9_buf_readf(req->rc, clnt->proto_version, "A", stat_dotl);
1269 p9_free_req(clnt, req);
1291 if (req != NULL)
1292 p9_free_req(clnt, req);
1302 struct p9_req_t *req;
1319 /* Any client_request error is converted to req == NULL error*/
1320 req = p9_client_request(clnt, P9PROTO_TSETATTR, &err, "dA", fid->fid,
1323 if (req == NULL) {
1328 p9_free_req(clnt, req);