mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
fsdev: add IO throttle support to fsdev devices
This patchset adds the throttle support for the 9p-local driver. For now this functionality can be enabled only through qemu cli options. QMP interface and support to other drivers need further extensions. To make it simple for other 9p drivers, the throttle code has been put in separate files. Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> Reviewed-by: Alberto Garcia <berto@igalia.com> (pass extra NULL CoMutex * argument to qemu_co_queue_wait(), added options to qemu-options.hx, Greg Kurz) Signed-off-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
parent
4bae2b397f
commit
b8bbdb886e
9 changed files with 258 additions and 3 deletions
|
@ -3529,6 +3529,10 @@ int v9fs_device_realize_common(V9fsState *s, Error **errp)
|
|||
error_setg(errp, "share path %s is not a directory", fse->path);
|
||||
goto out;
|
||||
}
|
||||
|
||||
s->ctx.fst = &fse->fst;
|
||||
fsdev_throttle_init(s->ctx.fst);
|
||||
|
||||
v9fs_path_free(&path);
|
||||
|
||||
rc = 0;
|
||||
|
@ -3549,6 +3553,7 @@ void v9fs_device_unrealize_common(V9fsState *s, Error **errp)
|
|||
if (s->ops->cleanup) {
|
||||
s->ops->cleanup(&s->ctx);
|
||||
}
|
||||
fsdev_throttle_cleanup(s->ctx.fst);
|
||||
g_free(s->tag);
|
||||
g_free(s->ctx.fs_root);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue