aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/9p/9p.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/9p/9p.h')
-rw-r--r--include/net/9p/9p.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 55e96057f47f..1859a2560cc5 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -165,6 +165,8 @@ enum p9_msg_t {
165 P9_RREADDIR, 165 P9_RREADDIR,
166 P9_TFSYNC = 50, 166 P9_TFSYNC = 50,
167 P9_RFSYNC, 167 P9_RFSYNC,
168 P9_TLOCK = 52,
169 P9_RLOCK,
168 P9_TLINK = 70, 170 P9_TLINK = 70,
169 P9_RLINK, 171 P9_RLINK,
170 P9_TMKDIR = 72, 172 P9_TMKDIR = 72,
@@ -464,6 +466,32 @@ struct p9_iattr_dotl {
464 u64 mtime_nsec; 466 u64 mtime_nsec;
465}; 467};
466 468
469#define P9_LOCK_SUCCESS 0
470#define P9_LOCK_BLOCKED 1
471#define P9_LOCK_ERROR 2
472#define P9_LOCK_GRACE 3
473
474#define P9_LOCK_FLAGS_BLOCK 1
475#define P9_LOCK_FLAGS_RECLAIM 2
476
477/* struct p9_flock: POSIX lock structure
478 * @type - type of lock
479 * @flags - lock flags
480 * @start - starting offset of the lock
481 * @length - number of bytes
482 * @proc_id - process id which wants to take lock
483 * @client_id - client id
484 */
485
486struct p9_flock {
487 u8 type;
488 u32 flags;
489 u64 start;
490 u64 length;
491 u32 proc_id;
492 char *client_id;
493};
494
467/* Structures for Protocol Operations */ 495/* Structures for Protocol Operations */
468struct p9_tstatfs { 496struct p9_tstatfs {
469 u32 fid; 497 u32 fid;