[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/29] hw/9pfs: Add yield support for fsync coroutin
From: |
Venkateswararao Jujjuri (JV) |
Subject: |
[Qemu-devel] [PATCH 15/29] hw/9pfs: Add yield support for fsync coroutine |
Date: |
Wed, 25 May 2011 16:53:03 -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/cofile.c | 16 ++++++++++++++++
hw/9pfs/virtio-9p-coth.h | 1 +
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c
index e552999..26dd636 100644
--- a/hw/9pfs/cofile.c
+++ b/hw/9pfs/cofile.c
@@ -97,3 +97,19 @@ int v9fs_co_close(V9fsState *s, V9fsFidState *fidp)
});
return err;
}
+
+int v9fs_co_fsync(V9fsState *s, V9fsFidState *fidp, int datasync)
+{
+ int fd;
+ int err;
+
+ fd = fidp->fs.fd;
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->fsync(&s->ctx, fd, datasync);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}
diff --git a/hw/9pfs/virtio-9p-coth.h b/hw/9pfs/virtio-9p-coth.h
index 5d7dfd7..a3881f3 100644
--- a/hw/9pfs/virtio-9p-coth.h
+++ b/hw/9pfs/virtio-9p-coth.h
@@ -85,4 +85,5 @@ extern int v9fs_co_lsetxattr(V9fsState *, V9fsString *,
V9fsString *,
extern int v9fs_co_lremovexattr(V9fsState *, V9fsString *, V9fsString *);
extern int v9fs_co_closedir(V9fsState *, V9fsFidState *);
extern int v9fs_co_close(V9fsState *, V9fsFidState *);
+extern int v9fs_co_fsync(V9fsState *, V9fsFidState *, int);
#endif
--
1.7.1
- [Qemu-devel] [PATCH 11/29] hw/9pfs: Update v9fs_stat to use coroutines, (continued)
- [Qemu-devel] [PATCH 11/29] hw/9pfs: Update v9fs_stat to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 08/29] [virtio-9p] Remove post functions for v9fs_lcreate, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 23/29] hw/9pfs: Add yield support for pwritev coroutine, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 21/29] [virtio-9p] coroutine and threading for v9fs_do_symlink, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 13/29] hw/9pfs: Add yeild support for clunk related coroutine, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 29/29] use readdir_r instead of readdir for reentrancy, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 26/29] hw/9pfs: Update v9fs_attach to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 25/29] hw/9pfs: Update v9fs_wstat to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 24/29] hw/9pfs: Update v9fs_write to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 28/29] hw/9pfs: Update v9fs_read to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/25
- [Qemu-devel] [PATCH 15/29] hw/9pfs: Add yield support for fsync coroutine,
Venkateswararao Jujjuri (JV) <=