mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
70c18fc08b
commit
02cb7f3a25
8 changed files with 155 additions and 87 deletions
|
@ -131,6 +131,7 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf)
|
|||
s->tag_len;
|
||||
s->vdev.get_config = virtio_9p_get_config;
|
||||
s->fid_list = NULL;
|
||||
qemu_co_rwlock_init(&s->rename_lock);
|
||||
|
||||
if (v9fs_init_worker_threads() < 0) {
|
||||
fprintf(stderr, "worker thread initialization failed\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue