diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/magic.h | 1 | ||||
| -rw-r--r-- | include/net/9p/9p.h | 54 | ||||
| -rw-r--r-- | include/net/9p/client.h | 4 |
3 files changed, 59 insertions, 0 deletions
diff --git a/include/linux/magic.h b/include/linux/magic.h index eb9800f05782..ff690d05f129 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
| @@ -57,5 +57,6 @@ | |||
| 57 | 57 | ||
| 58 | #define DEVPTS_SUPER_MAGIC 0x1cd1 | 58 | #define DEVPTS_SUPER_MAGIC 0x1cd1 |
| 59 | #define SOCKFS_MAGIC 0x534F434B | 59 | #define SOCKFS_MAGIC 0x534F434B |
| 60 | #define V9FS_MAGIC 0x01021997 | ||
| 60 | 61 | ||
| 61 | #endif /* __LINUX_MAGIC_H__ */ | 62 | #endif /* __LINUX_MAGIC_H__ */ |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index a8de812ccbc8..071fd7a8d781 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
| @@ -86,6 +86,8 @@ do { \ | |||
| 86 | 86 | ||
| 87 | /** | 87 | /** |
| 88 | * enum p9_msg_t - 9P message types | 88 | * enum p9_msg_t - 9P message types |
| 89 | * @P9_TLERROR: not used | ||
| 90 | * @P9_RLERROR: response for any failed request for 9P2000.L | ||
| 89 | * @P9_TSTATFS: file system status request | 91 | * @P9_TSTATFS: file system status request |
| 90 | * @P9_RSTATFS: file system status response | 92 | * @P9_RSTATFS: file system status response |
| 91 | * @P9_TSYMLINK: make symlink request | 93 | * @P9_TSYMLINK: make symlink request |
| @@ -137,6 +139,8 @@ do { \ | |||
| 137 | */ | 139 | */ |
| 138 | 140 | ||
| 139 | enum p9_msg_t { | 141 | enum p9_msg_t { |
| 142 | P9_TLERROR = 6, | ||
| 143 | P9_RLERROR, | ||
| 140 | P9_TSTATFS = 8, | 144 | P9_TSTATFS = 8, |
| 141 | P9_RSTATFS, | 145 | P9_RSTATFS, |
| 142 | P9_TLOPEN = 12, | 146 | P9_TLOPEN = 12, |
| @@ -149,6 +153,8 @@ enum p9_msg_t { | |||
| 149 | P9_RMKNOD, | 153 | P9_RMKNOD, |
| 150 | P9_TRENAME = 20, | 154 | P9_TRENAME = 20, |
| 151 | P9_RRENAME, | 155 | P9_RRENAME, |
| 156 | P9_TREADLINK = 22, | ||
| 157 | P9_RREADLINK, | ||
| 152 | P9_TGETATTR = 24, | 158 | P9_TGETATTR = 24, |
| 153 | P9_RGETATTR, | 159 | P9_RGETATTR, |
| 154 | P9_TSETATTR = 26, | 160 | P9_TSETATTR = 26, |
| @@ -159,6 +165,12 @@ enum p9_msg_t { | |||
| 159 | P9_RXATTRCREATE, | 165 | P9_RXATTRCREATE, |
| 160 | P9_TREADDIR = 40, | 166 | P9_TREADDIR = 40, |
| 161 | P9_RREADDIR, | 167 | P9_RREADDIR, |
| 168 | P9_TFSYNC = 50, | ||
| 169 | P9_RFSYNC, | ||
| 170 | P9_TLOCK = 52, | ||
| 171 | P9_RLOCK, | ||
| 172 | P9_TGETLOCK = 54, | ||
| 173 | P9_RGETLOCK, | ||
| 162 | P9_TLINK = 70, | 174 | P9_TLINK = 70, |
| 163 | P9_RLINK, | 175 | P9_RLINK, |
| 164 | P9_TMKDIR = 72, | 176 | P9_TMKDIR = 72, |
| @@ -458,6 +470,48 @@ struct p9_iattr_dotl { | |||
| 458 | u64 mtime_nsec; | 470 | u64 mtime_nsec; |
| 459 | }; | 471 | }; |
| 460 | 472 | ||
| 473 | #define P9_LOCK_SUCCESS 0 | ||
| 474 | #define P9_LOCK_BLOCKED 1 | ||
| 475 | #define P9_LOCK_ERROR 2 | ||
| 476 | #define P9_LOCK_GRACE 3 | ||
| 477 | |||
| 478 | #define P9_LOCK_FLAGS_BLOCK 1 | ||
| 479 | #define P9_LOCK_FLAGS_RECLAIM 2 | ||
| 480 | |||
| 481 | /* struct p9_flock: POSIX lock structure | ||
| 482 | * @type - type of lock | ||
| 483 | * @flags - lock flags | ||
| 484 | * @start - starting offset of the lock | ||
| 485 | * @length - number of bytes | ||
| 486 | * @proc_id - process id which wants to take lock | ||
| 487 | * @client_id - client id | ||
| 488 | */ | ||
| 489 | |||
| 490 | struct p9_flock { | ||
| 491 | u8 type; | ||
| 492 | u32 flags; | ||
| 493 | u64 start; | ||
| 494 | u64 length; | ||
| 495 | u32 proc_id; | ||
| 496 | char *client_id; | ||
| 497 | }; | ||
| 498 | |||
| 499 | /* struct p9_getlock: getlock structure | ||
| 500 | * @type - type of lock | ||
| 501 | * @start - starting offset of the lock | ||
| 502 | * @length - number of bytes | ||
| 503 | * @proc_id - process id which wants to take lock | ||
| 504 | * @client_id - client id | ||
| 505 | */ | ||
| 506 | |||
| 507 | struct p9_getlock { | ||
| 508 | u8 type; | ||
| 509 | u64 start; | ||
| 510 | u64 length; | ||
| 511 | u32 proc_id; | ||
| 512 | char *client_id; | ||
| 513 | }; | ||
| 514 | |||
| 461 | /* Structures for Protocol Operations */ | 515 | /* Structures for Protocol Operations */ |
| 462 | struct p9_tstatfs { | 516 | struct p9_tstatfs { |
| 463 | u32 fid; | 517 | u32 fid; |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 7f63d5ab7b44..83ba6a4d58a3 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
| @@ -229,6 +229,7 @@ int p9_client_symlink(struct p9_fid *fid, char *name, char *symname, gid_t gid, | |||
| 229 | int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, | 229 | int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, |
| 230 | gid_t gid, struct p9_qid *qid); | 230 | gid_t gid, struct p9_qid *qid); |
| 231 | int p9_client_clunk(struct p9_fid *fid); | 231 | int p9_client_clunk(struct p9_fid *fid); |
| 232 | int p9_client_fsync(struct p9_fid *fid, int datasync); | ||
| 232 | int p9_client_remove(struct p9_fid *fid); | 233 | int p9_client_remove(struct p9_fid *fid); |
| 233 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 234 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
| 234 | u64 offset, u32 count); | 235 | u64 offset, u32 count); |
| @@ -248,6 +249,8 @@ int p9_client_mknod_dotl(struct p9_fid *oldfid, char *name, int mode, | |||
| 248 | dev_t rdev, gid_t gid, struct p9_qid *); | 249 | dev_t rdev, gid_t gid, struct p9_qid *); |
| 249 | int p9_client_mkdir_dotl(struct p9_fid *fid, char *name, int mode, | 250 | int p9_client_mkdir_dotl(struct p9_fid *fid, char *name, int mode, |
| 250 | gid_t gid, struct p9_qid *); | 251 | gid_t gid, struct p9_qid *); |
| 252 | int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status); | ||
| 253 | int p9_client_getlock_dotl(struct p9_fid *fid, struct p9_getlock *fl); | ||
| 251 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); | 254 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); |
| 252 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); | 255 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); |
| 253 | 256 | ||
| @@ -259,5 +262,6 @@ int p9_is_proto_dotu(struct p9_client *clnt); | |||
| 259 | int p9_is_proto_dotl(struct p9_client *clnt); | 262 | int p9_is_proto_dotl(struct p9_client *clnt); |
| 260 | struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *); | 263 | struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *); |
| 261 | int p9_client_xattrcreate(struct p9_fid *, const char *, u64, int); | 264 | int p9_client_xattrcreate(struct p9_fid *, const char *, u64, int); |
| 265 | int p9_client_readlink(struct p9_fid *fid, char **target); | ||
| 262 | 266 | ||
| 263 | #endif /* NET_9P_CLIENT_H */ | 267 | #endif /* NET_9P_CLIENT_H */ |
