diff options
author | Sripathi Kodi <sripathik@in.ibm.com> | 2010-03-25 08:45:30 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-05-21 17:44:33 -0400 |
commit | bda8e7752063cdbdd1d308bc1705400a8cec1aeb (patch) | |
tree | cfc751da04d3ffe46d7b7e935f7ceb21b1f8a8d0 /include | |
parent | 9b6533c9b331ddbba9a40c972d82222ecffbc359 (diff) |
9p: add 9P2000.L statfs operation
I made a V2 of this patch on top of my patches for VFS switches. The
change was adding v9fs_statfs pointer to v9fs_super_ops_dotl
instead of v9fs_super_ops.
statfs - get file system statistics
size[4] Tstatfs tag[2] fid[4]
size[4] Rstatfs tag[2] type[4] bsize[4] blocks[8] bfree[8] bavail[8]
files[8] ffree[8] fsid[8] namelen[4]
The statfs message is used to request file system information returned
by the statfs(2) system call, which is used by df(1) to report file
system and disk space usage.
Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/9p/9p.h | 20 | ||||
-rw-r--r-- | include/net/9p/client.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index a7fb54808a23..59300dc22dd0 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_TSTATFS: file system status request | ||
90 | * @P9_RSTATFS: file system status response | ||
89 | * @P9_TVERSION: version handshake request | 91 | * @P9_TVERSION: version handshake request |
90 | * @P9_RVERSION: version handshake response | 92 | * @P9_RVERSION: version handshake response |
91 | * @P9_TAUTH: request to establish authentication channel | 93 | * @P9_TAUTH: request to establish authentication channel |
@@ -125,6 +127,8 @@ do { \ | |||
125 | */ | 127 | */ |
126 | 128 | ||
127 | enum p9_msg_t { | 129 | enum p9_msg_t { |
130 | P9_TSTATFS = 8, | ||
131 | P9_RSTATFS, | ||
128 | P9_TVERSION = 100, | 132 | P9_TVERSION = 100, |
129 | P9_RVERSION, | 133 | P9_RVERSION, |
130 | P9_TAUTH = 102, | 134 | P9_TAUTH = 102, |
@@ -350,6 +354,22 @@ struct p9_wstat { | |||
350 | }; | 354 | }; |
351 | 355 | ||
352 | /* Structures for Protocol Operations */ | 356 | /* Structures for Protocol Operations */ |
357 | struct p9_tstatfs { | ||
358 | u32 fid; | ||
359 | }; | ||
360 | |||
361 | struct p9_rstatfs { | ||
362 | u32 type; | ||
363 | u32 bsize; | ||
364 | u64 blocks; | ||
365 | u64 bfree; | ||
366 | u64 bavail; | ||
367 | u64 files; | ||
368 | u64 ffree; | ||
369 | u64 fsid; | ||
370 | u32 namelen; | ||
371 | }; | ||
372 | |||
353 | struct p9_tversion { | 373 | struct p9_tversion { |
354 | u32 msize; | 374 | u32 msize; |
355 | struct p9_str version; | 375 | struct p9_str version; |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 4f3760afc20f..f83c0d99e592 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -195,6 +195,7 @@ struct p9_fid { | |||
195 | struct list_head dlist; /* list of all fids attached to a dentry */ | 195 | struct list_head dlist; /* list of all fids attached to a dentry */ |
196 | }; | 196 | }; |
197 | 197 | ||
198 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); | ||
198 | int p9_client_version(struct p9_client *); | 199 | int p9_client_version(struct p9_client *); |
199 | struct p9_client *p9_client_create(const char *dev_name, char *options); | 200 | struct p9_client *p9_client_create(const char *dev_name, char *options); |
200 | void p9_client_destroy(struct p9_client *clnt); | 201 | void p9_client_destroy(struct p9_client *clnt); |