Il ven 13 dic 2024, 17:06 Richard W.M. Jones <rjo...@redhat.com> ha scritto:
> On Fri, Dec 13, 2024 at 05:03:55PM +0100, Paolo Bonzini wrote: > > On 12/13/24 16:51, Richard W.M. Jones wrote: > > >The libnfs asynch API has changed type signature in this new version. > > >This change breaks qemu and it wasn't immediately obvious to me how to > > >fix it. In particular the new API requires a buffer to be passed, but > > >it's unclear what that would be. > > > > > >Old signature: > > > > > >EXTERN int nfs_pread_async(struct nfs_context *nfs, struct nfsfh *nfsfh, > > > uint64_t offset, uint64_t count, nfs_cb cb, > > > void *private_data); > > > > > >New signature: > > > > > >EXTERN int nfs_pread_async(struct nfs_context *nfs, struct nfsfh *nfsfh, > > > void *buf, size_t count, uint64_t offset, > > > nfs_cb cb, void *private_data); > > > > > >(Similar changes are made to pwrite_async) > > > > Looks like the buffer used to be allocated by libnfs and passed to > > nfs_co_generic_cb: > > > > static void > > nfs_co_generic_cb(int ret, struct nfs_context *nfs, void *data, > > void *private_data) > > > > Now it has to be allocated by the application. > > > > (upstream commit https://github.com/sahlberg/libnfs/commit/5e8f7ce273308 > ) > > > > >I guess this needs upstream qemu attention. > > > > And should it also block the libnfs update in Fedora, since QEMU is a > > critical package? > > The update is currently in a side tag Yeah, and I don't think it should be merged, unless libnfs support is dropped from the QEMU build in rawhide. Paolo See the start of this > thread here: > > > https://lists.fedoraproject.org/archives/list/de...@lists.fedoraproject.org/thread/LEEKOAGHD2WTSFJ5BT55F4MCDR2KZ7CF/ > > If there's a fix soon we can easily add it to Fedora. > > Another problem is how (or if) you want to make qemu compile with both > the old & new versions of libnfs. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > nbdkit - Flexible, fast NBD server with plugins > https://gitlab.com/nbdkit/nbdkit > >