diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-05-24 15:10:56 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-09-22 21:38:52 +0530 |
commit | 02cb7f3a256517cbf3136caff2863fbafc57b540 (patch) | |
tree | 1d741e85dfe584b35a4a5e69a086d7b19fafd0ad /hw/9pfs/virtio-9p-coth.h | |
parent | 70c18fc08bcc9e9bbd8c00ca5e694e07890687e5 (diff) | |
download | qemu-02cb7f3a256517cbf3136caff2863fbafc57b540.zip qemu-02cb7f3a256517cbf3136caff2863fbafc57b540.tar.gz qemu-02cb7f3a256517cbf3136caff2863fbafc57b540.tar.bz2 |
hw/9pfs: Use read-write lock for protecting fid path.
On rename we take the write lock and this ensure path
doesn't change as we operate on them.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/virtio-9p-coth.h')
-rw-r--r-- | hw/9pfs/virtio-9p-coth.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/9pfs/virtio-9p-coth.h b/hw/9pfs/virtio-9p-coth.h index b7be9b5..e5f46c5 100644 --- a/hw/9pfs/virtio-9p-coth.h +++ b/hw/9pfs/virtio-9p-coth.h @@ -71,23 +71,25 @@ extern int v9fs_co_truncate(V9fsState *, V9fsString *, off_t); extern int v9fs_co_llistxattr(V9fsState *, V9fsString *, void *, size_t); extern int v9fs_co_lgetxattr(V9fsState *, V9fsString *, V9fsString *, void *, size_t); -extern int v9fs_co_mknod(V9fsState *, V9fsString *, uid_t, - gid_t, dev_t, mode_t); -extern int v9fs_co_mkdir(V9fsState *, char *, mode_t, uid_t, gid_t); +extern int v9fs_co_mknod(V9fsState *, V9fsFidState *, V9fsString *, uid_t, + gid_t, dev_t, mode_t, struct stat *); +extern int v9fs_co_mkdir(V9fsState *, V9fsFidState *, V9fsString *, + mode_t, uid_t, gid_t, struct stat *); extern int v9fs_co_remove(V9fsState *, V9fsString *); extern int v9fs_co_rename(V9fsState *, V9fsString *, V9fsString *); extern int v9fs_co_fstat(V9fsState *, int, struct stat *); extern int v9fs_co_opendir(V9fsState *, V9fsFidState *); extern int v9fs_co_open(V9fsState *, V9fsFidState *, int); -extern int v9fs_co_open2(V9fsState *, V9fsFidState *, char *, gid_t, int, int); +extern int v9fs_co_open2(V9fsState *, V9fsFidState *, V9fsString *, + gid_t, int, int, struct stat *); extern int v9fs_co_lsetxattr(V9fsState *, V9fsString *, V9fsString *, void *, size_t, int); extern int v9fs_co_lremovexattr(V9fsState *, V9fsString *, V9fsString *); extern int v9fs_co_closedir(V9fsState *, DIR *); extern int v9fs_co_close(V9fsState *, int); extern int v9fs_co_fsync(V9fsState *, V9fsFidState *, int); -extern int v9fs_co_symlink(V9fsState *, V9fsFidState *, const char *, - const char *, gid_t); +extern int v9fs_co_symlink(V9fsState *, V9fsFidState *, V9fsString *, + const char *, gid_t, struct stat *); extern int v9fs_co_link(V9fsState *, V9fsString *, V9fsString *); extern int v9fs_co_pwritev(V9fsState *, V9fsFidState *, struct iovec *, int, int64_t); |