4 * Copyright IBM, Corp. 2011
7 * Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
15 * Not so fast! You might want to read the 9p developer docs first:
16 * https://wiki.qemu.org/Documentation/9p
19 #include "qemu/osdep.h"
20 #include "fsdev/qemu-fsdev.h"
21 #include "qemu/thread.h"
22 #include "qemu/main-loop.h"
25 int coroutine_fn
v9fs_co_llistxattr(V9fsPDU
*pdu
, V9fsPath
*path
, void *value
,
29 V9fsState
*s
= pdu
->s
;
31 if (v9fs_request_cancelled(pdu
)) {
34 v9fs_path_read_lock(s
);
35 v9fs_co_run_in_worker(
37 err
= s
->ops
->llistxattr(&s
->ctx
, path
, value
, size
);
46 int coroutine_fn
v9fs_co_lgetxattr(V9fsPDU
*pdu
, V9fsPath
*path
,
47 V9fsString
*xattr_name
, void *value
,
51 V9fsState
*s
= pdu
->s
;
53 if (v9fs_request_cancelled(pdu
)) {
56 v9fs_path_read_lock(s
);
57 v9fs_co_run_in_worker(
59 err
= s
->ops
->lgetxattr(&s
->ctx
, path
,
70 int coroutine_fn
v9fs_co_lsetxattr(V9fsPDU
*pdu
, V9fsPath
*path
,
71 V9fsString
*xattr_name
, void *value
,
72 size_t size
, int flags
)
75 V9fsState
*s
= pdu
->s
;
77 if (v9fs_request_cancelled(pdu
)) {
80 v9fs_path_read_lock(s
);
81 v9fs_co_run_in_worker(
83 err
= s
->ops
->lsetxattr(&s
->ctx
, path
,
84 xattr_name
->data
, value
,
94 int coroutine_fn
v9fs_co_lremovexattr(V9fsPDU
*pdu
, V9fsPath
*path
,
95 V9fsString
*xattr_name
)
98 V9fsState
*s
= pdu
->s
;
100 if (v9fs_request_cancelled(pdu
)) {
103 v9fs_path_read_lock(s
);
104 v9fs_co_run_in_worker(
106 err
= s
->ops
->lremovexattr(&s
->ctx
, path
, xattr_name
->data
);