[PATCH v3 0/3] block/curl: fix S3 presigned URL support

Antoine Damhet posted 3 patches 2 days, 18 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260227-fix-curl-v3-v3-0-eb8a4d88feef@scaleway.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
block/curl.c                          | 115 +++++++++++++++++++++-------------
block/trace-events                    |   1 +
docs/system/device-url-syntax.rst.inc |   6 ++
qapi/block-core.json                  |  21 +++----
4 files changed, 89 insertions(+), 54 deletions(-)
[PATCH v3 0/3] block/curl: fix S3 presigned URL support
Posted by Antoine Damhet 2 days, 18 hours ago
Hi,

This series adds the support for S3 presigned URLs that only allow HTTP
GET requests. While working on this I also stumbled upon a deadlock with
concurrent I/O and slipped the fix here. Over the years there was
already an attempt to support these kinds of URLs[1] and at least one
report of a user in need of the feature[2].

Unfortunately S3 only allows a presigned URL to live up to 7 days so we
can't really put an example with a stable URL on the commit message but
here is a presigned URL for the archlinux cloud image[3] that will
expire in ~7 days.

[1]: https://lore.kernel.org/qemu-devel/110120539.4133.de5ac8a5-69d1-4f59-9540-4a679771a547.open-xchange@ox.pcextreme.nl/
[2]: https://lore.kernel.org/qemu-devel/7b37cc65-1314-29f4-006f-70836bdfb4b4@linaro.org/
[3]: https://test-presigned.s3.fr-par.scw.cloud/Arch-Linux-x86_64-cloudimg.qcow2?AWSAccessKeyId=SCWDHE3XBQGZFV282QKG&Expires=1772798381&Signature=zUxbVAWQ9Tl%2B%2Bf1jUW6q3o3His4%3D

---
Changes in v3:
- Used b4 to handle the series (I hope I didn't do something weird)
- sync 'force-range' description between QAPI and man page
- Remove redundant 'Defaults to false.' in QAPI doc
- Regen presigned URL[3]
- Link to v2: https://lore.kernel.org/qemu-devel/20260224155314.1658988-1-adamhet@scaleway.com
Changes in v2:
- New patch (2) that refactors the http(s) QAPI types
- Specify and reword what happens when using 'force-range' with an HTTP
  server that doesn't support the feature
- Document that 'force-range' defaults to false in QAPI
- Fix a few typos
- Regen presigned URL[3]
- Link to v1: https://lore.kernel.org/qemu-devel/20260212162730.440855-1-adamhet@scaleway.com

---
Antoine Damhet (3):
      block/curl: fix concurrent completion handling
      qapi: block: Refactor HTTP(s) common arguments
      block/curl: add support for S3 presigned URLs

 block/curl.c                          | 115 +++++++++++++++++++++-------------
 block/trace-events                    |   1 +
 docs/system/device-url-syntax.rst.inc |   6 ++
 qapi/block-core.json                  |  21 +++----
 4 files changed, 89 insertions(+), 54 deletions(-)
---
base-commit: d8a9d97317d03190b34498741f98f22e2a9afe3e
change-id: 20260227-fix-curl-v3-ade42a45f60b

Best regards,
--  
Antoine 'xdbob' Damhet
Engineer @scaleway