Bug 2182208

Summary: Support 64-bit block status and bulk zero over NBD in qemu
Product: Red Hat Enterprise Linux 9 Reporter: Eric Blake <eblake>
Component: qemu-kvmAssignee: Eric Blake <eblake>
qemu-kvm sub component: NBD QA Contact: aihua liang <aliang>
Status: ASSIGNED --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: eblake, jinzhao, juzhang, kwolf, virt-maint, xuwei, zhguo
Version: 9.2Keywords: RFE, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Blake 2023-03-27 22:12:07 UTC
Description of problem:
Upstream NBD is considering an extension to add 64-bit commands. While read and write will still be bounded at qemu's 32M limit for payload size, other commands without large payloads (block status, trim, and write-zero) benefit from being able to request an action over more than just 32 bits of length from a given 64-bit offset.  Supporting 64-bit lengths in the NBD protocol requires opt-in from both client and server, both of which are utilized in qemu.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Create a 5G image, serve it over qemu-nbd (or qemu-storage-daemon), then use qemu-io to query block status or perform a 'write -z' to the entire image. Watching --trace=nbd_* output can show whether the requests had to be broken up at 32-bit boundaries or done in one go.
2.
3.

Actual results:


Expected results:


Additional info:
See also https://lists.debian.org/nbd/2022/11/msg00008.html

Comment 3 Eric Blake 2023-04-24 20:38:44 UTC
Upstream spec changes have landed; next step is another round of qemu patches implementing that spec: https://github.com/NetworkBlockDevice/nbd/blob/extension-ext-header/doc/proto.md

Comment 4 Eric Blake 2023-04-24 21:10:41 UTC
See also bug 2189341 for libnbd