1
The following changes since commit 9c125d17e9402c232c46610802e5931b3639d77b:
1
The following changes since commit d88d5a3806d78dcfca648c62dae9d88d3e803bd2:
2
2
3
Merge tag 'pull-tcg-20220420' of https://gitlab.com/rth7680/qemu into staging (2022-04-20 16:43:11 -0700)
3
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-hw-20200622' into staging (2020-06-23 13:55:52 +0100)
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://github.com/XanClic/qemu.git tags/pull-block-2020-06-24
8
8
9
for you to fetch changes up to d45c83328feab2e4083991693160f0a417cfd9b0:
9
for you to fetch changes up to 24b861c0386a17ea31eb824310c21118fb7be883:
10
10
11
virtiofsd: Add docs/helper for killpriv_v2/no_killpriv_v2 option (2022-04-21 12:05:15 +0200)
11
iotests: don't test qcow2.py inside 291 (2020-06-24 10:00:04 +0200)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Block patches:
15
15
- Two iotest fixes
16
Small contrib/vhost-user-blk, contrib/vhost-user-scsi, and tools/virtiofsd
17
improvements.
18
16
19
----------------------------------------------------------------
17
----------------------------------------------------------------
18
This is v2, where I dropped Maxim’s LUKS keyslot amendment series and my
19
iotest patches, because both caused iotest failures on some test
20
machines.
21
----------------------------------------------------------------
22
Philippe Mathieu-Daudé (1):
23
iotests: Fix 051 output after qdev_init_nofail() removal
20
24
21
Liu Yiding (1):
25
Vladimir Sementsov-Ogievskiy (1):
22
virtiofsd: Add docs/helper for killpriv_v2/no_killpriv_v2 option
26
iotests: don't test qcow2.py inside 291
23
27
24
Sakshi Kaushik (1):
28
tests/qemu-iotests/051.pc.out | 4 ++--
25
Implements Backend Program conventions for vhost-user-scsi
29
tests/qemu-iotests/291 | 4 ----
26
30
tests/qemu-iotests/291.out | 33 ---------------------------------
27
Stefan Hajnoczi (1):
31
3 files changed, 2 insertions(+), 39 deletions(-)
28
contrib/vhost-user-blk: add missing GOptionEntry NULL terminator
29
30
docs/tools/virtiofsd.rst | 5 ++
31
contrib/vhost-user-blk/vhost-user-blk.c | 3 +-
32
contrib/vhost-user-scsi/vhost-user-scsi.c | 77 +++++++++++++++--------
33
tools/virtiofsd/helper.c | 3 +
34
4 files changed, 62 insertions(+), 26 deletions(-)
35
32
36
--
33
--
37
2.35.1
34
2.26.2
35
36
diff view generated by jsdifflib
Deleted patch
1
From: Sakshi Kaushik <sakshikaushik717@gmail.com>
2
1
3
Signed-off-by: Sakshi Kaushik <sakshikaushik717@gmail.com>
4
Message-id: 20220406162410.8536-1-sakshikaushik717@gmail.com
5
6
[Name the iSCSI URL long option --iscsi-uri instead of --iscsi_uri for
7
consistency, fix --fd which was rejected due to an outdated
8
--socket-path check, and add missing entries[] terminator.
9
--Stefan]
10
11
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
12
---
13
contrib/vhost-user-scsi/vhost-user-scsi.c | 77 +++++++++++++++--------
14
1 file changed, 52 insertions(+), 25 deletions(-)
15
16
diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c
17
index XXXXXXX..XXXXXXX 100644
18
--- a/contrib/vhost-user-scsi/vhost-user-scsi.c
19
+++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
20
@@ -XXX,XX +XXX,XX @@ fail:
21
22
/** vhost-user-scsi **/
23
24
+static int opt_fdnum = -1;
25
+static char *opt_socket_path;
26
+static gboolean opt_print_caps;
27
+static char *iscsi_uri;
28
+
29
+static GOptionEntry entries[] = {
30
+ { "print-capabilities", 'c', 0, G_OPTION_ARG_NONE, &opt_print_caps,
31
+ "Print capabilities", NULL },
32
+ { "fd", 'f', 0, G_OPTION_ARG_INT, &opt_fdnum,
33
+ "Use inherited fd socket", "FDNUM" },
34
+ { "iscsi-uri", 'i', 0, G_OPTION_ARG_FILENAME, &iscsi_uri,
35
+ "iSCSI URI to connect to", "FDNUM" },
36
+ { "socket-path", 's', 0, G_OPTION_ARG_FILENAME, &opt_socket_path,
37
+ "Use UNIX socket path", "PATH" },
38
+ { NULL, }
39
+};
40
+
41
int main(int argc, char **argv)
42
{
43
VusDev *vdev_scsi = NULL;
44
- char *unix_fn = NULL;
45
- char *iscsi_uri = NULL;
46
- int lsock = -1, csock = -1, opt, err = EXIT_SUCCESS;
47
+ int lsock = -1, csock = -1, err = EXIT_SUCCESS;
48
49
- while ((opt = getopt(argc, argv, "u:i:")) != -1) {
50
- switch (opt) {
51
- case 'h':
52
- goto help;
53
- case 'u':
54
- unix_fn = g_strdup(optarg);
55
- break;
56
- case 'i':
57
- iscsi_uri = g_strdup(optarg);
58
- break;
59
- default:
60
- goto help;
61
- }
62
+ GError *error = NULL;
63
+ GOptionContext *context;
64
+
65
+ context = g_option_context_new(NULL);
66
+ g_option_context_add_main_entries(context, entries, NULL);
67
+ if (!g_option_context_parse(context, &argc, &argv, &error)) {
68
+ g_printerr("Option parsing failed: %s\n", error->message);
69
+ exit(EXIT_FAILURE);
70
+ }
71
+
72
+ if (opt_print_caps) {
73
+ g_print("{\n");
74
+ g_print(" \"type\": \"scsi\"\n");
75
+ g_print("}\n");
76
+ goto out;
77
}
78
- if (!unix_fn || !iscsi_uri) {
79
+
80
+ if (!iscsi_uri) {
81
goto help;
82
}
83
84
- lsock = unix_sock_new(unix_fn);
85
- if (lsock < 0) {
86
- goto err;
87
+ if (opt_socket_path) {
88
+ lsock = unix_sock_new(opt_socket_path);
89
+ if (lsock < 0) {
90
+ exit(EXIT_FAILURE);
91
+ }
92
+ } else if (opt_fdnum < 0) {
93
+ g_print("%s\n", g_option_context_get_help(context, true, NULL));
94
+ exit(EXIT_FAILURE);
95
+ } else {
96
+ lsock = opt_fdnum;
97
}
98
99
csock = accept(lsock, NULL, NULL);
100
@@ -XXX,XX +XXX,XX @@ out:
101
if (vdev_scsi) {
102
g_main_loop_unref(vdev_scsi->loop);
103
g_free(vdev_scsi);
104
- unlink(unix_fn);
105
+ unlink(opt_socket_path);
106
}
107
if (csock >= 0) {
108
close(csock);
109
@@ -XXX,XX +XXX,XX @@ out:
110
if (lsock >= 0) {
111
close(lsock);
112
}
113
- g_free(unix_fn);
114
+ g_free(opt_socket_path);
115
g_free(iscsi_uri);
116
117
return err;
118
@@ -XXX,XX +XXX,XX @@ err:
119
goto out;
120
121
help:
122
- fprintf(stderr, "Usage: %s [ -u unix_sock_path -i iscsi_uri ] | [ -h ]\n",
123
+ fprintf(stderr, "Usage: %s [ -s socket-path -i iscsi-uri -f fd -p print-capabilities ] | [ -h ]\n",
124
argv[0]);
125
- fprintf(stderr, " -u path to unix socket\n");
126
- fprintf(stderr, " -i iscsi uri for lun 0\n");
127
+ fprintf(stderr, " -s, --socket-path=SOCKET_PATH path to unix socket\n");
128
+ fprintf(stderr, " -i, --iscsi-uri=ISCSI_URI iscsi uri for lun 0\n");
129
+ fprintf(stderr, " -f, --fd=FILE_DESCRIPTOR file-descriptor\n");
130
+ fprintf(stderr, " -p, --print-capabilities=PRINT_CAPABILITIES denotes print-capabilities\n");
131
fprintf(stderr, " -h print help and quit\n");
132
133
goto err;
134
--
135
2.35.1
diff view generated by jsdifflib
1
From: Liu Yiding <liuyd.fnst@fujitsu.com>
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
2
3
virtiofsd has introduced killpriv_v2/no_killpriv_v2 for a while. Add
3
Commit 96927c744 replaced qdev_init_nofail() call by
4
description of it to docs/helper.
4
isa_realize_and_unref() which has a different error
5
message. Update the test output accordingly.
5
6
6
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
7
Gitlab CI error after merging b77b5b3dc7:
7
Message-Id: <20220421095151.2231099-1-liuyd.fnst@fujitsu.com>
8
https://gitlab.com/qemu-project/qemu/-/jobs/597414772#L4375
8
9
9
[Small documentation fixes: s/as client supports/as the client supports/
10
Reported-by: Thomas Huth <thuth@redhat.com>
10
and s/. /. /.
11
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
11
--Stefan]
12
Message-Id: <20200616154949.6586-1-philmd@redhat.com>
13
Reviewed-by: Thomas Huth <thuth@redhat.com>
14
Signed-off-by: Max Reitz <mreitz@redhat.com>
15
---
16
tests/qemu-iotests/051.pc.out | 4 ++--
17
1 file changed, 2 insertions(+), 2 deletions(-)
12
18
13
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
19
diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out
14
---
20
index XXXXXXX..XXXXXXX 100644
15
docs/tools/virtiofsd.rst | 5 +++++
21
--- a/tests/qemu-iotests/051.pc.out
16
tools/virtiofsd/helper.c | 3 +++
22
+++ b/tests/qemu-iotests/051.pc.out
17
2 files changed, 8 insertions(+)
23
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
24
25
Testing: -drive if=ide
26
QEMU X.Y.Z monitor - type 'help' for more information
27
-(qemu) QEMU_PROG: Initialization of device ide-hd failed: Device needs media, but drive is empty
28
+(qemu) QEMU_PROG: Device needs media, but drive is empty
29
30
Testing: -drive if=virtio
31
QEMU X.Y.Z monitor - type 'help' for more information
32
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
33
34
Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
35
QEMU X.Y.Z monitor - type 'help' for more information
36
-(qemu) QEMU_PROG: Initialization of device ide-hd failed: Block node is read-only
37
+(qemu) QEMU_PROG: Block node is read-only
38
39
Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
40
QEMU X.Y.Z monitor - type 'help' for more information
41
--
42
2.26.2
18
43
19
diff --git a/docs/tools/virtiofsd.rst b/docs/tools/virtiofsd.rst
44
20
index XXXXXXX..XXXXXXX 100644
21
--- a/docs/tools/virtiofsd.rst
22
+++ b/docs/tools/virtiofsd.rst
23
@@ -XXX,XX +XXX,XX @@ Options
24
label. Server will try to set that label on newly created file
25
atomically wherever possible.
26
27
+ * killpriv_v2|no_killpriv_v2 -
28
+ Enable/disable ``FUSE_HANDLE_KILLPRIV_V2`` support. KILLPRIV_V2 is enabled
29
+ by default as long as the client supports it. Enabling this option helps
30
+ with performance in write path.
31
+
32
.. option:: --socket-path=PATH
33
34
Listen on vhost-user UNIX domain socket at PATH.
35
diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
36
index XXXXXXX..XXXXXXX 100644
37
--- a/tools/virtiofsd/helper.c
38
+++ b/tools/virtiofsd/helper.c
39
@@ -XXX,XX +XXX,XX @@ void fuse_cmdline_help(void)
40
" -o announce_submounts Announce sub-mount points to the guest\n"
41
" -o posix_acl/no_posix_acl Enable/Disable posix_acl. (default: disabled)\n"
42
" -o security_label/no_security_label Enable/Disable security label. (default: disabled)\n"
43
+ " -o killpriv_v2/no_killpriv_v2\n"
44
+ " Enable/Disable FUSE_HANDLE_KILLPRIV_V2.\n"
45
+ " (default: enabled as long as client supports it)\n"
46
);
47
}
48
49
--
50
2.35.1
diff view generated by jsdifflib
1
The GLib documentation says "a NULL-terminated array of GOptionEntrys"
1
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2
so we'd better make sure there is a terminator that lets
3
g_option_context_add_main_entries() know when the end of the array has
4
been reached.
5
2
6
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
3
820c6bee534ec3b added testing of qcow2.py into 291, and it breaks 291
7
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
4
with external data file. Actually, 291 is bad place for qcow2.py
8
Message-id: 20220411150057.3009667-1-stefanha@redhat.com
5
testing, better add a separate test.
9
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
6
7
For now, drop qcow2.py testing from 291 to fix the regression.
8
9
Fixes: 820c6bee534ec3b
10
Reported-by: Max Reitz <mreitz@redhat.com>
11
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
12
Message-Id: <20200618154052.8629-1-vsementsov@virtuozzo.com>
13
Reviewed-by: Eric Blake <eblake@redhat.com>
14
Signed-off-by: Max Reitz <mreitz@redhat.com>
10
---
15
---
11
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
16
tests/qemu-iotests/291 | 4 ----
12
1 file changed, 2 insertions(+), 1 deletion(-)
17
tests/qemu-iotests/291.out | 33 ---------------------------------
18
2 files changed, 37 deletions(-)
13
19
14
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
20
diff --git a/tests/qemu-iotests/291 b/tests/qemu-iotests/291
21
index XXXXXXX..XXXXXXX 100755
22
--- a/tests/qemu-iotests/291
23
+++ b/tests/qemu-iotests/291
24
@@ -XXX,XX +XXX,XX @@ $QEMU_IO -c 'w 1M 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
25
$QEMU_IMG bitmap --disable -f $IMGFMT "$TEST_IMG" b1
26
$QEMU_IMG bitmap --enable -f $IMGFMT "$TEST_IMG" b2
27
$QEMU_IO -c 'w 2M 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
28
-echo "Check resulting qcow2 header extensions:"
29
-$PYTHON qcow2.py "$TEST_IMG" dump-header-exts
30
31
echo
32
echo "=== Bitmap preservation not possible to non-qcow2 ==="
33
@@ -XXX,XX +XXX,XX @@ $QEMU_IMG bitmap --merge tmp -f $IMGFMT "$TEST_IMG" b0
34
$QEMU_IMG bitmap --remove --image-opts \
35
driver=$IMGFMT,file.driver=file,file.filename="$TEST_IMG" tmp
36
_img_info --format-specific
37
-echo "Check resulting qcow2 header extensions:"
38
-$PYTHON qcow2.py "$TEST_IMG" dump-header-exts
39
40
echo
41
echo "=== Check bitmap contents ==="
42
diff --git a/tests/qemu-iotests/291.out b/tests/qemu-iotests/291.out
15
index XXXXXXX..XXXXXXX 100644
43
index XXXXXXX..XXXXXXX 100644
16
--- a/contrib/vhost-user-blk/vhost-user-blk.c
44
--- a/tests/qemu-iotests/291.out
17
+++ b/contrib/vhost-user-blk/vhost-user-blk.c
45
+++ b/tests/qemu-iotests/291.out
18
@@ -XXX,XX +XXX,XX @@ static GOptionEntry entries[] = {
46
@@ -XXX,XX +XXX,XX @@ wrote 1048576/1048576 bytes at offset 1048576
19
{"blk-file", 'b', 0, G_OPTION_ARG_FILENAME, &opt_blk_file,
47
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
20
"block device or file path", "PATH"},
48
wrote 1048576/1048576 bytes at offset 2097152
21
{ "read-only", 'r', 0, G_OPTION_ARG_NONE, &opt_read_only,
49
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
22
- "Enable read-only", NULL }
50
-Check resulting qcow2 header extensions:
23
+ "Enable read-only", NULL },
51
-Header extension:
24
+ { NULL, },
52
-magic 0xe2792aca (Backing format)
25
};
53
-length 5
26
54
-data 'qcow2'
27
int main(int argc, char **argv)
55
-
56
-Header extension:
57
-magic 0x6803f857 (Feature table)
58
-length 336
59
-data <binary>
60
-
61
-Header extension:
62
-magic 0x23852875 (Bitmaps)
63
-length 24
64
-nb_bitmaps 2
65
-reserved32 0
66
-bitmap_directory_size 0x40
67
-bitmap_directory_offset 0x510000
68
-
69
70
=== Bitmap preservation not possible to non-qcow2 ===
71
72
@@ -XXX,XX +XXX,XX @@ Format specific information:
73
granularity: 65536
74
refcount bits: 16
75
corrupt: false
76
-Check resulting qcow2 header extensions:
77
-Header extension:
78
-magic 0x6803f857 (Feature table)
79
-length 336
80
-data <binary>
81
-
82
-Header extension:
83
-magic 0x23852875 (Bitmaps)
84
-length 24
85
-nb_bitmaps 3
86
-reserved32 0
87
-bitmap_directory_size 0x60
88
-bitmap_directory_offset 0x520000
89
-
90
91
=== Check bitmap contents ===
92
28
--
93
--
29
2.35.1
94
2.26.2
95
96
diff view generated by jsdifflib