1 | The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51: | 1 | The following changes since commit ca61fa4b803e5d0abaf6f1ceb690f23bb78a4def: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1' into staging (2017-02-27 15:33:21 +0000) | 3 | Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20211006' into staging (2021-10-06 12:11:14 -0700) |
4 | 4 | ||
5 | are available in the git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | https://github.com/codyprime/qemu-kvm-jtc.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 51654aa52a94612edfaf76dcb51c0a0b7821c90d: | 9 | for you to fetch changes up to 1cc7eada97914f090125e588497986f6f7900514: |
10 | 10 | ||
11 | iscsi: add missing colons to the qapi docs (2017-02-27 23:33:41 -0500) | 11 | iothread: use IOThreadParamInfo in iothread_[set|get]_param() (2021-10-07 15:29:50 +0100) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block patches for 2.9 | 14 | Pull request |
15 | |||
15 | ---------------------------------------------------------------- | 16 | ---------------------------------------------------------------- |
16 | 17 | ||
17 | Jeff Cody (1): | 18 | Stefano Garzarella (2): |
18 | iscsi: add missing colons to the qapi docs | 19 | iothread: rename PollParamInfo to IOThreadParamInfo |
20 | iothread: use IOThreadParamInfo in iothread_[set|get]_param() | ||
19 | 21 | ||
20 | John Snow (1): | 22 | iothread.c | 28 +++++++++++++++------------- |
21 | block/mirror: fix broken sparseness detection | 23 | 1 file changed, 15 insertions(+), 13 deletions(-) |
22 | |||
23 | block/mirror.c | 2 +- | ||
24 | qapi/block-core.json | 18 +++++++++--------- | ||
25 | 2 files changed, 10 insertions(+), 10 deletions(-) | ||
26 | 24 | ||
27 | -- | 25 | -- |
28 | 2.9.3 | 26 | 2.31.1 |
29 | 27 | ||
30 | 28 | ||
29 | diff view generated by jsdifflib |
1 | The missing colons make the iscsi part of the documentation not render | 1 | From: Stefano Garzarella <sgarzare@redhat.com> |
---|---|---|---|
2 | quite as nicely, so add those in. | ||
3 | 2 | ||
4 | Signed-off-by: Jeff Cody <jcody@redhat.com> | 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> | ||
5 | --- | 15 | --- |
6 | qapi/block-core.json | 18 +++++++++--------- | 16 | iothread.c | 14 +++++++------- |
7 | 1 file changed, 9 insertions(+), 9 deletions(-) | 17 | 1 file changed, 7 insertions(+), 7 deletions(-) |
8 | 18 | ||
9 | diff --git a/qapi/block-core.json b/qapi/block-core.json | 19 | diff --git a/iothread.c b/iothread.c |
10 | index XXXXXXX..XXXXXXX 100644 | 20 | index XXXXXXX..XXXXXXX 100644 |
11 | --- a/qapi/block-core.json | 21 | --- a/iothread.c |
12 | +++ b/qapi/block-core.json | 22 | +++ b/iothread.c |
13 | @@ -XXX,XX +XXX,XX @@ | 23 | @@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp) |
14 | ## | 24 | typedef struct { |
15 | # @BlockdevOptionsIscsi: | 25 | const char *name; |
16 | # | 26 | ptrdiff_t offset; /* field's byte offset in IOThread struct */ |
17 | -# @transport The iscsi transport type | 27 | -} PollParamInfo; |
18 | +# @transport: The iscsi transport type | 28 | +} IOThreadParamInfo; |
19 | # | 29 | |
20 | -# @portal The address of the iscsi portal | 30 | -static PollParamInfo poll_max_ns_info = { |
21 | +# @portal: The address of the iscsi portal | 31 | +static IOThreadParamInfo poll_max_ns_info = { |
22 | # | 32 | "poll-max-ns", offsetof(IOThread, poll_max_ns), |
23 | -# @target The target iqn name | 33 | }; |
24 | +# @target: The target iqn name | 34 | -static PollParamInfo poll_grow_info = { |
25 | # | 35 | +static IOThreadParamInfo poll_grow_info = { |
26 | -# @lun #optional LUN to connect to. Defaults to 0. | 36 | "poll-grow", offsetof(IOThread, poll_grow), |
27 | +# @lun: #optional LUN to connect to. Defaults to 0. | 37 | }; |
28 | # | 38 | -static PollParamInfo poll_shrink_info = { |
29 | -# @user #optional User name to log in with. If omitted, no CHAP | 39 | +static IOThreadParamInfo poll_shrink_info = { |
30 | +# @user: #optional User name to log in with. If omitted, no CHAP | 40 | "poll-shrink", offsetof(IOThread, poll_shrink), |
31 | # authentication is performed. | 41 | }; |
32 | # | 42 | -static PollParamInfo aio_max_batch_info = { |
33 | -# @password-secret #optional The ID of a QCryptoSecret object providing | 43 | +static IOThreadParamInfo aio_max_batch_info = { |
34 | +# @password-secret: #optional The ID of a QCryptoSecret object providing | 44 | "aio-max-batch", offsetof(IOThread, aio_max_batch), |
35 | # the password for the login. This option is required if | 45 | }; |
36 | # @user is specified. | 46 | |
37 | # | 47 | @@ -XXX,XX +XXX,XX @@ static void iothread_get_param(Object *obj, Visitor *v, |
38 | -# @initiator-name #optional The iqn name we want to identify to the target | 48 | const char *name, void *opaque, Error **errp) |
39 | +# @initiator-name: #optional The iqn name we want to identify to the target | 49 | { |
40 | # as. If this option is not specified, an initiator name is | 50 | IOThread *iothread = IOTHREAD(obj); |
41 | # generated automatically. | 51 | - PollParamInfo *info = opaque; |
42 | # | 52 | + IOThreadParamInfo *info = opaque; |
43 | -# @header-digest #optional The desired header digest. Defaults to | 53 | int64_t *field = (void *)iothread + info->offset; |
44 | +# @header-digest: #optional The desired header digest. Defaults to | 54 | |
45 | # none-crc32c. | 55 | visit_type_int64(v, name, field, errp); |
46 | # | 56 | @@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v, |
47 | -# @timeout #optional Timeout in seconds after which a request will | 57 | const char *name, void *opaque, Error **errp) |
48 | +# @timeout: #optional Timeout in seconds after which a request will | 58 | { |
49 | # timeout. 0 means no timeout and is the default. | 59 | IOThread *iothread = IOTHREAD(obj); |
50 | # | 60 | - PollParamInfo *info = opaque; |
51 | # Driver specific block device options for iscsi | 61 | + IOThreadParamInfo *info = opaque; |
62 | int64_t *field = (void *)iothread + info->offset; | ||
63 | int64_t value; | ||
64 | |||
52 | -- | 65 | -- |
53 | 2.9.3 | 66 | 2.31.1 |
54 | 67 | ||
55 | 68 | diff view generated by jsdifflib |
1 | From: John Snow <jsnow@redhat.com> | 1 | From: Stefano Garzarella <sgarzare@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | int64_t is in all likelihood the actual scalar type we want. | 3 | Commit 0445409d74 ("iothread: generalize |
4 | Yep, really. | 4 | iothread_set_param/iothread_get_param") moved common code to set and |
5 | get IOThread parameters in two new functions. | ||
5 | 6 | ||
6 | Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1219541 | 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`. | ||
7 | 10 | ||
8 | Signed-off-by: John Snow <jsnow@redhat.com> | 11 | Suggested-by: Kevin Wolf <kwolf@redhat.com> |
9 | Reviewed-by: Jeff Cody <jcody@redhat.com> | 12 | Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> |
10 | Signed-off-by: Jeff Cody <jcody@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> | ||
11 | --- | 16 | --- |
12 | block/mirror.c | 2 +- | 17 | iothread.c | 18 ++++++++++-------- |
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 10 insertions(+), 8 deletions(-) |
14 | 19 | ||
15 | diff --git a/block/mirror.c b/block/mirror.c | 20 | diff --git a/iothread.c b/iothread.c |
16 | index XXXXXXX..XXXXXXX 100644 | 21 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/block/mirror.c | 22 | --- a/iothread.c |
18 | +++ b/block/mirror.c | 23 | +++ b/iothread.c |
19 | @@ -XXX,XX +XXX,XX @@ static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s) | 24 | @@ -XXX,XX +XXX,XX @@ static IOThreadParamInfo aio_max_batch_info = { |
20 | nb_chunks * sectors_per_chunk); | 25 | }; |
21 | bitmap_set(s->in_flight_bitmap, sector_num / sectors_per_chunk, nb_chunks); | 26 | |
22 | while (nb_chunks > 0 && sector_num < end) { | 27 | static void iothread_get_param(Object *obj, Visitor *v, |
23 | - int ret; | 28 | - const char *name, void *opaque, Error **errp) |
24 | + int64_t ret; | 29 | + const char *name, IOThreadParamInfo *info, Error **errp) |
25 | int io_sectors, io_sectors_acct; | 30 | { |
26 | BlockDriverState *file; | 31 | IOThread *iothread = IOTHREAD(obj); |
27 | enum MirrorMethod { | 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 | } | ||
67 | |||
68 | @@ -XXX,XX +XXX,XX @@ static void iothread_set_poll_param(Object *obj, Visitor *v, | ||
69 | static void iothread_get_aio_param(Object *obj, Visitor *v, | ||
70 | const char *name, void *opaque, Error **errp) | ||
71 | { | ||
72 | + IOThreadParamInfo *info = opaque; | ||
73 | |||
74 | - iothread_get_param(obj, v, name, opaque, errp); | ||
75 | + iothread_get_param(obj, v, name, info, errp); | ||
76 | } | ||
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 | |||
28 | -- | 89 | -- |
29 | 2.9.3 | 90 | 2.31.1 |
30 | 91 | ||
31 | 92 | diff view generated by jsdifflib |