all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 qemu 4/4] {alloc track, pbs} block driver: bdrv_co_preadv: adapt return values
Date: Fri, 14 Oct 2022 14:07:16 +0200	[thread overview]
Message-ID: <20221014120716.111804-4-f.ebner@proxmox.com> (raw)
In-Reply-To: <20221014120716.111804-1-f.ebner@proxmox.com>

to be in-line with what other implementations in QEMU do. Commit
1d39c7098bbfa6862cb96066c4f8f6735ea397c5 mentions the EIO bit and
the function is expected to return 0 upon success (see other
implementations).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 ...PBS-block-driver-to-map-backup-archives-into.patch | 11 ++++++-----
 ...k-pbs-fast-path-reads-without-allocation-if-.patch |  2 +-
 .../pve/0048-block-add-alloc-track-driver.patch       |  9 +++++----
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/debian/patches/pve/0033-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch b/debian/patches/pve/0033-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
index 9a850c0..86e85d2 100644
--- a/debian/patches/pve/0033-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
+++ b/debian/patches/pve/0033-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
@@ -7,8 +7,9 @@ Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
 [error cleanups, file_open implementation]
 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
-[adapt to changed function signatures]
-Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
+[FE: adapt to changed function signatures
+     make pbs_co_preadv return values consistent with QEMU]
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
 ---
  block/meson.build    |   3 +
  block/pbs.c          | 276 +++++++++++++++++++++++++++++++++++++++++++
@@ -34,7 +35,7 @@ index 2783b77e9c..a26a69434e 100644
  
 diff --git a/block/pbs.c b/block/pbs.c
 new file mode 100644
-index 0000000000..0b05ea9080
+index 0000000000..9d1f1f39d4
 --- /dev/null
 +++ b/block/pbs.c
 @@ -0,0 +1,276 @@
@@ -244,7 +245,7 @@ index 0000000000..0b05ea9080
 +
 +    if (offset < 0 || bytes < 0) {
 +        fprintf(stderr, "unexpected negative 'offset' or 'bytes' value!\n");
-+        return -EINVAL;
++        return -EIO;
 +    }
 +
 +    ReadCallbackData rcb = {
@@ -266,7 +267,7 @@ index 0000000000..0b05ea9080
 +    qemu_iovec_from_buf(qiov, 0, buf, bytes);
 +    free(buf);
 +
-+    return ret;
++    return 0;
 +}
 +
 +static coroutine_fn int pbs_co_pwritev(BlockDriverState *bs,
diff --git a/debian/patches/pve/0045-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch b/debian/patches/pve/0045-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch
index 893104a..48e6d67 100644
--- a/debian/patches/pve/0045-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch
+++ b/debian/patches/pve/0045-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch
@@ -49,5 +49,5 @@ index 0b05ea9080..c5eb4d5bad 100644
 +        g_free(buf);
 +    }
  
-     return ret;
+     return 0;
  }
diff --git a/debian/patches/pve/0048-block-add-alloc-track-driver.patch b/debian/patches/pve/0048-block-add-alloc-track-driver.patch
index 45c1c4d..d47c84b 100644
--- a/debian/patches/pve/0048-block-add-alloc-track-driver.patch
+++ b/debian/patches/pve/0048-block-add-alloc-track-driver.patch
@@ -24,8 +24,9 @@ once the backing image is removed. It will be replaced by 'file'.
 
 Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
-[adapt to changed function signatures]
-Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
+[FE: adapt to changed function signatures
+     make error return value consistent with QEMU]
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
 ---
  block/alloc-track.c | 350 ++++++++++++++++++++++++++++++++++++++++++++
  block/meson.build   |   1 +
@@ -34,7 +35,7 @@ Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
 
 diff --git a/block/alloc-track.c b/block/alloc-track.c
 new file mode 100644
-index 0000000000..6b50fbe537
+index 0000000000..43d40d11af
 --- /dev/null
 +++ b/block/alloc-track.c
 @@ -0,0 +1,350 @@
@@ -181,7 +182,7 @@ index 0000000000..6b50fbe537
 +
 +    if (offset < 0 || bytes < 0) {
 +        fprintf(stderr, "unexpected negative 'offset' or 'bytes' value!\n");
-+        return -EINVAL;
++        return -EIO;
 +    }
 +
 +    /* a read request can span multiple granularity-sized chunks, and can thus
-- 
2.30.2





  parent reply	other threads:[~2022-10-14 12:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 12:07 [pve-devel] [PATCH v2 qemu 1/4] update submodule and patches to 7.1.0 Fiona Ebner
2022-10-14 12:07 ` [pve-devel] [PATCH v2 qemu 2/4] cherry-pick upstream fixes for 7.1.0 Fiona Ebner
2022-10-14 12:07 ` [pve-devel] [PATCH v2 qemu 3/4] savevm async: cleaner initialization of target_close_wait member Fiona Ebner
2022-10-14 12:07 ` Fiona Ebner [this message]
2022-10-14 13:41 ` [pve-devel] applied-series: [PATCH v2 qemu 1/4] update submodule and patches to 7.1.0 Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221014120716.111804-4-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal