Re: [Qemu-devel] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Nir Soffer
On Wed, Jun 8, 2016 at 12:32 PM, Kevin Wolf wrote: > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >> Currently, we are trying to move the backing BDS from the source to the >> target in bdrv_replace_in_backing_chain() which is called from >> mirror_exit(). However, mirror_complete() already t

Re: [Qemu-devel] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-09 Thread Nir Soffer
On Thu, Jun 9, 2016 at 11:58 AM, Kevin Wolf wrote: > Am 08.06.2016 um 17:39 hat Nir Soffer geschrieben: >> On Wed, Jun 8, 2016 at 12:32 PM, Kevin Wolf wrote: >> > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >> >> Currently, we are trying to move the back

Re: [PATCH 1/3] qemu-img: Add checksum command

2022-11-28 Thread Nir Soffer
On Mon, Nov 7, 2022 at 12:20 PM Hanna Reitz wrote: > On 30.10.22 18:37, Nir Soffer wrote: > > On Wed, Oct 26, 2022 at 4:00 PM Hanna Reitz wrote: > > > > On 01.09.22 16:32, Nir Soffer wrote: > [...] > > > --- > > > docs/tools/qemu-i

Re: [PATCH 2/3] iotests: Test qemu-img checksum

2022-11-28 Thread Nir Soffer
On Mon, Nov 7, 2022 at 1:41 PM Hanna Reitz wrote: > On 30.10.22 18:38, Nir Soffer wrote: > > On Wed, Oct 26, 2022 at 4:31 PM Hanna Reitz wrote: > > > > On 01.09.22 16:32, Nir Soffer wrote: > > > Add simple tests creating an image with all kinds

[PATCH v2 1/5] qemu-img.c: Move IO_BUF_SIZE to the top of the file

2022-11-28 Thread Nir Soffer
This macro is used by various commands (compare, convert, rebase) but it is defined somewhere in the middle of the file. I'm going to use it in the new checksum command so lets clean up a bit before that. --- qemu-img.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu-img

[PATCH v2 2/5] Support format or cache specific out file

2022-11-28 Thread Nir Soffer
Extend the test finder to find tests with format (*.out.qcow2) or cache specific (*.out.nocache) out file. This worked before only for the numbered tests. --- tests/qemu-iotests/findtests.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/findtests

[PATCH v2 4/5] iotests: Test qemu-img checksum

2022-11-28 Thread Nir Soffer
help debugging in case of failures, the output includes a json map of the test image. Signed-off-by: Nir Soffer --- tests/qemu-iotests/tests/qemu-img-checksum| 63 +++ .../tests/qemu-img-checksum.out.qcow2 | 11 .../tests/qemu-img-checksum.out.raw | 10 +

[PATCH v2 0/5] Add qemu-img checksum command using blkhash

2022-11-28 Thread Nir Soffer
tml - https://lists.nongnu.org/archive/html/qemu-block/2022-11/msg00171.html - https://lists.nongnu.org/archive/html/qemu-block/2022-11/msg00173.html Nir Soffer (5): qemu-img.c: Move IO_BUF_SIZE to the top of the file Support format or cache specific out file qemu-img: Add checksum command iote

[PATCH v2 5/5] qemu-img: Speed up checksum

2022-11-28 Thread Nir Soffer
5s ±0.183s | 1.808s ±0.016s | x1.36 | | nbd | 6g | direct| 3.540s ±0.020s | 1.749s ±0.018s | x2.02 | [1] raw image full of zeroes [2] raw fedora 35 image with additional random data, 50% full [3] image [2] exported by qemu-nbd via unix socket Signed-off-by: Nir Soffer --- qemu-i

[PATCH v2 3/5] qemu-img: Add checksum command

2022-11-28 Thread Nir Soffer
blkhash/ [3] Computing checksum for 8T empty image: qemu-img checksum: 3.7s, sha256sum (estimate): 17,749s Signed-off-by: Nir Soffer --- docs/tools/qemu-img.rst | 24 ++ meson.build | 10 ++- meson_options.txt | 2 + qemu-img-cmds.hx| 8 ++ qemu-img.c

Re: [Qemu-devel] Failing QEMU iotest 175

2019-05-03 Thread Nir Soffer
On Fri, May 3, 2019, 23:21 Eric Blake wrote: > On 5/2/19 11:37 PM, Thomas Huth wrote: > > On 02/05/2019 23.56, Eric Blake wrote: > >> On 4/28/19 10:18 AM, Thomas Huth wrote: > >>> QEMU iotest 175 is failing for me when I run it with -raw: > >>> > >> > >>> == creating image with default prealloca

Re: [Qemu-devel] [Qemu-block] Failing QEMU iotest 175

2019-05-10 Thread Nir Soffer
On Sat, May 4, 2019 at 12:32 AM Nir Soffer wrote: > > > On Fri, May 3, 2019, 23:21 Eric Blake wrote: > >> ... >> >>> == creating image with preallocation off == >> >>> Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 >&g

Re: [Qemu-devel] [PATCH] iotests: Filter 175's allocation information

2019-05-10 Thread Nir Soffer
On Sat, May 11, 2019 at 12:19 AM Max Reitz wrote: > It is possible for an empty file to take up blocks on a filesystem. > Make iotest 175 take this into account. > > Reported-by: Thomas Huth > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/175 | 15 +++ > tests/qemu-iotest

Re: [Qemu-devel] [PATCH v2] iotests: Filter 175's allocation information

2019-05-13 Thread Nir Soffer
nothing allocated > > == creating image with preallocation off == > Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 preallocation=off > -size=1048576, blocks=0 > +size=1048576, nothing allocated > > == creating image with preallocation full == > Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 preallocation=full > -size=1048576, blocks=2048 > +size=1048576, everything allocated > > == creating image with preallocation falloc == > Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 > preallocation=falloc > -size=1048576, blocks=2048 > +size=1048576, everything allocated > *** done > -- > 2.21.0 Reviewed-by: Nir Soffer >

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img convert: Deprecate using -n and -o together

2019-08-09 Thread Nir Soffer
On Fri, Aug 9, 2019 at 12:11 PM Kevin Wolf wrote: > bdrv_create options specified with -o have no effect when skipping image > creation with -n, so this doesn't make sense. Warn against the misuse > and deprecate the combination so we can make it a hard error later. > > Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH v2] block: posix: Handle undetectable alignment

2019-08-11 Thread Nir Soffer
of 512. This may cause unneeded data copying, but so far I see better performance with this change. [1] https://bugzilla.redhat.com/1737256 [2] https://bugzilla.redhat.com/1738657 Signed-off-by: Nir Soffer --- v1 was a minimal hack; this version is a more generic fix that works for any

Re: [Qemu-devel] [PATCH v2] block: posix: Handle undetectable alignment

2019-08-13 Thread Nir Soffer
On Mon, Aug 12, 2019 at 5:23 PM Kevin Wolf wrote: > Am 11.08.2019 um 22:50 hat Nir Soffer geschrieben: > > In some cases buf_align or request_alignment cannot be detected: > > > > - With Gluster, buf_align cannot be detected since the actual I/O is > > done on Glus

Re: [Qemu-devel] [PATCH v2] block: posix: Handle undetectable alignment

2019-08-13 Thread Nir Soffer
On Tue, Aug 13, 2019 at 2:21 PM Kevin Wolf wrote: > Am 13.08.2019 um 12:45 hat Nir Soffer geschrieben: > > On Mon, Aug 12, 2019 at 5:23 PM Kevin Wolf wrote: > > > > > Am 11.08.2019 um 22:50 hat Nir Soffer geschrieben: > > > > In some cases buf_align or

[Qemu-devel] [PATCH v3] block: posix: Handle undetectable alignment

2019-08-13 Thread Nir Soffer
pying disks on local XFS and Gluster with 4k bytes sector size work now, resolving bugs [1],[2]. I tested also on XFS, NFS, Gluster with 512 bytes sector size. [1] https://bugzilla.redhat.com/1737256 [2] https://bugzilla.redhat.com/1738657 Signed-off-by: Nir Soffer --- Changes since v2 - Improv

[Qemu-devel] [PATCH] block: posix: Always allocate the first block

2019-08-16 Thread Nir Soffer
e is a table comparing the total time spent: TypeBefore(s) After(s)Diff(%) --- real 530.028469.123 -11.4 user 17.204 10.768 -37.4 sys17.881 7.011 -60.7 Here we see very clear improvement in CPU usage.

Re: [Qemu-devel] [Qemu-block] [PATCH] block: posix: Always allocate the first block

2019-08-16 Thread Nir Soffer
On Sat, Aug 17, 2019 at 12:57 AM John Snow wrote: > On 8/16/19 5:21 PM, Nir Soffer wrote: > > When creating an image with preallocation "off" or "falloc", the first > > block of the image is typically not allocated. When using Gluster > > storage bac

Re: [Qemu-devel] [PULL 5/7] file-posix: Support BDRV_REQ_NO_FALLBACK for zero writes

2019-08-17 Thread Nir Soffer
On Thu, Aug 15, 2019 at 1:29 PM Kevin Wolf wrote: > Am 15.08.2019 um 04:44 hat Eric Blake geschrieben: > > On 3/26/19 10:51 AM, Kevin Wolf wrote: > > > We know that the kernel implements a slow fallback code path for > > > BLKZEROOUT, so if BDRV_REQ_NO_FALLBACK is given, we shouldn't call it. > >

[Qemu-devel] [PATCH] block: Use QEMU_IS_ALIGNED instead of reinventing it

2019-08-17 Thread Nir Soffer
t is used only in assert() except one instance, so it should not matter. Signed-off-by: Nir Soffer --- block/bochs.c | 4 ++-- block/cloop.c | 4 ++-- block/dmg.c | 4 ++-- block/io.c| 8 block/qcow2.c | 4 ++-- block/vvfat.c | 8 qemu-img.c| 2 +- 7 files changed

[Qemu-devel] [PATCH] block: gluster: Probe alignment limits

2019-08-17 Thread Nir Soffer
value (4096) even when using storage with sector size of 512 bytes. Signed-off-by: Nir Soffer --- block/gluster.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/block/gluster.c b/block/gluster.c index f64dc5b01e..d936240b72 100644 --- a/block

Re: [Qemu-devel] [PATCH] block: gluster: Probe alignment limits

2019-08-17 Thread Nir Soffer
On Sun, Aug 18, 2019 at 12:21 AM Nir Soffer wrote: > Implement alignment probing similar to file-posix, by reading from the > first 4k of the image. > > Before this change, provisioning a VM on storage with sector size of > 4096 bytes would fail when the installer try to create fi

Re: [Qemu-devel] [Qemu-block] [PATCH] nbd: Advertise multi-conn for shared read-only connections

2019-08-17 Thread Nir Soffer
On Sat, Aug 17, 2019 at 5:30 PM Eric Blake wrote: > On 8/16/19 5:47 AM, Vladimir Sementsov-Ogievskiy wrote: > > >>> +++ b/blockdev-nbd.c > >>> @@ -189,7 +189,7 @@ void qmp_nbd_server_add(const char *device, bool > has_name, const char *name, > >>> } > >>> > >>> exp = nbd_export_new(bs

[Qemu-devel] [PATCH] block: file-posix: Fix alignment probing on glsuter

2019-08-06 Thread Nir Soffer
://bugzilla.redhat.com/1737256. To make this work, the management system must ensure that the first block of the image is allocated, for example: qemu-img create -f raw test.img 1g dd if=/dev/zero bs=4096 count=1 of=test.img conv=nortunc Signed-off-by: Nir Soffer --- block/file-posix.c | 2

[PATCH] libvhost-user: Fix update of signalled_used

2023-05-09 Thread Nir Soffer
d-off-by: Nir Soffer --- subprojects/libvhost-user/libvhost-user.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 8fb61e2df2..5f26d2d378 100644 --- a/sub

Re: [PATCH 3/4] qemu-img: add --shallow option for qemu-img compare --stat

2021-09-29 Thread Nir Soffer
On Wed, Sep 29, 2021 at 4:37 PM Vladimir Sementsov-Ogievskiy wrote: > > Allow compare only top images of backing chains. That's useful for > comparing two increments from the same chain of incremental backups. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > docs/tools/qemu-img.rst | 8 +

Re: [PATCH 3/4] qemu-img: add --shallow option for qemu-img compare --stat

2021-09-29 Thread Nir Soffer
On Wed, Sep 29, 2021 at 7:28 PM Vladimir Sementsov-Ogievskiy wrote: > > 29.09.2021 19:00, Nir Soffer wrote: > > On Wed, Sep 29, 2021 at 4:37 PM Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> Allow compare only top images of backing chains. That's usef

Re: [PATCH 2/2] iotests/block-status-cache: New test

2022-01-17 Thread Nir Soffer
nd after querying > ' + > + 'qemu:allocation-depth') > +print('Before:') > + print(map_pre) > +print('After:') > +print(map_post) > + > +self.fail("Map information differs") > + > + > +if __name__ == '__main__': > +# The block-status cache only works on the protocol layer, so to test it, > +# we can only use the raw format > +iotests.main(supported_fmts=['raw'], > + supported_protocols=['file']) > diff --git a/tests/qemu-iotests/tests/block-status-cache.out > b/tests/qemu-iotests/tests/block-status-cache.out > new file mode 100644 > index 00..ae1213e6f8 > --- /dev/null > +++ b/tests/qemu-iotests/tests/block-status-cache.out > @@ -0,0 +1,5 @@ > +. > +-- > +Ran 1 tests > + > +OK > -- > 2.33.1 > Reviewed-by: Nir Soffer

Re: [PATCH 1/2] block/io: Update BSC only if want_zero is true

2022-01-17 Thread Nir Soffer
data, and so we would update the block-status cache with wrong > information. > > Therefore, we should not update the cache with want_zero=false. > > Reported-by: Nir Soffer > Fixes: 0bc329fbb009f8601cec23bf2bc48ead0c5a5fa2 >("block: block-status cache for da

Re: [PATCH v2 2/2] iotests/block-status-cache: New test

2022-01-18 Thread Nir Soffer
we can only use the raw format > +iotests.main(supported_fmts=['raw'], > + supported_protocols=['file']) > diff --git a/tests/qemu-iotests/tests/block-status-cache.out > b/tests/qemu-iotests/tests/block-status-cache.out > new file mode 100644 > index 00..ae1213e6f8 > --- /dev/null > +++ b/tests/qemu-iotests/tests/block-status-cache.out > @@ -0,0 +1,5 @@ > +. > +-- > +Ran 1 tests > + > +OK > -- > 2.33.1 > The out file is not very useful, and even fragile - if the test framework will change the output format, the test will fail. Ideally we depend only on the relevant output of our tools, and using a different version of the test framework on replacing it (e.g pytest) will not require modifying the out files. Regardless I would like to see this fix merged and this issue already exists in other tests. Some tests in tests/ do have useful output that can make debugging failures easier. Reviewed-by: Nir Soffer

[PATCH] nbd/server.c: Remove unused field

2022-01-11 Thread Nir Soffer
NBDRequestData struct has unused QSIMPLEQ_ENTRY filed. It seems that this field exists since the first git commit and was never used. Signed-off-by: Nir Soffer --- nbd/server.c | 1 - 1 file changed, 1 deletion(-) diff --git a/nbd/server.c b/nbd/server.c index 3927f7789d..ce5b2a1d02 100644

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-02-15 Thread Nir Soffer
On Tue, Feb 15, 2022 at 7:22 PM Eric Blake wrote: > According to the NBD spec, a server advertising > NBD_FLAG_CAN_MULTI_CONN promises that multiple client connections will > not see any cache inconsistencies: when properly separated by a single > flush, actions performed by one client will be vi

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-02-16 Thread Nir Soffer
On Wed, Feb 16, 2022 at 12:13 PM Richard W.M. Jones wrote: > On Tue, Feb 15, 2022 at 05:24:14PM -0600, Eric Blake wrote: > > Oh. The QMP command (which is immediately visible through > > nbd-server-add/block-storage-add to qemu and qemu-storage-daemon) > > gains "multi-conn":"on", but you may be

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-02-16 Thread Nir Soffer
On Wed, Feb 16, 2022 at 10:08 AM Vladimir Sementsov-Ogievskiy wrote: > > 16.02.2022 02:24, Eric Blake wrote: > > On Tue, Feb 15, 2022 at 09:23:36PM +0200, Nir Soffer wrote: > >> On Tue, Feb 15, 2022 at 7:22 PM Eric Blake wrote: > >> > >>> Accor

Re: [PATCH 2/6] virtio-scsi: don't waste CPU polling the event virtqueue

2022-04-27 Thread Nir Soffer
-M accel=kvm -m 1G -cpu host \ > --object iothread,id=iothread0 \ > --device virtio-scsi-pci,iothread=iothread0 \ > --blockdev > file,filename=test.img,aio=native,cache.direct=on,node-name=drive0 \ > --device scsi-hd,drive=drive0 > > After this pat

[PATCH 2/3] iotests: Test qemu-img checksum

2022-09-01 Thread Nir Soffer
includes a json map of every test image. Signed-off-by: Nir Soffer --- tests/qemu-iotests/tests/qemu-img-checksum| 149 ++ .../qemu-iotests/tests/qemu-img-checksum.out | 74 + 2 files changed, 223 insertions(+) create mode 100755 tests/qemu-iotests/tests/qemu-img

[PATCH 3/3] qemu-img: Speed up checksum

2022-09-01 Thread Nir Soffer
5s ±0.183s | 1.808s ±0.016s | x1.36 | | nbd | 6g | direct| 3.540s ±0.020s | 1.749s ±0.018s | x2.02 | [1] raw image full of zeroes [2] raw fedora 35 image with additional random data, 50% full [3] image [2] exported by qemu-nbd via unix socket Signed-off-by: Nir Soffer --- qemu-i

[PATCH 0/3] Add qemu-img checksum command using blkhash

2022-09-01 Thread Nir Soffer
Since blkhash is available only via copr now, the new command is added as optional feature, built only if blkhash-devel package is installed. Nir Soffer (3): qemu-img: Add checksum command iotests: Test qemu-img checksum qemu-img: Speed up checksum docs/tools/qemu-img.rst

[PATCH 1/3] qemu-img: Add checksum command

2022-09-01 Thread Nir Soffer
blkhash/ [3] Computing checksum for 8T empty image: qemu-img checksum: 3.7s, sha256sum (estimate): 17,749s Signed-off-by: Nir Soffer --- docs/tools/qemu-img.rst | 22 + meson.build | 10 ++- meson_options.txt | 2 + qemu-img-cmds.hx| 8 ++ qemu-img.c

Re: [PATCH 2/3] iotests: Test qemu-img checksum

2022-10-30 Thread Nir Soffer
On Wed, Oct 26, 2022 at 4:31 PM Hanna Reitz wrote: > On 01.09.22 16:32, Nir Soffer wrote: > > Add simple tests creating an image with all kinds of extents, different > > formats, different backing chain, different protocol, and different > > image options. Since all image

Re: [PATCH 3/3] qemu-img: Speed up checksum

2022-10-30 Thread Nir Soffer
On Wed, Oct 26, 2022 at 4:54 PM Hanna Reitz wrote: > On 01.09.22 16:32, Nir Soffer wrote: > > Add coroutine based loop inspired by `qemu-img convert` design. > > > > Changes compared to `qemu-img convert`: > > > > - State for the entire image is kept in Img

Re: [PATCH 1/3] qemu-img: Add checksum command

2022-10-30 Thread Nir Soffer
On Wed, Oct 26, 2022 at 4:00 PM Hanna Reitz wrote: > On 01.09.22 16:32, Nir Soffer wrote: > > The checksum command compute a checksum for disk image content using the > > blkhash library[1]. The blkhash library is not packaged yet, but it is > > available via copr[2]

Re: [PATCH 3/3] qemu-img: Speed up checksum

2022-10-30 Thread Nir Soffer
On Sun, Oct 30, 2022 at 7:38 PM Nir Soffer wrote: > On Wed, Oct 26, 2022 at 4:54 PM Hanna Reitz wrote: > >> On 01.09.22 16:32, Nir Soffer wrote: >> > [...] > > +/* The current chunk. */ >> > +int64_t offset; >> > +int64_t length; >>

Re: [PATCH v2 2/5] Support format or cache specific out file

2022-12-13 Thread Nir Soffer
On Mon, Dec 12, 2022 at 12:38 PM Hanna Reitz wrote: > > On 28.11.22 15:15, Nir Soffer wrote: > > Extend the test finder to find tests with format (*.out.qcow2) or cache > > specific (*.out.nocache) out file. This worked before only for the > > numbered tests. > >

Re: [PATCH v2 2/5] Support format or cache specific out file

2022-12-13 Thread Nir Soffer
On Tue, Dec 13, 2022 at 8:09 PM Hanna Reitz wrote: > > On 13.12.22 16:56, Nir Soffer wrote: > > On Mon, Dec 12, 2022 at 12:38 PM Hanna Reitz wrote: > >> On 28.11.22 15:15, Nir Soffer wrote: > >>> Extend the test finder to find tests with format (*.o

Re: [PATCH v2] Consider discard option when writing zeros

2024-06-24 Thread Nir Soffer
On Mon, Jun 24, 2024 at 7:08 PM Kevin Wolf wrote: > Am 24.06.2024 um 17:23 hat Stefan Hajnoczi geschrieben: > > On Wed, Jun 19, 2024 at 08:43:25PM +0300, Nir Soffer wrote: > > > Tested using: > > > > Hi Nir, > > This looks like a good candidate for the qemu-

Re: [PATCH v2] Consider discard option when writing zeros

2024-06-26 Thread Nir Soffer
On Wed, Jun 26, 2024 at 11:42 AM Kevin Wolf wrote: > Am 24.06.2024 um 23:12 hat Nir Soffer geschrieben: > > On Mon, Jun 24, 2024 at 7:08 PM Kevin Wolf wrote: > > > > > Am 24.06.2024 um 17:23 hat Stefan Hajnoczi geschrieben: > > > > On Wed, Jun 19, 2024 a

Re: [PATCH v2] Consider discard option when writing zeros

2024-06-26 Thread Nir Soffer
On Wed, Jun 26, 2024 at 12:17 PM Daniel P. Berrangé wrote: > On Mon, Jun 24, 2024 at 06:08:26PM +0200, Kevin Wolf wrote: > > Am 24.06.2024 um 17:23 hat Stefan Hajnoczi geschrieben: > > > On Wed, Jun 19, 2024 at 08:43:25PM +0300, Nir Soffer wrote: > > > > Te

Re: [PATCH v2] Consider discard option when writing zeros

2024-06-28 Thread Nir Soffer
On Thu, Jun 27, 2024 at 2:42 PM Kevin Wolf wrote: > Am 26.06.2024 um 18:27 hat Nir Soffer geschrieben: > > On Wed, Jun 26, 2024 at 12:17 PM Daniel P. Berrangé > > > wrote: > > > > > On Mon, Jun 24, 2024 at 06:08:26PM +0200, Kevin Wolf wrote: > > > &g

[PATCH v3 1/2] qemu-iotest/245: Add missing discard=unmap

2024-06-28 Thread Nir Soffer
The test works since we punch holes by default even when opening the image without discard=on or discard=unmap. Fix the test to enable discard. --- tests/qemu-iotests/245 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index a934c

[PATCH v3 2/2] Consider discard option when writing zeros

2024-06-28 Thread Nir Soffer
u.org/archive/html/qemu-discuss/2024-06/msg3.html Signed-off-by: Nir Soffer --- block/io.c| 9 +- tests/qemu-iotests/tests/write-zeroes-unmap | 127 ++ .../qemu-iotests/tests/write-zeroes-unmap.out | 81 +++ 3 files changed

[PATCH v3 0/2] Consider discard option when writing zeros

2024-06-28 Thread Nir Soffer
was here: https://lists.nongnu.org/archive/html/qemu-block/2024-06/msg00231.html Nir Soffer (2): qemu-iotest/245: Add missing discard=unmap Consider discard option when writing zeros block/io.c| 9 +- tests/qemu-iotests/245| 2

Re: [PATCH 3/4] iotests: Change imports for Python 3.13

2024-07-02 Thread Nir Soffer
On Thu, Jun 27, 2024 at 2:23 AM John Snow wrote: > > Python 3.13 isn't out yet, but it's in beta and Fedora is ramping up to > make it the default system interpreter for Fedora 41. > > They moved our cheese for where ContextManager lives; add a conditional > to locate it while we support both pre-

Re: [PATCH 3/4] iotests: Change imports for Python 3.13

2024-07-02 Thread Nir Soffer
> On 2 Jul 2024, at 17:44, John Snow wrote: > > > > On Tue, Jul 2, 2024 at 7:52 AM Nir Soffer <mailto:nsof...@redhat.com>> wrote: >> On Thu, Jun 27, 2024 at 2:23 AM John Snow > <mailto:js...@redhat.com>> wrote: >> > >> > Python 3.13

[PATCH] block/file-posix: Consider discard flag when opening

2024-06-18 Thread Nir Soffer
un by default. We needs tests for keeping images non-sparse. Signed-off-by: Nir Soffer --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index be25e35ff6..acac2abadc 100644 --- a/block/file-posix.c +++ b/block

Re: [PATCH] block/file-posix: Consider discard flag when opening

2024-06-19 Thread Nir Soffer
> On 19 Jun 2024, at 11:16, Kevin Wolf wrote: > > Am 18.06.2024 um 23:24 hat Nir Soffer geschrieben: >> Set has_discard only when BDRV_O_UNMAP is not set. With this users that >> want to keep their images fully allocated can disable hole punching >> when writin

[PATCH v2] Consider discard option when writing zeros

2024-06-19 Thread Nir Soffer
his change we punched holes by default. I'm not sure this is a good change in behavior. - Need to run all block tests - Not sure that we have tests covering unmapping, we may need new tests - We may need new tests to cover this change Signed-off-by: Nir Soffer --- Changes since v1: - Replac

Re: [PATCH v2] Consider discard option when writing zeros

2024-06-19 Thread Nir Soffer
est.raw discard=unmap - write zeroes unmap 0 /tmp/test.raw Differences: $ diff -u before.out after.out --- before.out 2024-06-19 20:24:09.234083713 +0300 +++ after.out 2024-06-19 20:24:20.526165573 +0300 @@ -3,13 +3,13 @@ 1.0M /tmp/test.raw defaults - write zeroes unmap -0 /tmp/test.raw +

Re: [PATCH v2] Consider discard option when writing zeros

2024-06-19 Thread Nir Soffer
On Wed, Jun 19, 2024 at 8:40 PM Nir Soffer wrote: > - Need to run all block tests > Stale note, make check pass

Re: [PATCH 0/3] Add qemu-img checksum command using blkhash

2022-09-18 Thread Nir Soffer
ping Kevin, Hanna, I hope you have time to take a look. https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00021.html On Thu, Sep 1, 2022 at 5:32 PM Nir Soffer wrote: > > Since blkhash is available only via copr now, the new command is added as > optional feature, buil

Re: [PATCH 0/3] Add qemu-img checksum command using blkhash

2022-10-18 Thread Nir Soffer
On Sun, Sep 18, 2022 at 12:35 PM Nir Soffer wrote: > ping > > Kevin, Hanna, I hope you have time to take a look. > > https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00021.html Ping again, hopefully someone has time to look at this :-) > > > > On Thu,

Re: [Libguestfs] [PATCH v2 1/6] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2023-03-06 Thread Nir Soffer
On Sun, Mar 5, 2023 at 10:42 AM Wouter Verhelst wrote: > > On Fri, Mar 03, 2023 at 04:17:40PM -0600, Eric Blake wrote: > > On Fri, Dec 16, 2022 at 10:32:01PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > s-o-b line missed. > > > > I'm not sure if the NBD project has a strict policy on incl

Re: [PATCH 1/1] block: improve alignment detection and fix 271 test

2023-10-14 Thread Nir Soffer
e test to reflect real world usage? _reset_img 2083k I guess it works with: _reset_img 2084k Commits > commit a6b257a08e3d72219f03e461a52152672fec0612 > Author: Nir Soffer > Date: Tue Aug 13 21:21:03 2019 +0300 > file-posix: Handle undetectable alignme

Re: [Qemu-devel] [PATCH 0/3] qemu-img raw preallocation

2017-02-22 Thread Nir Soffer
On Wed, Feb 22, 2017 at 2:31 PM, Kevin Wolf wrote: > Am 17.02.2017 um 01:51 hat Nir Soffer geschrieben: >> This series add missing tests for raw image preallocation, refine >> preallocation=full and improve documentation. >> >> Create on top of the commit 10ddfe7b6044

Re: [Qemu-devel] [PATCH] qmp-shell: add persistent command history

2017-03-01 Thread Nir Soffer
On Wed, Mar 1, 2017 at 9:44 PM, John Snow wrote: > > Use the existing readline history function we are utilizing > to provide persistent command history across instances of qmp-shell. > > This assists entering debug commands across sessions that may be > interrupted by QEMU sessions terminating, w

Re: [Qemu-devel] [PATCH] qmp-shell: add persistent command history

2017-03-02 Thread Nir Soffer
On Thu, Mar 2, 2017 at 12:19 AM, John Snow wrote: > > > On 03/01/2017 05:01 PM, Nir Soffer wrote: >> On Wed, Mar 1, 2017 at 9:44 PM, John Snow wrote: >>> >>> Use the existing readline history function we are utilizing >>> to provide persistent com

[Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-01-27 Thread Nir Soffer
From: Nir Soffer When using file system that does not support fallocate(), posix_fallocate() fallback to emulation mode. In this mode, when preallocating blocks before file end, posix_preallocate is calling one pread() and one pwrite() per block. But when preallocation blocks after file end, it

[Qemu-devel] [PATCH v2 1/2] qemu-io: Return non-zero exit code on failure

2017-01-27 Thread Nir Soffer
From: Nir Soffer The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c 'read -P 1 0 1024&

[Qemu-devel] [PATCH v2 2/2] qemu-io: Add regression tests

2017-01-27 Thread Nir Soffer
From: Nir Soffer Add regression tests checking that qemu-io fail with non-zero exit code when reading non-exising file or using the wrong format. --- tests/qemu-iotests/173 | 59 ++ tests/qemu-iotests/173.out | 9 +++ tests/qemu-iotests/group

[Qemu-devel] [PATCH v3 1/3] qemu-io: Return non-zero exit code on failure

2017-01-27 Thread Nir Soffer
From: Nir Soffer The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c 'read -P 1 0 1024&

[Qemu-devel] [PATCH v3 3/3] qemu-io: Fix tests expecting the wrong output

2017-01-27 Thread Nir Soffer
From: Nir Soffer Many tests expected the wrong behavior when qemu-io call into the command with after failing to open the file, writing this error: no file open, try 'help open' Now that we fail immediately when opening a file fails, this error does not exist in the output; remo

[Qemu-devel] [PATCH v3 2/3] qemu-io: Add regression tests

2017-01-27 Thread Nir Soffer
From: Nir Soffer Add regression tests checking that qemu-io fail with non-zero exit code when reading non-existing file or using the wrong format. Signed-off-by: Nir Soffer --- tests/qemu-iotests/173 | 59 ++ tests/qemu-iotests/173.out | 9

[Qemu-devel] [PATCH v3 2/3] qemu-io: Add regression tests

2017-01-30 Thread Nir Soffer
From: Nir Soffer Add regression tests checking that qemu-io fail with non-zero exit code when reading non-existing file or using the wrong format. Signed-off-by: Nir Soffer --- tests/qemu-iotests/173 | 59 ++ tests/qemu-iotests/173.out | 9

[Qemu-devel] [PATCH v3 1/3] qemu-io: Return non-zero exit code on failure

2017-01-30 Thread Nir Soffer
From: Nir Soffer The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c 'read -P 1 0 1024&

[Qemu-devel] [PATCH v3 3/3] qemu-io: Fix tests expecting the wrong output

2017-01-30 Thread Nir Soffer
From: Nir Soffer Many tests expected the wrong behavior when qemu-io call into the command with after failing to open the file, writing this error: no file open, try 'help open' Now that we fail immediately when opening a file fails, this error does not exist in the output; remo

Re: [Qemu-devel] [PATCH v3 1/3] qemu-io: Return non-zero exit code on failure

2017-01-31 Thread Nir Soffer
On Mon, Jan 30, 2017 at 6:44 PM, Eric Blake wrote: > On 01/27/2017 09:59 PM, Nir Soffer wrote: >> From: Nir Soffer >> >> The result of openfile was not checked, leading to failure deep in the >> actual command with confusing error message, and exiting with exit co

[Qemu-devel] [PATCH v4 0/2] Fix qemu-io return value on failure

2017-01-31 Thread Nir Soffer
manually and by running tests/check-block.sh. Note that test 059 has one unrelated test failure. Nir Soffer (2): qemu-io: Return non-zero exit code on failure qemu-io: Add regression tests qemu-io.c | 8 +-- tests/qemu-iotests/059.out | 3 --- tests/qemu-iotests/070.out | 1

[Qemu-devel] [PATCH v4 2/2] qemu-io: Add regression tests

2017-01-31 Thread Nir Soffer
From: Nir Soffer Add regression tests checking that qemu-io fail with non-zero exit code when reading non-existing file or using the wrong format. Signed-off-by: Nir Soffer --- tests/qemu-iotests/173 | 59 ++ tests/qemu-iotests/173.out | 9

[Qemu-devel] [PATCH v4 1/2] qemu-io: Return non-zero exit code on failure

2017-01-31 Thread Nir Soffer
From: Nir Soffer The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c 'read -P 1 0 1024&

[Qemu-devel] [PATCH v5 0/3] Fix qemu-io return value on failure

2017-01-31 Thread Nir Soffer
ck.sh. Note that test 059 has one unrelated test failure. Nir Soffer (3): qemu-io: Return non-zero exit code on failure qemu-iotests: Add _unsupported_fmt helper qemu-io: Add failure regression tests qemu-io.c| 8 -- tests/qemu-iotests/059.out | 3 --- tests/qemu-io

[Qemu-devel] [PATCH v5 2/3] qemu-iotests: Add _unsupported_fmt helper

2017-01-31 Thread Nir Soffer
This helper allows adding tests supporting any format expect the specified formats. This may be useful to test that many formats behave in a common way. Signed-off-by: Nir Soffer --- tests/qemu-iotests/common.rc | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/qemu-iotests

[Qemu-devel] [PATCH v5 1/3] qemu-io: Return non-zero exit code on failure

2017-01-31 Thread Nir Soffer
1 Failing earlier, we don't log this error now: no file open, try 'help open' But some tests expected it; the line was removed from the test output. Signed-off-by: Nir Soffer Reviewed-by: Eric Blake --- qemu-io.c | 8 ++-- tests/qemu-iotests/059

[Qemu-devel] [PATCH v5 3/3] qemu-io: Add failure regression tests

2017-01-31 Thread Nir Soffer
Add regression tests checking that qemu-io fails with non-zero exit code when reading non-existing file or using the wrong image format. Signed-off-by: Nir Soffer --- tests/qemu-iotests/174 | 59 ++ tests/qemu-iotests/174.out | 7 ++ tests

[Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-03 Thread Nir Soffer
", 1, 8191) = 1 This happens because posix_fallocate is checking if each block is allocated before writing a byte to the block, and when truncating the file before preallocation, all blocks are unallocated. Signed-off-by: Nir Soffer --- I sent this a week ago: http://lists.no

Re: [Qemu-devel] [PATCH v3 2/3] qemu-io: Add regression tests

2017-02-06 Thread Nir Soffer
Sat, 01/28 05:59, Nir Soffer wrote: >> From: Nir Soffer >> >> Add regression tests checking that qemu-io fail with non-zero exit code >> when reading non-existing file or using the wrong format. >> >> Signed-off-by: Nir Soffer > > This message is not corre

Re: [Qemu-devel] Estimation of qcow2 image size converted from raw image

2017-02-15 Thread Nir Soffer
On Wed, Feb 15, 2017 at 5:14 PM, Stefan Hajnoczi wrote: > On Mon, Feb 13, 2017 at 05:46:19PM +0200, Maor Lipchuk wrote: >> I was wondering if that is possible to provide a new API that >> estimates the size of >> qcow2 image converted from a raw image. We could use this new API to >> allocate the

Re: [Qemu-devel] Estimation of qcow2 image size converted from raw image

2017-02-15 Thread Nir Soffer
On Wed, Feb 15, 2017 at 5:20 PM, Daniel P. Berrange wrote: > On Wed, Feb 15, 2017 at 03:14:19PM +, Stefan Hajnoczi wrote: >> On Mon, Feb 13, 2017 at 05:46:19PM +0200, Maor Lipchuk wrote: >> > I was wondering if that is possible to provide a new API that >> > estimates the size of >> > qcow2 im

Re: [Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-16 Thread Nir Soffer
Ping On Fri, Feb 3, 2017 at 9:50 PM, Nir Soffer wrote: > When using file system that does not support fallocate() (e.g. NFS < > 4.2), truncating the file only when preallocation=OFF speeds up creating > raw file. > > Here is example run, tested on Fedora 24 machine, creating

Re: [Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-16 Thread Nir Soffer
On Thu, Feb 16, 2017 at 7:52 PM, Kevin Wolf wrote: > Am 03.02.2017 um 20:50 hat Nir Soffer geschrieben: >> When using file system that does not support fallocate() (e.g. NFS < >> 4.2), truncating the file only when preallocation=OFF speeds up creating >> raw file. &

[Qemu-devel] [PATCH 2/3] qemu-img: Truncate before full preallocation

2017-02-16 Thread Nir Soffer
system driver to do less allocations and possibly avoid fragmentation of the file. Now we truncate also before doing full preallocation. Signed-off-by: Nir Soffer --- block/file-posix.c | 12 1 file changed, 12 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c

[Qemu-devel] [PATCH 0/3] qemu-img raw preallocation

2017-02-16 Thread Nir Soffer
This series add missing tests for raw image preallocation, refine preallocation=full and improve documentation. Create on top of the commit 10ddfe7b6044 (qemu-img: Do not truncate before preallocation) from Kevin block branch. Nir Soffer (3): qemu-img: Add tests for raw image preallocation

[Qemu-devel] [PATCH 3/3] qemu-img: Improve documentation for PREALLOC_MODE_FALLOC

2017-02-16 Thread Nir Soffer
Now that we are truncating the file in both PREALLOC_MODE_FULL and PREALLOC_MODE_OFF, not truncating in PREALLOC_MODE_FALLOC looks odd. Add a comment explaining why we do not truncate in this case. Signed-off-by: Nir Soffer --- block/file-posix.c | 7 ++- 1 file changed, 6 insertions(+), 1

[Qemu-devel] [PATCH 1/3] qemu-img: Add tests for raw image preallocation

2017-02-16 Thread Nir Soffer
Add tests for creating raw image with and without the preallocation option. Signed-off-by: Nir Soffer --- tests/qemu-iotests/175 | 61 ++ tests/qemu-iotests/175.out | 18 ++ tests/qemu-iotests/group | 1 + 3 files changed, 80

Re: [Qemu-devel] [PATCH 1/2] Update README to accomodate markdown format

2017-02-16 Thread Nir Soffer
On Fri, Feb 17, 2017 at 2:54 AM, Pranith Kumar wrote: > Signed-off-by: Pranith Kumar > --- > README | 44 +--- > 1 file changed, 21 insertions(+), 23 deletions(-) > > diff --git a/README b/README > index cb60d05bee..225afd6be7 100644 > --- a/README > +++ b

Re: [Qemu-devel] [PATCH 1/3] qemu-img: Add tests for raw image preallocation

2017-02-17 Thread Nir Soffer
On Fri, Feb 17, 2017 at 11:14 AM, Kevin Wolf wrote: > Am 17.02.2017 um 01:51 hat Nir Soffer geschrieben: >> Add tests for creating raw image with and without the preallocation >> option. >> >> Signed-off-by: Nir Soffer > > Looks good, but 175 is already (m

Re: [Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-03 Thread Nir Soffer
(self): > +try: > +readline.write_history_file(self._histfile) > +except Exception as e: > +print "Failed to save history file '%s'; %s" % (self._histfile, > e) > > def __parse_value(self, val): > try: But I think this is good enough and useful as is. Reviewed-by: Nir Soffer

Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand

2017-03-03 Thread Nir Soffer
On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi wrote: > > RFCv1: > * Publishing patch series with just raw support, no qcow2 yet. Please review >the command-line interface and let me know if you are happy with this >approach. > > Users and management tools sometimes need to know the siz

  1   2   3   4   >