hw/9pfs: Add yield support for link coroutine

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
Venkateswararao Jujjuri 2011-08-09 00:01:22 +05:30 committed by Aneesh Kumar K.V
parent 3fa2a8d1cd
commit c6c069b0c5
2 changed files with 15 additions and 0 deletions

View File

@ -113,3 +113,17 @@ int v9fs_co_fsync(V9fsState *s, V9fsFidState *fidp, int datasync)
});
return err;
}
int v9fs_co_link(V9fsState *s, V9fsString *oldpath, V9fsString *newpath)
{
int err;
v9fs_co_run_in_worker(
{
err = s->ops->link(&s->ctx, oldpath->data, newpath->data);
if (err < 0) {
err = -errno;
}
});
return err;
}

View File

@ -88,4 +88,5 @@ extern int v9fs_co_close(V9fsState *, V9fsFidState *);
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 *);
#endif