diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-10-20 08:42:08 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-10-20 08:42:08 -0500 |
commit | 1f99b94932fcf0a543e46e24875fc2b3a8c304a7 (patch) | |
tree | deec2cb0dbebe1e6295b7068c85cdf181a378599 /hw/9pfs/cofile.c | |
parent | 8a9236f1d2e91ddd31e3eeae8fe27392c07324a9 (diff) | |
parent | d9b36a6e562450fd633ea9352f43885b86693838 (diff) | |
download | qemu-1f99b94932fcf0a543e46e24875fc2b3a8c304a7.zip qemu-1f99b94932fcf0a543e46e24875fc2b3a8c304a7.tar.gz qemu-1f99b94932fcf0a543e46e24875fc2b3a8c304a7.tar.bz2 |
Merge remote-tracking branch 'aneesh/for-upstream-6' into staging
Conflicts:
trace-events
Diffstat (limited to 'hw/9pfs/cofile.c')
-rw-r--r-- | hw/9pfs/cofile.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c index 7ad4bec..692811e 100644 --- a/hw/9pfs/cofile.c +++ b/hw/9pfs/cofile.c @@ -17,6 +17,30 @@ #include "qemu-coroutine.h" #include "virtio-9p-coth.h" +int 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; + } + }); + v9fs_path_unlock(s); + } + return err; +} + int v9fs_co_lstat(V9fsPDU *pdu, V9fsPath *path, struct stat *stbuf) { int err; |