aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-9p.h
diff options
context:
space:
mode:
authorM. Mohan Kumar <mohan@in.ibm.com>2010-06-09 19:14:28 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-09-08 22:56:39 +0530
commit5e94c103a0321ca47deb81643839c44a03047416 (patch)
tree14ba64e29983274aac474dff15ac2c9f98ec7527 /hw/virtio-9p.h
parentc18e2f9431dab6ae02195e3b4b8ba61d0dbd2cb8 (diff)
virtio-9p: Compute iounit based on host filesystem block size
Compute iounit based on the host filesystem block size and pass it to client with open/create response. Also return iounit as statfs's f_bsize for optimal block size transfers. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewd-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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/virtio-9p.h b/hw/virtio-9p.h
index 9773659bb0..4ee38302b7 100644
--- a/hw/virtio-9p.h
+++ b/hw/virtio-9p.h
@@ -70,6 +70,12 @@ enum p9_proto_version {
#define P9_NOFID (u32)(~0)
#define P9_MAXWELEM 16
+/*
+ * ample room for Twrite/Rread header
+ * size[4] Tread/Twrite tag[2] fid[4] offset[8] count[4]
+ */
+#define P9_IOHDRSZ 24
+
typedef struct V9fsPDU V9fsPDU;
struct V9fsPDU
@@ -154,6 +160,7 @@ typedef struct V9fsState
uint8_t *tag;
size_t config_size;
enum p9_proto_version proto_version;
+ int32_t msize;
} V9fsState;
typedef struct V9fsCreateState {
@@ -167,6 +174,7 @@ typedef struct V9fsCreateState {
V9fsString name;
V9fsString extension;
V9fsString fullname;
+ int iounit;
} V9fsCreateState;
typedef struct V9fsStatState {
@@ -197,6 +205,7 @@ typedef struct V9fsOpenState {
V9fsFidState *fidp;
V9fsQID qid;
struct stat stbuf;
+ int iounit;
} V9fsOpenState;
typedef struct V9fsReadState {