1 | The following changes since commit ca61fa4b803e5d0abaf6f1ceb690f23bb78a4def: | 1 | The following changes since commit 2480f3bbd03814b0651a1f74959f5c6631ee5819: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20211006' into staging (2021-10-06 12:11:14 -0700) | 3 | Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-08-03 08:32:44 -0700) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request | 7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to 1cc7eada97914f090125e588497986f6f7900514: | 9 | for you to fetch changes up to 7b0ca313647532a2c7007379ff800c9a2415c95d: |
10 | 10 | ||
11 | iothread: use IOThreadParamInfo in iothread_[set|get]_param() (2021-10-07 15:29:50 +0100) | 11 | virtiofsd: Fix format strings (2022-08-04 14:44:25 -0400) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Pull request | 14 | Pull request |
15 | 15 | ||
16 | - Format string portability fix in virtiofsd | ||
17 | |||
16 | ---------------------------------------------------------------- | 18 | ---------------------------------------------------------------- |
17 | 19 | ||
18 | Stefano Garzarella (2): | 20 | Stefan Weil (1): |
19 | iothread: rename PollParamInfo to IOThreadParamInfo | 21 | virtiofsd: Fix format strings |
20 | iothread: use IOThreadParamInfo in iothread_[set|get]_param() | ||
21 | 22 | ||
22 | iothread.c | 28 +++++++++++++++------------- | 23 | tools/virtiofsd/fuse_lowlevel.c | 4 ++-- |
23 | 1 file changed, 15 insertions(+), 13 deletions(-) | 24 | 1 file changed, 2 insertions(+), 2 deletions(-) |
24 | 25 | ||
25 | -- | 26 | -- |
26 | 2.31.1 | 27 | 2.37.1 |
27 | |||
28 | |||
29 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Stefano Garzarella <sgarzare@redhat.com> | ||
2 | 1 | ||
3 | Commit 1793ad0247 ("iothread: add aio-max-batch parameter") added | ||
4 | a new parameter (aio-max-batch) to IOThread and used PollParamInfo | ||
5 | structure to handle it. | ||
6 | |||
7 | Since it is not a parameter of the polling mechanism, we rename the | ||
8 | structure to a more generic IOThreadParamInfo. | ||
9 | |||
10 | Suggested-by: Kevin Wolf <kwolf@redhat.com> | ||
11 | Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> | ||
12 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
13 | Message-id: 20210727145936.147032-2-sgarzare@redhat.com | ||
14 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
15 | --- | ||
16 | iothread.c | 14 +++++++------- | ||
17 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
18 | |||
19 | diff --git a/iothread.c b/iothread.c | ||
20 | index XXXXXXX..XXXXXXX 100644 | ||
21 | --- a/iothread.c | ||
22 | +++ b/iothread.c | ||
23 | @@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp) | ||
24 | typedef struct { | ||
25 | const char *name; | ||
26 | ptrdiff_t offset; /* field's byte offset in IOThread struct */ | ||
27 | -} PollParamInfo; | ||
28 | +} IOThreadParamInfo; | ||
29 | |||
30 | -static PollParamInfo poll_max_ns_info = { | ||
31 | +static IOThreadParamInfo poll_max_ns_info = { | ||
32 | "poll-max-ns", offsetof(IOThread, poll_max_ns), | ||
33 | }; | ||
34 | -static PollParamInfo poll_grow_info = { | ||
35 | +static IOThreadParamInfo poll_grow_info = { | ||
36 | "poll-grow", offsetof(IOThread, poll_grow), | ||
37 | }; | ||
38 | -static PollParamInfo poll_shrink_info = { | ||
39 | +static IOThreadParamInfo poll_shrink_info = { | ||
40 | "poll-shrink", offsetof(IOThread, poll_shrink), | ||
41 | }; | ||
42 | -static PollParamInfo aio_max_batch_info = { | ||
43 | +static IOThreadParamInfo aio_max_batch_info = { | ||
44 | "aio-max-batch", offsetof(IOThread, aio_max_batch), | ||
45 | }; | ||
46 | |||
47 | @@ -XXX,XX +XXX,XX @@ static void iothread_get_param(Object *obj, Visitor *v, | ||
48 | const char *name, void *opaque, Error **errp) | ||
49 | { | ||
50 | IOThread *iothread = IOTHREAD(obj); | ||
51 | - PollParamInfo *info = opaque; | ||
52 | + IOThreadParamInfo *info = opaque; | ||
53 | int64_t *field = (void *)iothread + info->offset; | ||
54 | |||
55 | visit_type_int64(v, name, field, errp); | ||
56 | @@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v, | ||
57 | const char *name, void *opaque, Error **errp) | ||
58 | { | ||
59 | IOThread *iothread = IOTHREAD(obj); | ||
60 | - PollParamInfo *info = opaque; | ||
61 | + IOThreadParamInfo *info = opaque; | ||
62 | int64_t *field = (void *)iothread + info->offset; | ||
63 | int64_t value; | ||
64 | |||
65 | -- | ||
66 | 2.31.1 | ||
67 | |||
68 | diff view generated by jsdifflib |
1 | From: Stefano Garzarella <sgarzare@redhat.com> | 1 | From: Stefan Weil <sw@weilnetz.de> |
---|---|---|---|
2 | 2 | ||
3 | Commit 0445409d74 ("iothread: generalize | 3 | Signed-off-by: Stefan Weil <sw@weilnetz.de> |
4 | iothread_set_param/iothread_get_param") moved common code to set and | 4 | Message-Id: <20220804074833.892604-1-sw@weilnetz.de> |
5 | get IOThread parameters in two new functions. | ||
6 | |||
7 | These functions are called inside callbacks, so we don't need to use an | ||
8 | opaque pointer. Let's replace `void *opaque` parameter with | ||
9 | `IOThreadParamInfo *info`. | ||
10 | |||
11 | Suggested-by: Kevin Wolf <kwolf@redhat.com> | ||
12 | Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> | ||
13 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
14 | Message-id: 20210727145936.147032-3-sgarzare@redhat.com | ||
15 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 5 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
16 | --- | 6 | --- |
17 | iothread.c | 18 ++++++++++-------- | 7 | tools/virtiofsd/fuse_lowlevel.c | 4 ++-- |
18 | 1 file changed, 10 insertions(+), 8 deletions(-) | 8 | 1 file changed, 2 insertions(+), 2 deletions(-) |
19 | 9 | ||
20 | diff --git a/iothread.c b/iothread.c | 10 | diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c |
21 | index XXXXXXX..XXXXXXX 100644 | 11 | index XXXXXXX..XXXXXXX 100644 |
22 | --- a/iothread.c | 12 | --- a/tools/virtiofsd/fuse_lowlevel.c |
23 | +++ b/iothread.c | 13 | +++ b/tools/virtiofsd/fuse_lowlevel.c |
24 | @@ -XXX,XX +XXX,XX @@ static IOThreadParamInfo aio_max_batch_info = { | 14 | @@ -XXX,XX +XXX,XX @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, |
25 | }; | 15 | |
26 | 16 | fuse_log(FUSE_LOG_DEBUG, "INIT: %u.%u\n", arg->major, arg->minor); | |
27 | static void iothread_get_param(Object *obj, Visitor *v, | 17 | if (arg->major == 7 && arg->minor >= 6) { |
28 | - const char *name, void *opaque, Error **errp) | 18 | - fuse_log(FUSE_LOG_DEBUG, "flags=0x%016llx\n", flags); |
29 | + const char *name, IOThreadParamInfo *info, Error **errp) | 19 | + fuse_log(FUSE_LOG_DEBUG, "flags=0x%016" PRIx64 "\n", flags); |
30 | { | 20 | fuse_log(FUSE_LOG_DEBUG, "max_readahead=0x%08x\n", arg->max_readahead); |
31 | IOThread *iothread = IOTHREAD(obj); | ||
32 | - IOThreadParamInfo *info = opaque; | ||
33 | int64_t *field = (void *)iothread + info->offset; | ||
34 | |||
35 | visit_type_int64(v, name, field, errp); | ||
36 | } | ||
37 | |||
38 | static bool iothread_set_param(Object *obj, Visitor *v, | ||
39 | - const char *name, void *opaque, Error **errp) | ||
40 | + const char *name, IOThreadParamInfo *info, Error **errp) | ||
41 | { | ||
42 | IOThread *iothread = IOTHREAD(obj); | ||
43 | - IOThreadParamInfo *info = opaque; | ||
44 | int64_t *field = (void *)iothread + info->offset; | ||
45 | int64_t value; | ||
46 | |||
47 | @@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v, | ||
48 | static void iothread_get_poll_param(Object *obj, Visitor *v, | ||
49 | const char *name, void *opaque, Error **errp) | ||
50 | { | ||
51 | + IOThreadParamInfo *info = opaque; | ||
52 | |||
53 | - iothread_get_param(obj, v, name, opaque, errp); | ||
54 | + iothread_get_param(obj, v, name, info, errp); | ||
55 | } | ||
56 | |||
57 | static void iothread_set_poll_param(Object *obj, Visitor *v, | ||
58 | const char *name, void *opaque, Error **errp) | ||
59 | { | ||
60 | IOThread *iothread = IOTHREAD(obj); | ||
61 | + IOThreadParamInfo *info = opaque; | ||
62 | |||
63 | - if (!iothread_set_param(obj, v, name, opaque, errp)) { | ||
64 | + if (!iothread_set_param(obj, v, name, info, errp)) { | ||
65 | return; | ||
66 | } | 21 | } |
67 | 22 | se->conn.proto_major = arg->major; | |
68 | @@ -XXX,XX +XXX,XX @@ static void iothread_set_poll_param(Object *obj, Visitor *v, | 23 | @@ -XXX,XX +XXX,XX @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, |
69 | static void iothread_get_aio_param(Object *obj, Visitor *v, | 24 | if (se->conn.want & (~se->conn.capable)) { |
70 | const char *name, void *opaque, Error **errp) | 25 | fuse_log(FUSE_LOG_ERR, |
71 | { | 26 | "fuse: error: filesystem requested capabilities " |
72 | + IOThreadParamInfo *info = opaque; | 27 | - "0x%llx that are not supported by kernel, aborting.\n", |
73 | 28 | + "0x%" PRIx64 " that are not supported by kernel, aborting.\n", | |
74 | - iothread_get_param(obj, v, name, opaque, errp); | 29 | se->conn.want & (~se->conn.capable)); |
75 | + iothread_get_param(obj, v, name, info, errp); | 30 | fuse_reply_err(req, EPROTO); |
76 | } | 31 | se->error = -EPROTO; |
77 | |||
78 | static void iothread_set_aio_param(Object *obj, Visitor *v, | ||
79 | const char *name, void *opaque, Error **errp) | ||
80 | { | ||
81 | IOThread *iothread = IOTHREAD(obj); | ||
82 | + IOThreadParamInfo *info = opaque; | ||
83 | |||
84 | - if (!iothread_set_param(obj, v, name, opaque, errp)) { | ||
85 | + if (!iothread_set_param(obj, v, name, info, errp)) { | ||
86 | return; | ||
87 | } | ||
88 | |||
89 | -- | 32 | -- |
90 | 2.31.1 | 33 | 2.37.1 |
91 | |||
92 | diff view generated by jsdifflib |