Beispiel #1
0
int cmd_stat(struct fsconn *conn, union cmd *cmd)
{
	struct rpc_stat_req *req = &cmd->stat.req;
	struct rpc_stat_res *res = &cmd->stat.res;

	return objstore_getattr(conn->vg, &req->handle, &res->attr);
}
Beispiel #2
0
int cmd_getattr(struct fsconn *conn, union cmd *cmd)
{
	struct rpc_getattr_req *req = &cmd->getattr.req;
	struct rpc_getattr_res *res = &cmd->getattr.res;
	struct ohandle *oh;

	oh = ohandle_find(conn, req->handle);
	if (!oh)
		return -EINVAL;

	return objstore_getattr(conn->vg, oh->cookie, &res->attr);
}