diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-09-18 20:58:57 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2024-09-18 20:58:57 +0100 |
| commit | 5eff4231ced7b757b9e75c82ecd921b1fe9d5d3c (patch) | |
| tree | 2575e1d41a14eb8b899c79dccae87db549a13719 /migration/multifd-zstd.c | |
| parent | 55ccaed2d18774705238b1f44df08b5a67c3337a (diff) | |
| parent | 4ce56229087860805877075ddb29dd44578365a9 (diff) | |
| download | focaccia-qemu-5eff4231ced7b757b9e75c82ecd921b1fe9d5d3c.tar.gz focaccia-qemu-5eff4231ced7b757b9e75c82ecd921b1fe9d5d3c.zip | |
Merge tag 'migration-20240917-pull-request' of https://gitlab.com/peterx/qemu into staging
Migration pull request for 9.2 - Fabiano's patch to move two tests to slow tests. - Peter's patch to fix qatzip builds - Stefan's multifd-zstd fix on unsigned diff comparisons - Fea's bug fix to consistently use memattrs when map() address space - Fabiano's bug fix on multifd race condition against receivedmap # -----BEGIN PGP SIGNATURE----- # # iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZuscdRIccGV0ZXJ4QHJl # ZGhhdC5jb20ACgkQO1/MzfOr1wblcQD/amw/nw5LiL8/+QzJtjFTckouyHtCn++I # x5yVJndm4M4BAOD+b6Pd5byAX1bH7eZ85368ivKLGIZep6qEvICQmw0G # =wxVI # -----END PGP SIGNATURE----- # gpg: Signature made Wed 18 Sep 2024 19:31:17 BST # gpg: using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706 # gpg: issuer "peterx@redhat.com" # gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [marginal] # gpg: aka "Peter Xu <peterx@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D D1A9 3B5F CCCD F3AB D706 * tag 'migration-20240917-pull-request' of https://gitlab.com/peterx/qemu: migration/multifd: Fix rb->receivedmap cleanup race migration/savevm: Remove extra load cleanup calls softmmu/physmem.c: Keep transaction attribute in address_space_map() migration/multifd: Fix loop conditions in multifd_zstd_send_prepare and multifd_zstd_recv migration/multifd: Fix build for qatzip tests/qtest/migration: Move a couple of slow tests under g_test_slow Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/multifd-zstd.c')
| -rw-r--r-- | migration/multifd-zstd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c index 53da33e048..abed140855 100644 --- a/migration/multifd-zstd.c +++ b/migration/multifd-zstd.c @@ -123,9 +123,9 @@ static int multifd_zstd_send_prepare(MultiFDSendParams *p, Error **errp) */ do { ret = ZSTD_compressStream2(z->zcs, &z->out, &z->in, flush); - } while (ret > 0 && (z->in.size - z->in.pos > 0) - && (z->out.size - z->out.pos > 0)); - if (ret > 0 && (z->in.size - z->in.pos > 0)) { + } while (ret > 0 && (z->in.size > z->in.pos) + && (z->out.size > z->out.pos)); + if (ret > 0 && (z->in.size > z->in.pos)) { error_setg(errp, "multifd %u: compressStream buffer too small", p->id); return -1; @@ -243,7 +243,7 @@ static int multifd_zstd_recv(MultiFDRecvParams *p, Error **errp) */ do { ret = ZSTD_decompressStream(z->zds, &z->out, &z->in); - } while (ret > 0 && (z->in.size - z->in.pos > 0) + } while (ret > 0 && (z->in.size > z->in.pos) && (z->out.pos < page_size)); if (ret > 0 && (z->out.pos < page_size)) { error_setg(errp, "multifd %u: decompressStream buffer too small", |