4 * Copyright IBM, Corp. 2011
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #include "qemu/osdep.h"
15 #include "fsdev/qemu-fsdev.h"
16 #include "qemu/thread.h"
17 #include "qemu/coroutine.h"
18 #include "qemu/main-loop.h"
21 int coroutine_fn v9fs_co_llistxattr(V9fsPDU *pdu, V9fsPath *path, void *value,
25 V9fsState *s = pdu->s;
27 if (v9fs_request_cancelled(pdu)) {
30 v9fs_path_read_lock(s);
31 v9fs_co_run_in_worker(
33 err = s->ops->llistxattr(&s->ctx, path, value, size);
42 int coroutine_fn v9fs_co_lgetxattr(V9fsPDU *pdu, V9fsPath *path,
43 V9fsString *xattr_name, void *value,
47 V9fsState *s = pdu->s;
49 if (v9fs_request_cancelled(pdu)) {
52 v9fs_path_read_lock(s);
53 v9fs_co_run_in_worker(
55 err = s->ops->lgetxattr(&s->ctx, path,
66 int coroutine_fn v9fs_co_lsetxattr(V9fsPDU *pdu, V9fsPath *path,
67 V9fsString *xattr_name, void *value,
68 size_t size, int flags)
71 V9fsState *s = pdu->s;
73 if (v9fs_request_cancelled(pdu)) {
76 v9fs_path_read_lock(s);
77 v9fs_co_run_in_worker(
79 err = s->ops->lsetxattr(&s->ctx, path,
80 xattr_name->data, value,
90 int coroutine_fn v9fs_co_lremovexattr(V9fsPDU *pdu, V9fsPath *path,
91 V9fsString *xattr_name)
94 V9fsState *s = pdu->s;
96 if (v9fs_request_cancelled(pdu)) {
99 v9fs_path_read_lock(s);
100 v9fs_co_run_in_worker(
102 err = s->ops->lremovexattr(&s->ctx, path, xattr_name->data);