[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [V2 11/25] hw/9pfs: Add yield support to statfs coroutine
From: |
Venkateswararao Jujjuri (JV) |
Subject: |
[Qemu-devel] [V2 11/25] hw/9pfs: Add yield support to statfs coroutine |
Date: |
Tue, 17 May 2011 12:43:37 -0700 |
From: Aneesh Kumar K.V <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>
Signed-off-by: Venkateswararao Jujjuri "<address@hidden>
---
hw/9pfs/cofs.c | 14 ++++++++++++++
hw/9pfs/virtio-9p-coth.h | 1 +
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/hw/9pfs/cofs.c b/hw/9pfs/cofs.c
index 6d94673..f79564b 100644
--- a/hw/9pfs/cofs.c
+++ b/hw/9pfs/cofs.c
@@ -40,3 +40,17 @@ int v9fs_co_readlink(V9fsState *s, V9fsString *path,
V9fsString *buf)
buf->data = tbuf.data;
return err;
}
+
+int v9fs_co_statfs(V9fsState *s, V9fsString *path, struct statfs *stbuf)
+{
+ int err;
+
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->statfs(&s->ctx, path->data, stbuf);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}
diff --git a/hw/9pfs/virtio-9p-coth.h b/hw/9pfs/virtio-9p-coth.h
index 9aa5953..5d9dc0f 100644
--- a/hw/9pfs/virtio-9p-coth.h
+++ b/hw/9pfs/virtio-9p-coth.h
@@ -62,4 +62,5 @@ extern int v9fs_co_readdir(V9fsState *, V9fsFidState *,
extern off_t v9fs_co_telldir(V9fsState *, V9fsFidState *);
extern void v9fs_co_seekdir(V9fsState *, V9fsFidState *, off_t);
extern void v9fs_co_rewinddir(V9fsState *, V9fsFidState *);
+extern int v9fs_co_statfs(V9fsState *, V9fsString *, struct statfs *);
#endif
--
1.7.1
- [Qemu-devel] [V2 05/25] [virtio-9p] Move errno into v9fs_do_readlink, (continued)
- [Qemu-devel] [V2 05/25] [virtio-9p] Move errno into v9fs_do_readlink, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 03/25] [virtio-9p] Remove post functions for v9fs_readlink., Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 09/25] hw/9pfs: Add yield support for readdir related coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 12/25] hw/9pfs: Update v9fs_statfs to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 14/25] hw/9pfs: Update v9fs_getattr to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 08/25] [virtio-9p] clean up v9fs_mkdir., Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 11/25] hw/9pfs: Add yield support to statfs coroutine,
Venkateswararao Jujjuri (JV) <=
- [Qemu-devel] [V2 16/25] hw/9pfs: Update v9fs_setattr to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 13/25] hw/9pfs: Add yield support to lstat coroutine, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 18/25] hw/9pfs: Update v9fs_xattrwalk to coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 07/25] [virtio-9p] Remove post functions for v9fs_mkdir., Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 15/25] hw/9pfs: Add yield support to setattr related coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 10/25] hw/9pfs: Update v9fs_readdir to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 19/25] hw/9pfs: Update v9fs_xattrcreate to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 06/25] [virtio-9p] coroutines for readlink, Venkateswararao Jujjuri (JV), 2011/05/17