mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
hw/9pfs: Add yeild support for clunk related coroutine
This include lsetxattr, lremovexattr, closedir and close. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
3cc19c0c60
commit
bed4352c4f
4 changed files with 71 additions and 0 deletions
|
@ -48,3 +48,37 @@ int v9fs_co_lgetxattr(V9fsState *s, V9fsString *path,
|
|||
});
|
||||
return err;
|
||||
}
|
||||
|
||||
int v9fs_co_lsetxattr(V9fsState *s, V9fsString *path,
|
||||
V9fsString *xattr_name, void *value,
|
||||
size_t size, int flags)
|
||||
{
|
||||
int err;
|
||||
|
||||
v9fs_co_run_in_worker(
|
||||
{
|
||||
err = s->ops->lsetxattr(&s->ctx, path->data,
|
||||
xattr_name->data, value,
|
||||
size, flags);
|
||||
if (err < 0) {
|
||||
err = -errno;
|
||||
}
|
||||
});
|
||||
return err;
|
||||
}
|
||||
|
||||
int v9fs_co_lremovexattr(V9fsState *s, V9fsString *path,
|
||||
V9fsString *xattr_name)
|
||||
{
|
||||
int err;
|
||||
|
||||
v9fs_co_run_in_worker(
|
||||
{
|
||||
err = s->ops->lremovexattr(&s->ctx, path->data,
|
||||
xattr_name->data);
|
||||
if (err < 0) {
|
||||
err = -errno;
|
||||
}
|
||||
});
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue