aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 21:06:58 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 21:06:58 -0500
commit488b5ec871191359b9b79262a3d48456dae7ea5f (patch)
treeaf9d1ca5d16e7cd195cf132e7af74222dc00a6f9 /include
parenta80a438bd08827d0581fca849f3e4e539a22b39c (diff)
parent727674435470537a5e75e5f81f96d5d97de57956 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: fix p9_printfcall export 9p: transport API reorganization 9p: add remove function to trans_virtio 9p: Convert semaphore to spinlock for p9_idpool 9p: fix mmap to be read-only 9p: add support for sticky bit 9p: Fix soft lockup in virtio transport 9p: fix bug in attach-per-user 9p: block-based virtio client 9p: create transport rpc cut-thru 9p: fix bug in p9_clone_stat
Diffstat (limited to 'include')
-rw-r--r--include/net/9p/9p.h1
-rw-r--r--include/net/9p/client.h5
-rw-r--r--include/net/9p/conn.h57
-rw-r--r--include/net/9p/transport.h11
4 files changed, 10 insertions, 64 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 625346c47ee2..585eb4496990 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -124,6 +124,7 @@ enum {
124 P9_DMSOCKET = 0x00100000, 124 P9_DMSOCKET = 0x00100000,
125 P9_DMSETUID = 0x00080000, 125 P9_DMSETUID = 0x00080000,
126 P9_DMSETGID = 0x00040000, 126 P9_DMSETGID = 0x00040000,
127 P9_DMSETVTX = 0x00010000,
127}; 128};
128 129
129/* qid.types */ 130/* qid.types */
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index 9b9221a21392..e52f93d9ac5f 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * 9P Client Definitions 4 * 9P Client Definitions
5 * 5 *
6 * Copyright (C) 2008 by Eric Van Hensbergen <ericvh@gmail.com>
6 * Copyright (C) 2007 by Latchesar Ionkov <lucho@ionkov.net> 7 * Copyright (C) 2007 by Latchesar Ionkov <lucho@ionkov.net>
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
@@ -29,6 +30,7 @@ struct p9_client {
29 spinlock_t lock; /* protect client structure */ 30 spinlock_t lock; /* protect client structure */
30 int msize; 31 int msize;
31 unsigned char dotu; 32 unsigned char dotu;
33 struct p9_trans_module *trans_mod;
32 struct p9_trans *trans; 34 struct p9_trans *trans;
33 struct p9_conn *conn; 35 struct p9_conn *conn;
34 36
@@ -52,8 +54,7 @@ struct p9_fid {
52 struct list_head dlist; /* list of all fids attached to a dentry */ 54 struct list_head dlist; /* list of all fids attached to a dentry */
53}; 55};
54 56
55struct p9_client *p9_client_create(struct p9_trans *trans, int msize, 57struct p9_client *p9_client_create(const char *dev_name, char *options);
56 int dotu);
57void p9_client_destroy(struct p9_client *clnt); 58void p9_client_destroy(struct p9_client *clnt);
58void p9_client_disconnect(struct p9_client *clnt); 59void p9_client_disconnect(struct p9_client *clnt);
59struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, 60struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid,
diff --git a/include/net/9p/conn.h b/include/net/9p/conn.h
deleted file mode 100644
index 756d8784f953..000000000000
--- a/include/net/9p/conn.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * include/net/9p/conn.h
3 *
4 * Connection Definitions
5 *
6 * Copyright (C) 2005 by Latchesar Ionkov <lucho@ionkov.net>
7 * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2
11 * as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to:
20 * Free Software Foundation
21 * 51 Franklin Street, Fifth Floor
22 * Boston, MA 02111-1301 USA
23 *
24 */
25
26#ifndef NET_9P_CONN_H
27#define NET_9P_CONN_H
28
29#undef P9_NONBLOCK
30
31struct p9_conn;
32struct p9_req;
33
34/**
35 * p9_mux_req_callback - callback function that is called when the
36 * response of a request is received. The callback is called from
37 * a workqueue and shouldn't block.
38 *
39 * @req - request
40 * @a - the pointer that was specified when the request was send to be
41 * passed to the callback
42 */
43typedef void (*p9_conn_req_callback)(struct p9_req *req, void *a);
44
45struct p9_conn *p9_conn_create(struct p9_trans *trans, int msize,
46 unsigned char *dotu);
47void p9_conn_destroy(struct p9_conn *);
48int p9_conn_rpc(struct p9_conn *m, struct p9_fcall *tc, struct p9_fcall **rc);
49
50#ifdef P9_NONBLOCK
51int p9_conn_rpcnb(struct p9_conn *m, struct p9_fcall *tc,
52 p9_conn_req_callback cb, void *a);
53#endif /* P9_NONBLOCK */
54
55void p9_conn_cancel(struct p9_conn *m, int err);
56
57#endif /* NET_9P_CONN_H */
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index 9dd4a05619a8..d2209ae9d18b 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -4,7 +4,7 @@
4 * Transport Definition 4 * Transport Definition
5 * 5 *
6 * Copyright (C) 2005 by Latchesar Ionkov <lucho@ionkov.net> 6 * Copyright (C) 2005 by Latchesar Ionkov <lucho@ionkov.net>
7 * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com> 7 * Copyright (C) 2004-2008 by Eric Van Hensbergen <ericvh@gmail.com>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 10 * it under the terms of the GNU General Public License version 2
@@ -34,11 +34,12 @@ enum p9_trans_status {
34 34
35struct p9_trans { 35struct p9_trans {
36 enum p9_trans_status status; 36 enum p9_trans_status status;
37 int msize;
38 unsigned char extended;
37 void *priv; 39 void *priv;
38 int (*write) (struct p9_trans *, void *, int);
39 int (*read) (struct p9_trans *, void *, int);
40 void (*close) (struct p9_trans *); 40 void (*close) (struct p9_trans *);
41 unsigned int (*poll)(struct p9_trans *, struct poll_table_struct *); 41 int (*rpc) (struct p9_trans *t, struct p9_fcall *tc,
42 struct p9_fcall **rc);
42}; 43};
43 44
44struct p9_trans_module { 45struct p9_trans_module {
@@ -46,7 +47,7 @@ struct p9_trans_module {
46 char *name; /* name of transport */ 47 char *name; /* name of transport */
47 int maxsize; /* max message size of transport */ 48 int maxsize; /* max message size of transport */
48 int def; /* this transport should be default */ 49 int def; /* this transport should be default */
49 struct p9_trans * (*create)(const char *devname, char *options); 50 struct p9_trans * (*create)(const char *, char *, int, unsigned char);
50}; 51};
51 52
52void v9fs_register_trans(struct p9_trans_module *m); 53void v9fs_register_trans(struct p9_trans_module *m);