mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
iothread: rename PollParamInfo to IOThreadParamInfo
Commit 1793ad0247
("iothread: add aio-max-batch parameter") added
a new parameter (aio-max-batch) to IOThread and used PollParamInfo
structure to handle it.
Since it is not a parameter of the polling mechanism, we rename the
structure to a more generic IOThreadParamInfo.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210727145936.147032-2-sgarzare@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
ca61fa4b80
commit
f0ed36a64f
14
iothread.c
14
iothread.c
|
@ -215,18 +215,18 @@ static void iothread_complete(UserCreatable *obj, Error **errp)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
ptrdiff_t offset; /* field's byte offset in IOThread struct */
|
ptrdiff_t offset; /* field's byte offset in IOThread struct */
|
||||||
} PollParamInfo;
|
} IOThreadParamInfo;
|
||||||
|
|
||||||
static PollParamInfo poll_max_ns_info = {
|
static IOThreadParamInfo poll_max_ns_info = {
|
||||||
"poll-max-ns", offsetof(IOThread, poll_max_ns),
|
"poll-max-ns", offsetof(IOThread, poll_max_ns),
|
||||||
};
|
};
|
||||||
static PollParamInfo poll_grow_info = {
|
static IOThreadParamInfo poll_grow_info = {
|
||||||
"poll-grow", offsetof(IOThread, poll_grow),
|
"poll-grow", offsetof(IOThread, poll_grow),
|
||||||
};
|
};
|
||||||
static PollParamInfo poll_shrink_info = {
|
static IOThreadParamInfo poll_shrink_info = {
|
||||||
"poll-shrink", offsetof(IOThread, poll_shrink),
|
"poll-shrink", offsetof(IOThread, poll_shrink),
|
||||||
};
|
};
|
||||||
static PollParamInfo aio_max_batch_info = {
|
static IOThreadParamInfo aio_max_batch_info = {
|
||||||
"aio-max-batch", offsetof(IOThread, aio_max_batch),
|
"aio-max-batch", offsetof(IOThread, aio_max_batch),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ static void iothread_get_param(Object *obj, Visitor *v,
|
||||||
const char *name, void *opaque, Error **errp)
|
const char *name, void *opaque, Error **errp)
|
||||||
{
|
{
|
||||||
IOThread *iothread = IOTHREAD(obj);
|
IOThread *iothread = IOTHREAD(obj);
|
||||||
PollParamInfo *info = opaque;
|
IOThreadParamInfo *info = opaque;
|
||||||
int64_t *field = (void *)iothread + info->offset;
|
int64_t *field = (void *)iothread + info->offset;
|
||||||
|
|
||||||
visit_type_int64(v, name, field, errp);
|
visit_type_int64(v, name, field, errp);
|
||||||
|
@ -244,7 +244,7 @@ static bool iothread_set_param(Object *obj, Visitor *v,
|
||||||
const char *name, void *opaque, Error **errp)
|
const char *name, void *opaque, Error **errp)
|
||||||
{
|
{
|
||||||
IOThread *iothread = IOTHREAD(obj);
|
IOThread *iothread = IOTHREAD(obj);
|
||||||
PollParamInfo *info = opaque;
|
IOThreadParamInfo *info = opaque;
|
||||||
int64_t *field = (void *)iothread + info->offset;
|
int64_t *field = (void *)iothread + info->offset;
|
||||||
int64_t value;
|
int64_t value;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue