[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH -V4 22/28] hw/9pfs: Add yield support for pwritev co
From: |
Aneesh Kumar K.V |
Subject: |
[Qemu-devel] [PATCH -V4 22/28] hw/9pfs: Add yield support for pwritev coroutine |
Date: |
Mon, 8 Aug 2011 22:36:49 +0530 |
Signed-off-by: Aneesh Kumar K.V <address@hidden>
---
hw/9pfs/cofile.c | 17 +++++++++++++++++
hw/9pfs/virtio-9p-coth.h | 2 ++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c
index 52eec2a..e0d032d 100644
--- a/hw/9pfs/cofile.c
+++ b/hw/9pfs/cofile.c
@@ -127,3 +127,20 @@ int v9fs_co_link(V9fsState *s, V9fsString *oldpath,
V9fsString *newpath)
});
return err;
}
+
+int v9fs_co_pwritev(V9fsState *s, V9fsFidState *fidp,
+ struct iovec *iov, int iovcnt, int64_t offset)
+{
+ int fd;
+ int err;
+
+ fd = fidp->fs.fd;
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->pwritev(&s->ctx, fd, iov, iovcnt, offset);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}
diff --git a/hw/9pfs/virtio-9p-coth.h b/hw/9pfs/virtio-9p-coth.h
index 17ffd76..fa408f8 100644
--- a/hw/9pfs/virtio-9p-coth.h
+++ b/hw/9pfs/virtio-9p-coth.h
@@ -89,4 +89,6 @@ extern int v9fs_co_fsync(V9fsState *, V9fsFidState *, int);
extern int v9fs_co_symlink(V9fsState *, V9fsFidState *, const char *,
const char *, gid_t);
extern int v9fs_co_link(V9fsState *, V9fsString *, V9fsString *);
+extern int v9fs_co_pwritev(V9fsState *, V9fsFidState *,
+ struct iovec *, int, int64_t);
#endif
--
1.7.4.1
- [Qemu-devel] [PATCH -V4 17/28] [virtio-9p] clean up v9fs_create Rearrange the code, (continued)
- [Qemu-devel] [PATCH -V4 17/28] [virtio-9p] clean up v9fs_create Rearrange the code, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 12/28] hw/9pfs: Add yeild support for clunk related coroutine, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 21/28] [virtio-9p] coroutine and threading for v9fs_do_link, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 20/28] [virtio-9p] coroutine and threading for v9fs_do_symlink, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 28/28] use readdir_r instead of readdir for reentrancy, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 24/28] hw/9pfs: Update v9fs_wstat to use coroutines, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 01/28] hw/9pfs: Update vfs_rename to use coroutines, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 08/28] [virtio-9p] clean up v9fs_lcreate, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 23/28] hw/9pfs: Update v9fs_write to use coroutines, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 14/28] hw/9pfs: Add yield support for fsync coroutine, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 22/28] hw/9pfs: Add yield support for pwritev coroutine,
Aneesh Kumar K.V <=
- [Qemu-devel] [PATCH -V4 03/28] hw/9pfs: Update v9fs_lock to use coroutines, Aneesh Kumar K.V, 2011/08/08
- [Qemu-devel] [PATCH -V4 16/28] [virtio-9p] Remove post functions for v9fs_create, Aneesh Kumar K.V, 2011/08/08
- Re: [Qemu-devel] [PATCHSET 2] VirtFS coroutine changes, Aneesh Kumar K.V, 2011/08/11