int coroutine_fn v9fs_co_readlink(V9fsPDU *pdu, V9fsPath *path, V9fsString *buf) { int err; V9fsState *s = pdu->s; if (v9fs_request_cancelled(pdu)) { return -EINTR; } v9fs_path_read_lock(s); v9fs_co_run_in_worker( { err = __readlink(s, path, buf); if (err < 0) { err = -errno; } });
int v9fs_co_lstat(V9fsPDU *pdu, V9fsPath *path, struct stat *stbuf) { int err; V9fsState *s = pdu->s; if (v9fs_request_cancelled(pdu)) { return -EINTR; } v9fs_path_read_lock(s); v9fs_co_run_in_worker( { err = s->ops->lstat(&s->ctx, path, stbuf); if (err < 0) { err = -errno; } });
int v9fs_co_llistxattr(V9fsPDU *pdu, V9fsPath *path, void *value, size_t size) { int err; V9fsState *s = pdu->s; if (v9fs_request_cancelled(pdu)) { return -EINTR; } v9fs_path_read_lock(s); v9fs_co_run_in_worker( { err = s->ops->llistxattr(&s->ctx, path, value, size); if (err < 0) { err = -errno; } });
int v9fs_co_readdir_r(V9fsPDU *pdu, V9fsFidState *fidp, struct dirent *dent, struct dirent **result) { int err; V9fsState *s = pdu->s; if (v9fs_request_cancelled(pdu)) { return -EINTR; } v9fs_co_run_in_worker( { errno = 0; err = s->ops->readdir_r(&s->ctx, &fidp->fs, dent, result); if (!*result && errno) { err = -errno; } else { err = 0; } });
int coroutine_fn v9fs_co_st_gen(V9fsPDU *pdu, V9fsPath *path, mode_t st_mode, V9fsStatDotl *v9stat) { int err = 0; V9fsState *s = pdu->s; if (v9fs_request_cancelled(pdu)) { return -EINTR; } if (s->ctx.exops.get_st_gen) { v9fs_path_read_lock(s); v9fs_co_run_in_worker( { err = s->ctx.exops.get_st_gen(&s->ctx, path, st_mode, &v9stat->st_gen); if (err < 0) { err = -errno; } });