Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
9p: block-based virtio client
Browse files Browse the repository at this point in the history
This replaces the console-based virto client with a block-based
client using a single request queue.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
ericvh authored and Eric Van Hensbergen committed Feb 7, 2008
1 parent 043aba4 commit e2735b7
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 152 deletions.
2 changes: 1 addition & 1 deletion include/net/9p/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct p9_trans {
void (*close) (struct p9_trans *);
unsigned int (*poll)(struct p9_trans *, struct poll_table_struct *);
int (*rpc) (struct p9_trans *t, struct p9_fcall *tc,
struct p9_fcall **rc);
struct p9_fcall **rc, int msize, int dotu);
};

struct p9_trans_module {
Expand Down
34 changes: 17 additions & 17 deletions net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ p9_client_rpc(struct p9_client *c, struct p9_fcall *tc,
struct p9_fcall **rc)
{
if (c->trans->rpc)
return c->trans->rpc(c->trans, tc, rc);
return c->trans->rpc(c->trans, tc, rc, c->msize, c->dotu);
else
return p9_conn_rpc(c->conn, tc, rc);
}
Expand Down Expand Up @@ -99,7 +99,7 @@ struct p9_client *p9_client_create(struct p9_trans *trans, int msize,
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -191,7 +191,7 @@ struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid,
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -236,7 +236,7 @@ struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname,
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -287,7 +287,7 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames,
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err) {
if (rc && rc->id == P9_RWALK)
goto clunk_fid;
Expand Down Expand Up @@ -322,7 +322,7 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames,
goto error;
}

p9_client_rpc(clnt->conn, tc, &rc);
p9_client_rpc(clnt, tc, &rc);

error:
kfree(tc);
Expand Down Expand Up @@ -356,7 +356,7 @@ int p9_client_open(struct p9_fid *fid, int mode)
goto done;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto done;

Expand Down Expand Up @@ -395,7 +395,7 @@ int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode,
goto done;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto done;

Expand Down Expand Up @@ -428,7 +428,7 @@ int p9_client_clunk(struct p9_fid *fid)
goto done;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto done;

Expand Down Expand Up @@ -460,7 +460,7 @@ int p9_client_remove(struct p9_fid *fid)
goto done;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto done;

Expand Down Expand Up @@ -502,7 +502,7 @@ int p9_client_read(struct p9_fid *fid, char *data, u64 offset, u32 count)
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -559,7 +559,7 @@ int p9_client_write(struct p9_fid *fid, char *data, u64 offset, u32 count)
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -613,7 +613,7 @@ p9_client_uread(struct p9_fid *fid, char __user *data, u64 offset, u32 count)
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -677,7 +677,7 @@ p9_client_uwrite(struct p9_fid *fid, const char __user *data, u64 offset,
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -748,7 +748,7 @@ struct p9_stat *p9_client_stat(struct p9_fid *fid)
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down Expand Up @@ -790,7 +790,7 @@ int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst)
goto done;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);

done:
kfree(tc);
Expand Down Expand Up @@ -847,7 +847,7 @@ struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset)
goto error;
}

err = p9_client_rpc(clnt->conn, tc, &rc);
err = p9_client_rpc(clnt, tc, &rc);
if (err)
goto error;

Expand Down
Loading

0 comments on commit e2735b7

Please sign in to comment.