1
The following changes since commit 77d472291812cf04f97974dadbda767e59e31fde:
1
The following changes since commit cf7ca7d5b9faca13f1f8e3ea92cfb2f741eb0c0e:
2
2
3
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170707-tag' into staging (2017-07-10 10:29:11 +0100)
3
Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging (2021-02-01 16:28:00 +0000)
4
4
5
are available in the git repository at:
5
are available in the Git repository at:
6
7
6
8
git://repo.or.cz/qemu/kevin.git tags/for-upstream
7
git://repo.or.cz/qemu/kevin.git tags/for-upstream
9
8
10
for you to fetch changes up to 51b0a488882328f8f02519bb47ca7e0e7fbe12ff:
9
for you to fetch changes up to 26513a01741f51650f5dd716681995359794ba6f:
11
10
12
block: Make bdrv_is_allocated_above() byte-based (2017-07-10 13:18:07 +0200)
11
block: Fix VM size column width in bdrv_snapshot_dump() (2021-02-02 17:23:55 +0100)
13
12
14
----------------------------------------------------------------
13
----------------------------------------------------------------
15
Block layer patches
14
Block layer patches:
15
16
- Fix double processing of nodes in bdrv_set_aio_context()
17
- Fix potential hang in block export shutdown
18
- block/nvme: Minor tracing improvements
19
- iotests: Some more fixups for the 'check' rewrite
20
- MAINTAINERS: Add Vladimir as co-maintainer for Block Jobs
16
21
17
----------------------------------------------------------------
22
----------------------------------------------------------------
18
Daniel P. Berrange (1):
23
Kevin Wolf (3):
19
qemu-img: drop -e and -6 options from the 'create' & 'convert' commands
24
iotests: Revert emulator selection to old behaviour
25
iotests: Fix -makecheck output
26
block: Fix VM size column width in bdrv_snapshot_dump()
20
27
21
Eric Blake (25):
28
Philippe Mathieu-Daudé (2):
22
qemu-io: Don't die on second open
29
block/nvme: Properly display doorbell stride length in trace event
23
block: Guarantee that *file is set on bdrv_get_block_status()
30
block/nvme: Trace NVMe spec version supported by the controller
24
block: Simplify use of BDRV_BLOCK_RAW
25
blkdebug: Support .bdrv_co_get_block_status
26
blockjob: Track job ratelimits via bytes, not sectors
27
trace: Show blockjob actions via bytes, not sectors
28
stream: Switch stream_populate() to byte-based
29
stream: Drop reached_end for stream_complete()
30
stream: Switch stream_run() to byte-based
31
commit: Switch commit_populate() to byte-based
32
commit: Switch commit_run() to byte-based
33
mirror: Switch MirrorBlockJob to byte-based
34
mirror: Switch mirror_do_zero_or_discard() to byte-based
35
mirror: Update signature of mirror_clip_sectors()
36
mirror: Switch mirror_cow_align() to byte-based
37
mirror: Switch mirror_do_read() to byte-based
38
mirror: Switch mirror_iteration() to byte-based
39
block: Drop unused bdrv_round_sectors_to_clusters()
40
backup: Switch BackupBlockJob to byte-based
41
backup: Switch block_backup.h to byte-based
42
backup: Switch backup_do_cow() to byte-based
43
backup: Switch backup_run() to byte-based
44
block: Make bdrv_is_allocated() byte-based
45
block: Minimize raw use of bds->total_sectors
46
block: Make bdrv_is_allocated_above() byte-based
47
31
48
Hervé Poussineau (13):
32
Sergio Lopez (2):
49
vvfat: fix qemu-img map and qemu-img convert
33
block: Avoid processing BDS twice in bdrv_set_aio_context_ignore()
50
vvfat: replace tabs by 8 spaces
34
block: move blk_exp_close_all() to qemu_cleanup()
51
vvfat: fix typos
52
vvfat: rename useless enumeration values
53
vvfat: introduce offset_to_bootsector, offset_to_fat and offset_to_root_dir
54
vvfat: fix field names in FAT12/FAT16 and FAT32 boot sectors
55
vvfat: always create . and .. entries at first and in that order
56
vvfat: correctly create long names for non-ASCII filenames
57
vvfat: correctly create base short names for non-ASCII filenames
58
vvfat: correctly generate numeric-tail of short file names
59
vvfat: limit number of entries in root directory in FAT12/FAT16
60
vvfat: handle KANJI lead byte 0xe5
61
vvfat: change OEM name to 'MSWIN4.1'
62
35
63
Thomas Huth (1):
36
Vladimir Sementsov-Ogievskiy (3):
64
blockdev: Print a warning for legacy drive options that belong to -device
37
MAINTAINERS: Add Vladimir as co-maintainer for Block Jobs
38
iotests/297: pylint: ignore too many statements
39
iotests: check: return 1 on failure
65
40
66
block/backup.c | 128 +--
41
block.c | 35 +++++++++++++++++++++++++++--------
67
block/blkdebug.c | 11 +
42
block/nvme.c | 8 +++++++-
68
block/commit.c | 56 +-
43
block/qapi.c | 4 ++--
69
block/io.c | 102 +-
44
qemu-nbd.c | 1 +
70
block/mirror.c | 310 +++---
45
softmmu/runstate.c | 9 +++++++++
71
block/raw-format.c | 2 +-
46
storage-daemon/qemu-storage-daemon.c | 1 +
72
block/replication.c | 29 +-
47
tests/qemu-iotests/testenv.py | 2 +-
73
block/stream.c | 37 +-
48
tests/qemu-iotests/testrunner.py | 10 +++++++---
74
block/trace-events | 14 +-
49
MAINTAINERS | 10 ++++++++++
75
block/vpc.c | 2 +-
50
block/trace-events | 1 +
76
block/vvfat.c | 2336 ++++++++++++++++++++++--------------------
51
tests/qemu-iotests/check | 5 ++++-
77
blockdev.c | 14 +
52
tests/qemu-iotests/pylintrc | 2 ++
78
include/block/block.h | 16 +-
53
12 files changed, 72 insertions(+), 16 deletions(-)
79
include/block/block_backup.h | 11 +-
80
include/qemu/ratelimit.h | 3 +-
81
migration/block.c | 16 +-
82
qemu-img.c | 41 +-
83
qemu-io-cmds.c | 70 +-
84
qemu-io.c | 7 +-
85
qemu-options.hx | 9 +-
86
tests/qemu-iotests/060.out | 1 +
87
tests/qemu-iotests/114.out | 5 +-
88
tests/qemu-iotests/153.out | 6 +
89
tests/qemu-iotests/177 | 3 +
90
tests/qemu-iotests/177.out | 5 +
91
25 files changed, 1675 insertions(+), 1559 deletions(-)
92
54
55
diff view generated by jsdifflib
New patch
1
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
1
2
3
I'm developing Qemu backup for several years, and finally new backup
4
architecture, including block-copy generic engine and backup-top filter
5
landed upstream, great thanks to reviewers and especially to
6
Max Reitz!
7
8
I also have plans of moving other block-jobs onto block-copy, so that
9
we finally have one generic block copying path, fast and well-formed.
10
11
So, now I suggest to bring all parts of backup architecture into
12
"Block Jobs" subsystem (actually, aio_task is shared with qcow2 and
13
qemu-co-shared-resource can be reused somewhere else, but I'd keep an
14
eye on them in context of block-jobs) and add myself as co-maintainer.
15
16
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
17
Message-Id: <20210128144144.27617-1-vsementsov@virtuozzo.com>
18
Reviewed-by: Markus Armbruster <armbru@redhat.com>
19
Reviewed-by: John Snow <jsnow@redhat.com>
20
Reviewed-by: Max Reitz <mreitz@redhat.com>
21
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22
---
23
MAINTAINERS | 10 ++++++++++
24
1 file changed, 10 insertions(+)
25
26
diff --git a/MAINTAINERS b/MAINTAINERS
27
index XXXXXXX..XXXXXXX 100644
28
--- a/MAINTAINERS
29
+++ b/MAINTAINERS
30
@@ -XXX,XX +XXX,XX @@ F: scsi/*
31
32
Block Jobs
33
M: John Snow <jsnow@redhat.com>
34
+M: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
35
L: qemu-block@nongnu.org
36
S: Supported
37
F: blockjob.c
38
@@ -XXX,XX +XXX,XX @@ F: block/commit.c
39
F: block/stream.c
40
F: block/mirror.c
41
F: qapi/job.json
42
+F: block/block-copy.c
43
+F: include/block/block-copy.c
44
+F: block/backup-top.h
45
+F: block/backup-top.c
46
+F: include/block/aio_task.h
47
+F: block/aio_task.c
48
+F: util/qemu-co-shared-resource.c
49
+F: include/qemu/co-shared-resource.h
50
T: git https://gitlab.com/jsnow/qemu.git jobs
51
+T: git https://src.openvz.org/scm/~vsementsov/qemu.git jobs
52
53
Block QAPI, monitor, command line
54
M: Markus Armbruster <armbru@redhat.com>
55
--
56
2.29.2
57
58
diff view generated by jsdifflib
New patch
1
From: Sergio Lopez <slp@redhat.com>
1
2
3
Some graphs may contain an indirect reference to the first BDS in the
4
chain that can be reached while walking it bottom->up from one its
5
children.
6
7
Doubling-processing of a BDS is especially problematic for the
8
aio_notifiers, as they might attempt to work on both the old and the
9
new AIO contexts.
10
11
To avoid this problem, add every child and parent to the ignore list
12
before actually processing them.
13
14
Suggested-by: Kevin Wolf <kwolf@redhat.com>
15
Signed-off-by: Sergio Lopez <slp@redhat.com>
16
Message-Id: <20210201125032.44713-2-slp@redhat.com>
17
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
18
---
19
block.c | 34 +++++++++++++++++++++++++++-------
20
1 file changed, 27 insertions(+), 7 deletions(-)
21
22
diff --git a/block.c b/block.c
23
index XXXXXXX..XXXXXXX 100644
24
--- a/block.c
25
+++ b/block.c
26
@@ -XXX,XX +XXX,XX @@ void bdrv_set_aio_context_ignore(BlockDriverState *bs,
27
AioContext *new_context, GSList **ignore)
28
{
29
AioContext *old_context = bdrv_get_aio_context(bs);
30
- BdrvChild *child;
31
+ GSList *children_to_process = NULL;
32
+ GSList *parents_to_process = NULL;
33
+ GSList *entry;
34
+ BdrvChild *child, *parent;
35
36
g_assert(qemu_get_current_aio_context() == qemu_get_aio_context());
37
38
@@ -XXX,XX +XXX,XX @@ void bdrv_set_aio_context_ignore(BlockDriverState *bs,
39
continue;
40
}
41
*ignore = g_slist_prepend(*ignore, child);
42
- bdrv_set_aio_context_ignore(child->bs, new_context, ignore);
43
+ children_to_process = g_slist_prepend(children_to_process, child);
44
}
45
- QLIST_FOREACH(child, &bs->parents, next_parent) {
46
- if (g_slist_find(*ignore, child)) {
47
+
48
+ QLIST_FOREACH(parent, &bs->parents, next_parent) {
49
+ if (g_slist_find(*ignore, parent)) {
50
continue;
51
}
52
- assert(child->klass->set_aio_ctx);
53
- *ignore = g_slist_prepend(*ignore, child);
54
- child->klass->set_aio_ctx(child, new_context, ignore);
55
+ *ignore = g_slist_prepend(*ignore, parent);
56
+ parents_to_process = g_slist_prepend(parents_to_process, parent);
57
+ }
58
+
59
+ for (entry = children_to_process;
60
+ entry != NULL;
61
+ entry = g_slist_next(entry)) {
62
+ child = entry->data;
63
+ bdrv_set_aio_context_ignore(child->bs, new_context, ignore);
64
+ }
65
+ g_slist_free(children_to_process);
66
+
67
+ for (entry = parents_to_process;
68
+ entry != NULL;
69
+ entry = g_slist_next(entry)) {
70
+ parent = entry->data;
71
+ assert(parent->klass->set_aio_ctx);
72
+ parent->klass->set_aio_ctx(parent, new_context, ignore);
73
}
74
+ g_slist_free(parents_to_process);
75
76
bdrv_detach_aio_context(bs);
77
78
--
79
2.29.2
80
81
diff view generated by jsdifflib
New patch
1
From: Sergio Lopez <slp@redhat.com>
1
2
3
Move blk_exp_close_all() from bdrv_close() to qemu_cleanup(), before
4
bdrv_drain_all_begin().
5
6
Export drivers may have coroutines yielding at some point in the block
7
layer, so we need to shut them down before draining the block layer,
8
as otherwise they may get stuck blk_wait_while_drained().
9
10
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1900505
11
Signed-off-by: Sergio Lopez <slp@redhat.com>
12
Message-Id: <20210201125032.44713-3-slp@redhat.com>
13
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
14
---
15
block.c | 1 -
16
qemu-nbd.c | 1 +
17
softmmu/runstate.c | 9 +++++++++
18
storage-daemon/qemu-storage-daemon.c | 1 +
19
4 files changed, 11 insertions(+), 1 deletion(-)
20
21
diff --git a/block.c b/block.c
22
index XXXXXXX..XXXXXXX 100644
23
--- a/block.c
24
+++ b/block.c
25
@@ -XXX,XX +XXX,XX @@ static void bdrv_close(BlockDriverState *bs)
26
void bdrv_close_all(void)
27
{
28
assert(job_next(NULL) == NULL);
29
- blk_exp_close_all();
30
31
/* Drop references from requests still in flight, such as canceled block
32
* jobs whose AIO context has not been polled yet */
33
diff --git a/qemu-nbd.c b/qemu-nbd.c
34
index XXXXXXX..XXXXXXX 100644
35
--- a/qemu-nbd.c
36
+++ b/qemu-nbd.c
37
@@ -XXX,XX +XXX,XX @@ static const char *socket_activation_validate_opts(const char *device,
38
static void qemu_nbd_shutdown(void)
39
{
40
job_cancel_sync_all();
41
+ blk_exp_close_all();
42
bdrv_close_all();
43
}
44
45
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
46
index XXXXXXX..XXXXXXX 100644
47
--- a/softmmu/runstate.c
48
+++ b/softmmu/runstate.c
49
@@ -XXX,XX +XXX,XX @@
50
#include "qemu/osdep.h"
51
#include "audio/audio.h"
52
#include "block/block.h"
53
+#include "block/export.h"
54
#include "chardev/char.h"
55
#include "crypto/cipher.h"
56
#include "crypto/init.h"
57
@@ -XXX,XX +XXX,XX @@ void qemu_cleanup(void)
58
*/
59
migration_shutdown();
60
61
+ /*
62
+ * Close the exports before draining the block layer. The export
63
+ * drivers may have coroutines yielding on it, so we need to clean
64
+ * them up before the drain, as otherwise they may be get stuck in
65
+ * blk_wait_while_drained().
66
+ */
67
+ blk_exp_close_all();
68
+
69
/*
70
* We must cancel all block jobs while the block layer is drained,
71
* or cancelling will be affected by throttling and thus may block
72
diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-storage-daemon.c
73
index XXXXXXX..XXXXXXX 100644
74
--- a/storage-daemon/qemu-storage-daemon.c
75
+++ b/storage-daemon/qemu-storage-daemon.c
76
@@ -XXX,XX +XXX,XX @@ int main(int argc, char *argv[])
77
main_loop_wait(false);
78
}
79
80
+ blk_exp_close_all();
81
bdrv_drain_all_begin();
82
bdrv_close_all();
83
84
--
85
2.29.2
86
87
diff view generated by jsdifflib
New patch
1
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
1
2
3
Ignore two complains, which now lead to 297 failure on testenv.py and
4
testrunner.py.
5
6
Fixes: 2e5a2f57db481f18fcf70be2a36b1417370b8476
7
Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
8
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
9
Message-Id: <20210129161323.615027-1-vsementsov@virtuozzo.com>
10
Reviewed-by: John Snow <jsnow@redhat.com>
11
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12
---
13
tests/qemu-iotests/pylintrc | 2 ++
14
1 file changed, 2 insertions(+)
15
16
diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
17
index XXXXXXX..XXXXXXX 100644
18
--- a/tests/qemu-iotests/pylintrc
19
+++ b/tests/qemu-iotests/pylintrc
20
@@ -XXX,XX +XXX,XX @@ disable=invalid-name,
21
unsubscriptable-object,
22
# These are temporary, and should be removed:
23
missing-docstring,
24
+ too-many-return-statements,
25
+ too-many-statements
26
27
[FORMAT]
28
29
--
30
2.29.2
31
32
diff view generated by jsdifflib
New patch
1
If the qemu-system-{arch} binary for the host architecture can't be
2
found, the old 'check' implementation selected the alphabetically first
3
system emulator binary that it could find. The new Python implementation
4
just uses the first result of glob.iglob(), which has an undefined
5
order.
1
6
7
This is a problem that breaks CI because the iotests aren't actually
8
prepared to run on any emulator. They should be, so this is really a bug
9
in the failing test cases that should be fixed there, but as a quick
10
fix, let's revert to the old behaviour to let CI runs succeed again.
11
12
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
13
Message-Id: <20210202142802.119999-1-kwolf@redhat.com>
14
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
15
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
17
Reviewed-by: Eric Blake <eblake@redhat.com>
18
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
19
---
20
tests/qemu-iotests/testenv.py | 2 +-
21
1 file changed, 1 insertion(+), 1 deletion(-)
22
23
diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
24
index XXXXXXX..XXXXXXX 100644
25
--- a/tests/qemu-iotests/testenv.py
26
+++ b/tests/qemu-iotests/testenv.py
27
@@ -XXX,XX +XXX,XX @@ class TestEnv(ContextManager['TestEnv']):
28
if not os.path.exists(self.qemu_prog):
29
pattern = root('qemu-system-*')
30
try:
31
- progs = glob.iglob(pattern)
32
+ progs = sorted(glob.iglob(pattern))
33
self.qemu_prog = next(p for p in progs if isxfile(p))
34
except StopIteration:
35
sys.exit("Not found any Qemu executable binary by pattern "
36
--
37
2.29.2
38
39
diff view generated by jsdifflib
New patch
1
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
1
2
3
We should indicate failure by exit code, not only output.
4
5
Reported-by: Peter Maydell
6
Fixes: f203080bbd9f9e5b31041b1f2afcd6040c5aaec5
7
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
8
Message-Id: <20210201085041.3079-1-vsementsov@virtuozzo.com>
9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10
---
11
tests/qemu-iotests/testrunner.py | 4 +++-
12
tests/qemu-iotests/check | 5 ++++-
13
2 files changed, 7 insertions(+), 2 deletions(-)
14
15
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
16
index XXXXXXX..XXXXXXX 100644
17
--- a/tests/qemu-iotests/testrunner.py
18
+++ b/tests/qemu-iotests/testrunner.py
19
@@ -XXX,XX +XXX,XX @@ class TestRunner(ContextManager['TestRunner']):
20
21
return res
22
23
- def run_tests(self, tests: List[str]) -> None:
24
+ def run_tests(self, tests: List[str]) -> bool:
25
n_run = 0
26
failed = []
27
notrun = []
28
@@ -XXX,XX +XXX,XX @@ class TestRunner(ContextManager['TestRunner']):
29
if failed:
30
print('Failures:', ' '.join(failed))
31
print(f'Failed {len(failed)} of {n_run} iotests')
32
+ return False
33
else:
34
print(f'Passed all {n_run} iotests')
35
+ return True
36
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
37
index XXXXXXX..XXXXXXX 100755
38
--- a/tests/qemu-iotests/check
39
+++ b/tests/qemu-iotests/check
40
@@ -XXX,XX +XXX,XX @@ if __name__ == '__main__':
41
else:
42
with TestRunner(env, makecheck=args.makecheck,
43
color=args.color) as tr:
44
- tr.run_tests([os.path.join(env.source_iotests, t) for t in tests])
45
+ paths = [os.path.join(env.source_iotests, t) for t in tests]
46
+ ok = tr.run_tests(paths)
47
+ if not ok:
48
+ sys.exit(1)
49
--
50
2.29.2
51
52
diff view generated by jsdifflib
New patch
1
For -makecheck, the old 'check' implementation skipped the output when
2
starting a test. It only had the condensed output at the end of a test.
1
3
4
testrunner.py prints the normal output when starting a test even for
5
-makecheck. This output contains '\r' at the end so that it can be
6
overwritten with the result at the end of the test. However, for
7
-makecheck this is shorter output in a different format, so effectively
8
we end up with garbled output that mixes both output forms.
9
10
Revert to the old behaviour of only printing a message after the test
11
had completed in -makecheck mode.
12
13
Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
14
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
15
Message-Id: <20210201161024.127921-1-kwolf@redhat.com>
16
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
17
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
18
---
19
tests/qemu-iotests/testrunner.py | 6 ++++--
20
1 file changed, 4 insertions(+), 2 deletions(-)
21
22
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
23
index XXXXXXX..XXXXXXX 100644
24
--- a/tests/qemu-iotests/testrunner.py
25
+++ b/tests/qemu-iotests/testrunner.py
26
@@ -XXX,XX +XXX,XX @@ class TestRunner(ContextManager['TestRunner']):
27
last_el = self.last_elapsed.get(test)
28
start = datetime.datetime.now().strftime('%H:%M:%S')
29
30
- self.test_print_one_line(test=test, starttime=start, lasttime=last_el,
31
- end='\r', test_field_width=test_field_width)
32
+ if not self.makecheck:
33
+ self.test_print_one_line(test=test, starttime=start,
34
+ lasttime=last_el, end='\r',
35
+ test_field_width=test_field_width)
36
37
res = self.do_run_test(test)
38
39
--
40
2.29.2
41
42
diff view generated by jsdifflib
New patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
1
2
3
Commit 15b2260bef3 ("block/nvme: Trace controller capabilities")
4
misunderstood the doorbell stride value from the datasheet, use
5
the correct one. The 'doorbell_scale' variable used few lines
6
later is correct.
7
8
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
9
Message-Id: <20210127212137.3482291-2-philmd@redhat.com>
10
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
11
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12
---
13
block/nvme.c | 2 +-
14
1 file changed, 1 insertion(+), 1 deletion(-)
15
16
diff --git a/block/nvme.c b/block/nvme.c
17
index XXXXXXX..XXXXXXX 100644
18
--- a/block/nvme.c
19
+++ b/block/nvme.c
20
@@ -XXX,XX +XXX,XX @@ static int nvme_init(BlockDriverState *bs, const char *device, int namespace,
21
trace_nvme_controller_capability("Contiguous Queues Required",
22
NVME_CAP_CQR(cap));
23
trace_nvme_controller_capability("Doorbell Stride",
24
- 2 << (2 + NVME_CAP_DSTRD(cap)));
25
+ 1 << (2 + NVME_CAP_DSTRD(cap)));
26
trace_nvme_controller_capability("Subsystem Reset Supported",
27
NVME_CAP_NSSRS(cap));
28
trace_nvme_controller_capability("Memory Page Size Minimum",
29
--
30
2.29.2
31
32
diff view generated by jsdifflib
New patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
1
2
3
NVMe controllers implement different versions of the spec,
4
and different features of it. It is useful to gather this
5
information when debugging.
6
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8
Message-Id: <20210127212137.3482291-3-philmd@redhat.com>
9
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
10
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11
---
12
block/nvme.c | 6 ++++++
13
block/trace-events | 1 +
14
2 files changed, 7 insertions(+)
15
16
diff --git a/block/nvme.c b/block/nvme.c
17
index XXXXXXX..XXXXXXX 100644
18
--- a/block/nvme.c
19
+++ b/block/nvme.c
20
@@ -XXX,XX +XXX,XX @@ static int nvme_init(BlockDriverState *bs, const char *device, int namespace,
21
AioContext *aio_context = bdrv_get_aio_context(bs);
22
int ret;
23
uint64_t cap;
24
+ uint32_t ver;
25
uint64_t timeout_ms;
26
uint64_t deadline, now;
27
volatile NvmeBar *regs = NULL;
28
@@ -XXX,XX +XXX,XX @@ static int nvme_init(BlockDriverState *bs, const char *device, int namespace,
29
bs->bl.request_alignment = s->page_size;
30
timeout_ms = MIN(500 * NVME_CAP_TO(cap), 30000);
31
32
+ ver = le32_to_cpu(regs->vs);
33
+ trace_nvme_controller_spec_version(extract32(ver, 16, 16),
34
+ extract32(ver, 8, 8),
35
+ extract32(ver, 0, 8));
36
+
37
/* Reset device to get a clean state. */
38
regs->cc = cpu_to_le32(le32_to_cpu(regs->cc) & 0xFE);
39
/* Wait for CSTS.RDY = 0. */
40
diff --git a/block/trace-events b/block/trace-events
41
index XXXXXXX..XXXXXXX 100644
42
--- a/block/trace-events
43
+++ b/block/trace-events
44
@@ -XXX,XX +XXX,XX @@ qed_aio_write_main(void *s, void *acb, int ret, uint64_t offset, size_t len) "s
45
# nvme.c
46
nvme_controller_capability_raw(uint64_t value) "0x%08"PRIx64
47
nvme_controller_capability(const char *desc, uint64_t value) "%s: %"PRIu64
48
+nvme_controller_spec_version(uint32_t mjr, uint32_t mnr, uint32_t ter) "Specification supported: %u.%u.%u"
49
nvme_kick(void *s, unsigned q_index) "s %p q #%u"
50
nvme_dma_flush_queue_wait(void *s) "s %p"
51
nvme_error(int cmd_specific, int sq_head, int sqid, int cid, int status) "cmd_specific %d sq_head %d sqid %d cid %d status 0x%x"
52
--
53
2.29.2
54
55
diff view generated by jsdifflib
New patch
1
size_to_str() can return a size like "4.24 MiB", with a single digit
2
integer part and two fractional digits. This is eight characters, but
3
commit b39847a5 changed the format string to only reserve seven
4
characters for the column.
1
5
6
This can result in unaligned columns, which in turn changes the output of
7
iotests case 267 because exceeding the column size defeats the attempt
8
to filter the size out of the output (observed with the ppc64 emulator).
9
The resulting change is only a whitespace change, but since commit
10
f203080b this is enough for iotests to consider the test failed.
11
12
Taking a character away from the tag name column and adding it to the VM
13
size column doesn't change anything in the common case (the tag name is
14
left justified, the VM size is right justified), but fixes this case.
15
16
Fixes: b39847a50553b7679d6d7fefbe6a108a17aacf8d
17
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
18
Message-Id: <20210202155911.179865-1-kwolf@redhat.com>
19
Reviewed-by: Eric Blake <eblake@redhat.com>
20
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
21
---
22
block/qapi.c | 4 ++--
23
1 file changed, 2 insertions(+), 2 deletions(-)
24
25
diff --git a/block/qapi.c b/block/qapi.c
26
index XXXXXXX..XXXXXXX 100644
27
--- a/block/qapi.c
28
+++ b/block/qapi.c
29
@@ -XXX,XX +XXX,XX @@ void bdrv_snapshot_dump(QEMUSnapshotInfo *sn)
30
char *sizing = NULL;
31
32
if (!sn) {
33
- qemu_printf("%-10s%-18s%7s%20s%13s%11s",
34
+ qemu_printf("%-10s%-17s%8s%20s%13s%11s",
35
"ID", "TAG", "VM SIZE", "DATE", "VM CLOCK", "ICOUNT");
36
} else {
37
ti = sn->date_sec;
38
@@ -XXX,XX +XXX,XX @@ void bdrv_snapshot_dump(QEMUSnapshotInfo *sn)
39
snprintf(icount_buf, sizeof(icount_buf),
40
"%"PRId64, sn->icount);
41
}
42
- qemu_printf("%-9s %-17s %7s%20s%13s%11s",
43
+ qemu_printf("%-9s %-16s %8s%20s%13s%11s",
44
sn->id_str, sn->name,
45
sizing,
46
date_buf,
47
--
48
2.29.2
49
50
diff view generated by jsdifflib