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.
14 #include "qemu/osdep.h"
15 #include "fsdev/qemu-fsdev.h"
16 #include "qemu/thread.h"
17 #include "qemu/coroutine.h"
20 int coroutine_fn
v9fs_co_llistxattr(V9fsPDU
*pdu
, V9fsPath
*path
, void *value
,
24 V9fsState
*s
= pdu
->s
;
26 if (v9fs_request_cancelled(pdu
)) {
29 v9fs_path_read_lock(s
);
30 v9fs_co_run_in_worker(
32 err
= s
->ops
->llistxattr(&s
->ctx
, path
, value
, size
);
41 int coroutine_fn
v9fs_co_lgetxattr(V9fsPDU
*pdu
, V9fsPath
*path
,
42 V9fsString
*xattr_name
, void *value
,
46 V9fsState
*s
= pdu
->s
;
48 if (v9fs_request_cancelled(pdu
)) {
51 v9fs_path_read_lock(s
);
52 v9fs_co_run_in_worker(
54 err
= s
->ops
->lgetxattr(&s
->ctx
, path
,
65 int coroutine_fn
v9fs_co_lsetxattr(V9fsPDU
*pdu
, V9fsPath
*path
,
66 V9fsString
*xattr_name
, void *value
,
67 size_t size
, int flags
)
70 V9fsState
*s
= pdu
->s
;
72 if (v9fs_request_cancelled(pdu
)) {
75 v9fs_path_read_lock(s
);
76 v9fs_co_run_in_worker(
78 err
= s
->ops
->lsetxattr(&s
->ctx
, path
,
79 xattr_name
->data
, value
,
89 int coroutine_fn
v9fs_co_lremovexattr(V9fsPDU
*pdu
, V9fsPath
*path
,
90 V9fsString
*xattr_name
)
93 V9fsState
*s
= pdu
->s
;
95 if (v9fs_request_cancelled(pdu
)) {
98 v9fs_path_read_lock(s
);
99 v9fs_co_run_in_worker(
101 err
= s
->ops
->lremovexattr(&s
->ctx
, path
, xattr_name
->data
);