Richard W.M. Jones
2019-Mar-29 08:52 UTC
Re: [Libguestfs] [PATCH nbdkit v5 FINAL 00/19] Implement extents.
On Thu, Mar 28, 2019 at 09:15:17PM -0500, Eric Blake wrote:> On 3/28/19 11:18 AM, Richard W.M. Jones wrote: > > This has already been pushed upstream. I am simply posting these here > > so we have a reference in the mailing list in case we find bugs later > > (as I'm sure we will - it's a complex patch series). > > > > Great thanks to Eric Blake for tireless review on this one. It also > > seems to have identified a few minor bugs in qemu along the way. > > > > Should nbdkit-rate-filter.pod mention that extents is considered > effectively free (same as zeroing and trimming)?I guess it's covered by the existing docs. Extents aren't quite as "free" as zeroing and trimming but the structured reply message is still quite small.> I know that I want the nbd plugin to do extents passthrough, but I have > some work to do to teach it do to NBD_OPT_GO/structured replies first. > > The full and null plugins should probably have a trivial .extents that > reports completely sparse, all of the time :)I think it would be wrong for full wouldn't it? It could mean that the client would skip the read, thus not getting the intended ENOSPC error. For null I agree.> Various plugins like partitioning and linuxdisk might be interesting to > support extents on (particularly since we know we pad in between files); > but it may be trickier to write. > > Can curl or ssh access extents information?Not sure about curl, but I checked ssh (sftp) and it cannot. However at some point I intend to submit an extension to the sftp protocol (similar to my "fsync@openssh.com" extension) to support it. We will need it for efficient ssh access in virt-v2v one day.> Language bindings will also be an interesting exercise ;)Yes, the language bindings lag behind what's available because they aren't generated ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Eric Blake
2019-Mar-29 12:13 UTC
Re: [Libguestfs] [PATCH nbdkit v5 FINAL 00/19] Implement extents.
On 3/29/19 3:52 AM, Richard W.M. Jones wrote:>> The full and null plugins should probably have a trivial .extents that >> reports completely sparse, all of the time :) > > I think it would be wrong for full wouldn't it? It could mean that > the client would skip the read, thus not getting the intended ENOSPC > error. For null I agree. >The full plugin always reads as 0 successfully. It is only writes that differ (successfully ignored vs ENOSPC) between the two plugins.>> Language bindings will also be an interesting exercise ;) > > Yes, the language bindings lag behind what's available because they > aren't generated ...I still need to revive my patches for adding fua support to python bindings... -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Richard W.M. Jones
2019-Mar-29 12:30 UTC
Re: [Libguestfs] [PATCH nbdkit v5 FINAL 00/19] Implement extents.
On Fri, Mar 29, 2019 at 07:13:18AM -0500, Eric Blake wrote:> On 3/29/19 3:52 AM, Richard W.M. Jones wrote: > > >> The full and null plugins should probably have a trivial .extents that > >> reports completely sparse, all of the time :) > > > > I think it would be wrong for full wouldn't it? It could mean that > > the client would skip the read, thus not getting the intended ENOSPC > > error. For null I agree. > > > > The full plugin always reads as 0 successfully. It is only writes that > differ (successfully ignored vs ENOSPC) between the two plugins.Ah yes, my mistake. In that case yes we can return extents. I'll add the simple patch. I already did this for the null plugin: https://github.com/libguestfs/nbdkit/commit/8b5adddbf06a6ba785e7d0409910281922cbea42 So the full plugin would be the same. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Seemingly Similar Threads
- Re: [PATCH nbdkit v5 FINAL 00/19] Implement extents.
- Re: [PATCH nbdkit v5 FINAL 00/19] Implement extents.
- Re: [PATCH nbdkit v5 FINAL 10/19] offset: Implement mapping of extents.
- Re: [PATCH nbdkit v5 FINAL 12/19] truncate: Implement extents for beyond end of truncated region.
- [PATCH nbdkit v5 FINAL 15/19] file: Implement extents.