[Libguestfs] [nbdkit PATCH] RFC: blocksize: Add test for sharding behavior

2022-05-25 Thread Eric Blake
Demonstrate the bug where an aligned write can be lost if it races between the read and write of a RMW unaligned write. --- Sending this out for review of the test; it fails (which it is supposed to as long as I don't fix the blocksize filter), but I hope it starts passing once I also patch the

[Libguestfs] [libnbd PATCH] python: Accept buffers in nbd.Buffer.from_bytearray()

2022-05-25 Thread Eric Blake
Prior to this patch, the following fails, but at least seems to give a sensible error: $ nbdsh -c 'nbd.Buffer.from_bytearray(b"1"*8)' Traceback (most recent call last): File "/usr/lib64/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File

Re: [Libguestfs] nbdkit blocksize filter, read-modify-write, and concurrency

2022-05-25 Thread Nikolaus Rath
On May 25 2022, Eric Blake wrote: > On Tue, May 24, 2022 at 08:45:02PM +0100, Nikolaus Rath wrote: >> > However, you are worried that a third possibility occurs: >> > >> > T2 sees that it needs to do RMW, grabs the lock, and reads 0x00-0x0f >> > for the unaligned head (it only needs 0x00-0x03,

Re: [Libguestfs] [PATCH] always 'max' for the appliance CPU model on all targes except ppc

2022-05-25 Thread Peter Maydell
On Wed, 25 May 2022 at 18:34, Richard W.M. Jones wrote: > > On Wed, May 25, 2022 at 05:13:53PM +0100, Peter Maydell wrote: > > On Wed, 25 May 2022 at 16:07, Laszlo Ersek wrote: > > > > > > + Drew & Peter > > > > > > On 05/25/22 15:30, Daniel P. Berrangé wrote: > > > - The patch seems to do what

Re: [Libguestfs] nbdkit blocksize filter, read-modify-write, and concurrency

2022-05-25 Thread Eric Blake
On Tue, May 24, 2022 at 08:45:02PM +0100, Nikolaus Rath wrote: > > However, you are worried that a third possibility occurs: > > > > T2 sees that it needs to do RMW, grabs the lock, and reads 0x00-0x0f > > for the unaligned head (it only needs 0x00-0x03, but we have to read a > > block at a time),

Re: [Libguestfs] [PATCH] always 'max' for the appliance CPU model on all targes except ppc

2022-05-25 Thread Richard W.M. Jones
On Wed, May 25, 2022 at 05:13:53PM +0100, Peter Maydell wrote: > On Wed, 25 May 2022 at 16:07, Laszlo Ersek wrote: > > > > + Drew & Peter > > > > On 05/25/22 15:30, Daniel P. Berrangé wrote: > > - The patch seems to do what it says in the commit message. > > > > - QEMU commit bab52d4bba3f

Re: [Libguestfs] [PATCH] always 'max' for the appliance CPU model on all targes except ppc

2022-05-25 Thread Peter Maydell
On Wed, 25 May 2022 at 16:07, Laszlo Ersek wrote: > > + Drew & Peter > > On 05/25/22 15:30, Daniel P. Berrangé wrote: > - The patch seems to do what it says in the commit message. > > - QEMU commit bab52d4bba3f ("target/arm: Add "-cpu max" support", > 2018-03-09) confirms what the commit

[Libguestfs] [PATCH libguestfs] daemon: rpm: Check return values from librpm calls

2022-05-25 Thread Richard W.M. Jones
We previously didn't bother to check the return values from any librpm calls. In some cases where possibly the RPM database is faulty, this caused us to return a zero-length list of installed applications (but no error indication). One way to reproduce this is given below. Note this reproducer

[Libguestfs] [PATCH virt-v2v] convert: If listing RPM applications fails, rebuild DB and retry

2022-05-25 Thread Richard W.M. Jones
In libguestfs we didn't bother to check the return values from any librpm calls. In some cases where possibly the RPM database is faulty, this caused us to return a zero-length list of installed applications (but no error indication). Libguestfs has subsequently been fixed so now it returns an

Re: [Libguestfs] [PATCH] always 'max' for the appliance CPU model on all targes except ppc

2022-05-25 Thread Laszlo Ersek
+ Drew & Peter On 05/25/22 15:30, Daniel P. Berrangé wrote: > The current logic for selecting CPU model to use with the appliance > selects 'max' for all architectures except for ppc64le and aarch64. > > On aarch64, it selects 'host' if KVM is available which is identical > to 'max'. For TCG it

[Libguestfs] [PATCH] always 'max' for the appliance CPU model on all targes except ppc

2022-05-25 Thread Daniel P . Berrangé
The current logic for selecting CPU model to use with the appliance selects 'max' for all architectures except for ppc64le and aarch64. On aarch64, it selects 'host' if KVM is available which is identical to 'max'. For TCG it selects 'cortex-a57'. The 'max' model is a superset of 'cortex-a57', so

Re: [Libguestfs] [libguestfs-common PATCH] mlcustomize: refresh generated files

2022-05-25 Thread Laszlo Ersek
On 05/25/22 11:36, Richard W.M. Jones wrote: > > I have tested both patches this time with the three affected tools > (virt-builder, virt-customize & virt-sysprep) and the --selinux-relabel > option is now present and ignored. > > For the series: > Reviewed-by: Richard W.M. Jones > > Thanks

Re: [Libguestfs] [PATCH nbdkit v2 4/5] docs: Fix POD verbatim paragraphs

2022-05-25 Thread Richard W.M. Jones
I've updated the HTML man pages on the website: https://libguestfs.org/nbdkit.1.html Note the synopsis section of that first page is wrong, but I kind of knew that already. That particular section is generated by the podwrapper --verbatim option, unlike all the others. Rich. -- Richard

Re: [Libguestfs] [libguestfs-common PATCH] mlcustomize: refresh generated files

2022-05-25 Thread Richard W.M. Jones
I have tested both patches this time with the three affected tools (virt-builder, virt-customize & virt-sysprep) and the --selinux-relabel option is now present and ignored. For the series: Reviewed-by: Richard W.M. Jones Thanks for fixing this, I'll get it into C9S soon. Rich. -- Richard

Re: [Libguestfs] [PATCH nbdkit v2 4/5] docs: Fix POD verbatim paragraphs

2022-05-25 Thread Richard W.M. Jones
Thanks - the series was pushed in: b2612d2c..43b341b0 master -> master Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs,

[Libguestfs] [libguestfs-common PATCH] mlcustomize: refresh generated files

2022-05-25 Thread Laszlo Ersek
Refresh the generated mlcustomize files after libguestfs patch 'generator/customize: reintroduce "--selinux-relabel" as a compat option'. Fixes: 3420d5f14f6d0a713a40d1c2ac56677eba3c5ac8 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2089748 Signed-off-by: Laszlo Ersek ---

[Libguestfs] [libguestfs PATCH] generator/customize: reintroduce "--selinux-relabel" as a compat option

2022-05-25 Thread Laszlo Ersek
Removing "--selinux-relabel" in commit 2f6a27f1077d ("generator/customize: invert SELinux relabeling default", 2022-05-11) breaks existing scripts that invoke virt-customize and/or virt-sysprep with that option. Restore the option, with no functionality tied to it. Fixes:

Re: [Libguestfs] SELinux relabeling: do it by default

2022-05-25 Thread Laszlo Ersek
On 05/25/22 07:24, Laszlo Ersek wrote: > On 05/24/22 15:59, Laszlo Ersek wrote: >> On 05/24/22 12:04, Richard W.M. Jones wrote: >>> So I didn't realise that these commits break --selinux-relabel, eg: >>> >>> $ rpm -q guestfs-tools >>> guestfs-tools-1.49.1-1.fc37.x86_64 >>> $ virt-builder fedora-36