diff options
author | M. Mohan Kumar <mohan@in.ibm.com> | 2010-05-10 12:11:03 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-09-08 22:56:39 +0530 |
commit | be940c8716d4d7783b1649f5f286b4c0187f9f6d (patch) | |
tree | 2c345d839a7c4aded3bd8151d112741455446de5 /hw/virtio-9p.h | |
parent | 84151514e488c70caa2c2c0ca10c76156c3b4e14 (diff) |
qemu: virtio-9p: Implement statfs support in server
Implement statfs support in qemu server based on Sripathi's
initial statfs patch.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Diffstat (limited to 'hw/virtio-9p.h')
-rw-r--r-- | hw/virtio-9p.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/hw/virtio-9p.h b/hw/virtio-9p.h index 9286f59cd4..992c765a7a 100644 --- a/hw/virtio-9p.h +++ b/hw/virtio-9p.h @@ -13,6 +13,8 @@ #define VIRTIO_9P_MOUNT_TAG 0 enum { + P9_TSTATFS = 8, + P9_RSTATFS, P9_TVERSION = 100, P9_RVERSION, P9_TAUTH = 102, @@ -252,6 +254,28 @@ struct virtio_9p_config uint8_t tag[0]; } __attribute__((packed)); +typedef struct V9fsStatfs +{ + uint32_t f_type; + uint32_t f_bsize; + uint64_t f_blocks; + uint64_t f_bfree; + uint64_t f_bavail; + uint64_t f_files; + uint64_t f_ffree; + uint64_t fsid_val; + uint32_t f_namelen; +} V9fsStatfs; + +typedef struct V9fsStatfsState { + V9fsPDU *pdu; + size_t offset; + int32_t fid; + V9fsStatfs v9statfs; + V9fsFidState *fidp; + struct statfs stbuf; +} V9fsStatfsState; + extern size_t pdu_packunpack(void *addr, struct iovec *sg, int sg_count, size_t offset, size_t size, int pack); |