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,

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 <kw...@redhat.com> wrote: > Am 08.06.2016 um 17:39 hat Nir Soffer geschrieben: >> On Wed, Jun 8, 2016 at 12:32 PM, Kevin Wolf <kw...@redhat.com> wrote: >> > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >>

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

2017-02-03 Thread Nir Soffer
= 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 <nir...@gmail.com> --- I sent this a week ago: http://lists.no

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 <ebl...@redhat.com> wrote: > On 01/27/2017 09:59 PM, Nir Soffer wrote: >> From: Nir Soffer <nsof...@redhat.com> >> >> The result of openfile was not checked, leading to failure deep in the >> actual command wi

[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 <nir...@gmail.com> --- tests/qemu-iotests/common.rc | 11 +++ 1 file changed, 11 insertions(+) diff

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

2017-01-31 Thread Nir Soffer
. 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-iotests

[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 <nir...@gmail.com> --- tests/qemu-iotests/174 | 59 ++ tests/qemu-iotests/1

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

2017-01-31 Thread Nir Soffer
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 <nir...@gmail.com> Reviewed-by: Eric Blake <ebl...@redhat.com> --- qemu-io.c | 8 ++-- tests/qemu-iotests/059.out |

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

2017-01-31 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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 qc

[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 <nsof...@redhat.com> 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 <nir...@gmail.com> --- tests/qemu-iotests/

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

2017-02-06 Thread Nir Soffer
com> wrote: > On Sat, 01/28 05:59, Nir Soffer wrote: >> From: Nir Soffer <nsof...@redhat.com> >> >> 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

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

2017-01-30 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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

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

2017-01-30 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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 <nir...@gmail.com> --- tests/qemu-iotests/

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

2017-01-30 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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 qc

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

2017-01-27 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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

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

2017-01-27 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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 qc

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

2017-01-27 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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.ou

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

2017-01-27 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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 qc

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

2017-01-27 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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

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

2017-01-27 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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 <nir...@gmail.com> --- tests/qemu-iotests/

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 <kw...@redhat.com> 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 o

[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 <nir...@gmail.com> --- block/file-posix.c | 7 ++- 1 file chan

[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 <nir...@gmail.com> --- block/file-posix.c | 12 1 file changed, 12 insertions(+) diff --git a/block/file-posix.c b

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

[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 <nir...@gmail.com> --- tests/qemu-iotests/175 | 61 ++ tests/qemu-iotests/175.out | 18 ++ tests/qemu-iotests/group | 1 + 3

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 <kw...@redhat.com> 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 <nir...@gmail.com

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 <nir...@gmail.com> 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 Fed

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 <kw...@redhat.com> 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

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

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 <js...@redhat.com> wrote: > > > On 03/01/2017 05:01 PM, Nir Soffer wrote: >> On Wed, Mar 1, 2017 at 9:44 PM, John Snow <js...@redhat.com> wrote: >>> >>> Use the existing readline history function we are utiliz

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

2017-01-12 Thread Nir Soffer
On Wed, Jan 11, 2017 at 11:51 PM, Eric Blake <ebl...@redhat.com> wrote: > On 01/11/2017 12:24 PM, Nir Soffer wrote: >> From: Nir Soffer <nsof...@redhat.com> >> >> The result of openfile was not checked, leading to failure deep in the >> actual command wi

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

2017-01-12 Thread Nir Soffer
On Thu, Jan 12, 2017 at 5:01 AM, Fam Zheng <f...@redhat.com> wrote: > On Wed, 01/11 15:51, Eric Blake wrote: >> On 01/11/2017 12:24 PM, Nir Soffer wrote: >> > From: Nir Soffer <nsof...@redhat.com> >> > >> > The result of openfile was not checked, le

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

2017-01-11 Thread Nir Soffer
From: Nir Soffer <nsof...@redhat.com> 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 one example - trying to read a pattern from an invalid chain: $ qemu-io -c 'read -P 1

Re: [Qemu-devel] [PATCH v3 0/8] qemu-img: add measure sub-command

2017-03-22 Thread Nir Soffer
On Wed, Mar 22, 2017 at 2:28 PM Stefan Hajnoczi wrote: > v3: > * Drop RFC, this is ready to go for QEMU 2.10 > * Use "required size" instead of "required bytes" in qemu-img output for >consistency [Nir] > * Clarify BlockMeasureInfo semantics [Max] > * Clarify

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

2017-03-19 Thread Nir Soffer
On Mon, Mar 13, 2017 at 8:04 AM Markus Armbruster <arm...@redhat.com> wrote: > Nir Soffer <nir...@gmail.com> writes: > > > On Wed, Mar 8, 2017 at 8:29 AM, Markus Armbruster <arm...@redhat.com> > wrote: > >> John Snow <js...@redhat.com> writes: >

Re: [Qemu-devel] [RFC v2 1/8] block: add bdrv_measure() API

2017-03-17 Thread Nir Soffer
On Wed, Mar 15, 2017 at 11:29 AM Stefan Hajnoczi wrote: > bdrv_measure() provides a conservative maximum for the size of a new > image. This information is handy if storage needs to be allocated (e.g. > a SAN or an LVM volume) ahead of time. > > Signed-off-by: Stefan

Re: [Qemu-devel] [RFC v2 0/8] qemu-img: add measure sub-command

2017-03-17 Thread Nir Soffer
On Wed, Mar 15, 2017 at 11:29 AM Stefan Hajnoczi wrote: > RFCv2: > * Publishing RFC again to discuss the new user-visible interfaces. Code > has >changed quite a bit, I have not kept any Reviewed-by tags. > * Rename qemu-img sub-command "measure" and API

Re: [Qemu-devel] [RFC v2 2/8] raw-format: add bdrv_measure() support

2017-03-17 Thread Nir Soffer
On Wed, Mar 15, 2017 at 11:29 AM Stefan Hajnoczi wrote: > Maximum size calculation is trivial for the raw format: it's just the > requested image size (because there is no metadata). > > Signed-off-by: Stefan Hajnoczi > --- > block/raw-format.c | 22

Re: [Qemu-devel] [RFC v2 1/8] block: add bdrv_measure() API

2017-03-17 Thread Nir Soffer
On Wed, Mar 15, 2017 at 11:29 AM Stefan Hajnoczi wrote: > bdrv_measure() provides a conservative maximum for the size of a new > image. This information is handy if storage needs to be allocated (e.g. > a SAN or an LVM volume) ahead of time. > > Signed-off-by: Stefan

Re: [Qemu-devel] [RFC v2 8/8] iotests: add test 178 for qemu-img measure

2017-03-18 Thread Nir Soffer
On Wed, Mar 15, 2017 at 11:30 AM Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/178 | 75 > > tests/qemu-iotests/178.out.qcow2 | 33 ++ >

Re: [Qemu-devel] [RFC v2 4/8] qcow2: extract image creation option parsing

2017-03-18 Thread Nir Soffer
On Wed, Mar 15, 2017 at 11:30 AM Stefan Hajnoczi wrote: > The image creation options parsed by qcow2_create() are also needed to > implement .bdrv_measure(). Extract the parsing code, including input > validation. > > Signed-off-by: Stefan Hajnoczi >

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

2017-03-03 Thread Nir Soffer
story(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 <nir...@gmail.com>

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

2017-03-03 Thread Nir Soffer
On Sat, Mar 4, 2017 at 12:02 AM, John Snow <js...@redhat.com> wrote: > > > On 03/03/2017 04:38 PM, Nir Soffer wrote: >> On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi <stefa...@redhat.com> wrote: >>> >>> RFCv1: >>> * Publishing pat

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

2017-03-03 Thread Nir Soffer
On Sat, Mar 4, 2017 at 12:15 AM, Nir Soffer <nir...@gmail.com> wrote: > On Sat, Mar 4, 2017 at 12:02 AM, John Snow <js...@redhat.com> wrote: >> >> >> On 03/03/2017 04:38 PM, Nir Soffer wrote: >>> On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi &l

Re: [Qemu-devel] [RFC 3/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: > The max-size subcommand calculates the maximum size required by a new > image file. This can be used by users or management tools that need to > allocate space on an LVM volume, SAN LUN, etc before creating or >

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

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

2017-03-08 Thread Nir Soffer
On Wed, Mar 8, 2017 at 8:29 AM, Markus Armbruster <arm...@redhat.com> wrote: > John Snow <js...@redhat.com> writes: > >> On 03/07/2017 03:16 AM, Markus Armbruster wrote: >>> John Snow <js...@redhat.com> writes: >>> >>>> On 03/06/2

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

2017-03-04 Thread Nir Soffer
On Fri, Mar 3, 2017 at 9:29 PM, John Snow <js...@redhat.com> wrote: > > > On 03/03/2017 02:26 PM, Nir Soffer wrote: >> On Fri, Mar 3, 2017 at 8:54 PM, John Snow <js...@redhat.com> wrote: >>> Use the existing readline history function we are utilizing >&

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

Re: [Qemu-devel] [Qemu-block] [PATCH v4] qemu-img: Check for backing image if specified during create

2017-07-12 Thread Nir Soffer
On Wed, Jul 12, 2017 at 8:00 PM Max Reitz wrote: > On 2017-07-12 16:56, Kevin Wolf wrote: > > Am 12.07.2017 um 16:42 hat Eric Blake geschrieben: > >> On 05/17/2017 07:38 AM, Max Reitz wrote: > >> > >> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1213786 >

Re: [Qemu-devel] Supporting unsafe create when backing file is not accessible

2017-07-14 Thread Nir Soffer
On Wed, Jul 12, 2017 at 5:40 PM Eric Blake wrote: > On 07/12/2017 03:56 AM, Ala Hino wrote: > > Hi, > > > > We encountered a performance issue when creating a volume for a running > VM > > and we'd like to share the info with you. The root cause of the issue is > in > > our

Re: [Qemu-devel] [PATCH for-2.10] block: Skip implicit nodes in query-block/blockstats

2017-07-19 Thread Nir Soffer
On Wed, Jul 19, 2017 at 4:05 PM Markus Armbruster wrote: > Kevin Wolf writes: > > > Commits 0db832f and 6cdbceb introduced the automatic insertion of filter > > nodes above the top layer of mirror and commit block jobs. The > > assumption made there was that

Re: [Qemu-devel] [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Nir Soffer
On Thu, Dec 14, 2017 at 11:39 AM Stefan Hajnoczi wrote: > On Wed, Dec 13, 2017 at 06:35:51PM -0300, Philippe Mathieu-Daudé wrote: > > Hi, > > > > With this series we can now write tests using Python rather than C. > > For complex tests this can reduce the test development

Re: [Qemu-devel] [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Nir Soffer
On Thu, Dec 14, 2017 at 1:36 PM Paolo Bonzini wrote: > On 14/12/2017 10:39, Stefan Hajnoczi wrote: > >> # verify Card ID > >> data = self.bus.do_cmd(ALL_SEND_CID) > >> oid, pnm, psn = struct.unpack(">x2s5sxLxxx", data) > >>

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U

2018-01-08 Thread Nir Soffer
On Mon, Jan 8, 2018 at 4:48 PM Kevin Wolf wrote: > Am 05.01.2018 um 07:55 hat Fam Zheng geschrieben: > > Management and users are accustomed to "qemu-img info" to query status of > > images even when they are used by guests. Since image locking was added, > the -U > >

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U

2018-01-10 Thread Nir Soffer
On Wed, Jan 10, 2018 at 4:04 PM Kashyap Chamarthy wrote: > On Mon, Jan 08, 2018 at 03:41:36PM +0100, Kevin Wolf wrote: > > Am 05.01.2018 um 07:55 hat Fam Zheng geschrieben: > > > Management and users are accustomed to "qemu-img info" to query status > of > > > images even

Re: [Qemu-devel] [Qemu-block] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices

2018-07-26 Thread Nir Soffer
On Thu, Jul 26, 2018 at 2:33 PM Kevin Wolf wrote: > The BLKDISCARD ioctl doesn't guarantee that the discarded blocks read as > all-zero afterwards, so don't try to abuse it for zero writing. We try > to only use this if BLKDISCARDZEROES tells us that it is safe, but this > is unreliable on older

Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices

2018-07-26 Thread Nir Soffer
On Thu, Jul 26, 2018 at 7:10 PM Eric Blake wrote: > On 07/26/2018 10:33 AM, Kevin Wolf wrote: > > > > > As far as I know, the comment you quoted is accurate for BLKDISCARD and > > BLKZEROOUT, but not for the fallocate() flags. > > > > I sure wish the man pages were more explicit on what

Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices

2018-07-26 Thread Nir Soffer
On Thu, Jul 26, 2018 at 7:58 PM Kevin Wolf wrote: > Am 26.07.2018 um 18:46 hat Nir Soffer geschrieben: > > On Thu, Jul 26, 2018 at 7:10 PM Eric Blake wrote: > > > > > On 07/26/2018 10:33 AM, Kevin Wolf wrote: > > > > > > > > > >

Re: [Qemu-devel] [Qemu-block] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices

2018-07-26 Thread Nir Soffer
On Thu, Jul 26, 2018 at 7:41 PM Kevin Wolf wrote: ... > > > +#ifdef CONFIG_FALLOCATE_PUNCH_HOLE > > > +ret = do_fallocate(s->fd, FALLOC_FL_PUNCH_HOLE | > FALLOC_FL_KEEP_SIZE, > > > + aiocb->aio_offset, aiocb->aio_nbytes); > > > +if (ret != -ENOTSUP) { > > > > > > >

Re: [Qemu-devel] [Qemu-block] [PATCH RFC for-3.0-rc3 0/3] qemu-img: Disable copy offloading by default

2018-07-27 Thread Nir Soffer
On Fri, Jul 27, 2018 at 3:15 PM Fam Zheng wrote: > On Fri, Jul 27, 2018 at 6:29 PM Kevin Wolf wrote: > > > > Am 27.07.2018 um 05:33 hat Fam Zheng geschrieben: > > > Kevin pointed out that both glibc and kernel provides a slow fallback > of > > > copy_file_range which hurts thin provisioning.

Re: [Qemu-devel] [Qemu-block] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices

2018-07-26 Thread Nir Soffer
On Thu, Jul 26, 2018 at 5:28 PM Eric Blake wrote: > On 07/26/2018 06:33 AM, Kevin Wolf wrote: > > The BLKDISCARD ioctl doesn't guarantee that the discarded blocks read as > > all-zero afterwards, so don't try to abuse it for zero writing. We try > > to only use this if BLKDISCARDZEROES tells us

Re: [Qemu-devel] [PATCH 1/2] block: curl: Allow arbitrary HTTP request headers to be set.

2018-03-01 Thread Nir Soffer
On Thu, Mar 1, 2018 at 4:00 PM Richard W.M. Jones wrote: > Allow arbitrary HTTP request headers to be set, like this: > > qemu-img create -f qcow2 \ > -b 'json:{ "file.driver":"http", > "file.url":"http://192.168.0.249/scratch/test.img;, >

Re: [Qemu-devel] [PATCH 2/2] block: curl: Allow Certificate Authority bundle to be passed in.

2018-03-01 Thread Nir Soffer
On Thu, Mar 1, 2018 at 4:02 PM Richard W.M. Jones wrote: > This allows a Certificate Authority bundle to be passed to the curl > driver, allowing authentication against servers that check > certificates. For example this allows you to access a disk on an > oVirt node: > >

[Qemu-devel] [PATCH 3/3] qemu-iotests: Test new qemu-nbd --nolist option

2018-04-13 Thread Nir Soffer
Add new test module for tesing the --nolist option. Signed-off-by: Nir Soffer <nir...@gmail.com> --- tests/qemu-iotests/214 | 46 ++ tests/qemu-iotests/214.out | 2 ++ tests/qemu-iotests/group | 1 + 3 files changed, 49 insertions(+)

[Qemu-devel] [PATCH 1/3] nbd: Add option to disallow listing exports

2018-04-13 Thread Nir Soffer
wlist" nbd-server configuration option. When used, listing exports will fail like this: $ nbd-client -l localhost 10809 Negotiation: .. E: listing not allowed by server. Server said: Listing exports is forbidden Signed-off-by: Nir Soffer <nir...@gmail.com> --- blockde

[Qemu-devel] [PATCH 2/3] iotests.py: Add helper for running commands

2018-04-13 Thread Nir Soffer
stdout and stderr, returning the command output or raising CommandFailed. These helpers will be used by new qemu-nbd tests. And later can be used to cleanup helpers for running qemu-* tools in iotests.py. Signed-off-by: Nir Soffer <nir...@gmail.com> --- tests/qemu-iotests/iotests.p

[Qemu-devel] [PATCH 0/3] qemu-nbd: Disallow listing exports

2018-04-13 Thread Nir Soffer
ot iotests.py - and use the new infrastructure to add test the new option using nbd-client. Adding dependency on nbd-client may be probelematic, but I think qemu-nbd should have tests ensuring compatibility with other tools. Nir Soffer (3): nbd: Add option to disallow listing exports

Re: [Qemu-devel] [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Nir Soffer
On Wed, Nov 7, 2018 at 7:27 PM Kevin Wolf wrote: > Am 07.11.2018 um 15:56 hat Nir Soffer geschrieben: > > Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones > wrote: > > > > > Another thing I tried was to change the NBD server (nbdkit) so that it > > > doesn't

Re: [Qemu-devel] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-11 Thread Nir Soffer
On Wed, Nov 7, 2018 at 6:42 PM Eric Blake wrote: > On 11/7/18 6:13 AM, Richard W.M. Jones wrote: > > (I'm not going to claim this is a bug, but it causes a large, easily > > measurable performance regression in virt-v2v). > > I haven't closely looked at at this email thread yet, but a quick

Re: [Qemu-devel] [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-11 Thread Nir Soffer
On Wed, Nov 7, 2018 at 7:55 PM Nir Soffer wrote: > On Wed, Nov 7, 2018 at 7:27 PM Kevin Wolf wrote: > >> Am 07.11.2018 um 15:56 hat Nir Soffer geschrieben: >> > Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones >> wrote: >> > >> > > Another thing

Re: [Qemu-devel] [Qemu-block] KVM Forum block no[td]es

2018-11-11 Thread Nir Soffer
On Mon, Nov 12, 2018 at 12:25 AM Max Reitz wrote: > This is what I’ve taken from two or three BoF-like get-togethers on > blocky things. Amendments are more than welcome, of course. ... > Bitmaps > === > > (Got this section from sneaking into a BoF I wasn’t invited to. Oh > well. Won’t

Re: [Qemu-devel] [Qemu-block] KVM Forum block no[td]es

2018-11-12 Thread Nir Soffer
On Mon, Nov 12, 2018 at 5:26 PM Max Reitz wrote: > On 12.11.18 00:36, Nir Soffer wrote: > > On Mon, Nov 12, 2018 at 12:25 AM Max Reitz > <mailto:mre...@redhat.com>> wrote: > > > > This is what I’ve taken from two or three BoF-like get-togethers on > >

Re: [Qemu-devel] [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-15 Thread Nir Soffer
On Sun, Nov 11, 2018 at 6:11 PM Nir Soffer wrote: > On Wed, Nov 7, 2018 at 7:55 PM Nir Soffer wrote: > >> On Wed, Nov 7, 2018 at 7:27 PM Kevin Wolf wrote: >> >>> Am 07.11.2018 um 15:56 hat Nir Soffer geschrieben: >>> > Wed, Nov 7, 2018 a

Re: [Qemu-devel] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Nir Soffer
Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones wrote: > Another thing I tried was to change the NBD server (nbdkit) so that it > doesn't advertise zero support to the client: > > $ nbdkit --filter=log --filter=nozero memory size=6G logfile=/tmp/log \ > --run './qemu-img convert

Re: [Qemu-devel] [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-17 Thread Nir Soffer
On Sat, Nov 17, 2018 at 11:13 PM Richard W.M. Jones wrote: > On Sat, Nov 17, 2018 at 10:59:26PM +0200, Nir Soffer wrote: > > On Fri, Nov 16, 2018 at 5:26 PM Kevin Wolf wrote: > > > > > Am 15.11.2018 um 23:27 hat Nir Soffer geschrieben: > > > > On Sun, Nov 11,

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] qemu-io: Prefer stderr for error messages

2018-12-12 Thread Nir Soffer
On Thu, Dec 13, 2018 at 12:13 AM Eric Blake wrote: > > When a qemu-io command fails, it's best if the failure message > goes to stderr rather than stdout. This makes sense, but it will break users like this:

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] qemu-io: Prefer stderr for error messages

2018-12-13 Thread Nir Soffer
On Thu, Dec 13, 2018 at 11:27 PM Eric Blake wrote: > On 12/13/18 11:44 AM, Nir Soffer wrote: > > >> The things is, qemu-io was never meant to be used by other > >> applications that need to process the results, it's a tool for testing > >> and debugging. If we

Re: [Qemu-devel] [Qemu-block] Request for clarification on qemu-img convert behavior zeroing target host_device

2018-12-13 Thread Nir Soffer
On Thu, Dec 13, 2018 at 11:14 PM De Backer, Fred (Nokia - BE/Antwerp) < fred.de_bac...@nokia.com> wrote: > > Indeed, performance traces are important for issues like this. > See strace of both FC27 and FC29 attached > Looks like you traced only the main thread. All the I/O is done in other

Re: [Qemu-devel] [Qemu-block] do not lseek in qcow2 block_status

2018-12-24 Thread Nir Soffer
On Mon, Dec 24, 2018 at 5:50 PM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Hi all! > > bdrv_co_block_status digs bs->file for additional, more accurate search > for hole > inside region, reported as DATA by bs since long-ago > >commit

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] qemu-io: Prefer stderr for error messages

2018-12-13 Thread Nir Soffer
On Thu, Dec 13, 2018 at 4:05 PM Kevin Wolf wrote: > Am 13.12.2018 um 11:47 hat Daniel P. Berrangé geschrieben: > > On Thu, Dec 13, 2018 at 01:52:29AM +0200, Nir Soffer wrote: > > > On Thu, Dec 13, 2018 at 12:13 AM Eric Blake wrote: > > > > > > > &g

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] qemu-io: Prefer stderr for error messages

2018-12-13 Thread Nir Soffer
On Thu, Dec 13, 2018 at 12:47 PM Daniel P. Berrangé wrote: > On Thu, Dec 13, 2018 at 01:52:29AM +0200, Nir Soffer wrote: > > On Thu, Dec 13, 2018 at 12:13 AM Eric Blake wrote: > > > > > > When a qemu-io command fails, it's best if the failure message > > &g

Re: [Qemu-devel] [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-17 Thread Nir Soffer
On Fri, Nov 16, 2018 at 5:26 PM Kevin Wolf wrote: > Am 15.11.2018 um 23:27 hat Nir Soffer geschrieben: > > On Sun, Nov 11, 2018 at 6:11 PM Nir Soffer wrote: > > > > > On Wed, Nov 7, 2018 at 7:55 PM Nir Soffer wrote: > > > > > >> On

Re: [Qemu-devel] [libvirt] [PATCH] qmp: Deprecate query-nodes option of query-blockstats

2019-01-28 Thread Nir Soffer
On Mon, Jan 28, 2019 at 6:13 PM Daniel P. Berrangé wrote: > On Mon, Jan 28, 2019 at 04:37:50PM +0100, Kevin Wolf wrote: > > Am 28.01.2019 um 16:15 hat Anton Kuchin geschrieben: > > > This option is broken since a6baa60807 in v2.9 and returns mostly > > > zeroes instead of real stats because

Re: [Qemu-devel] [PATCH 0/6] block: Fix slow pre-zeroing in qemu-img convert

2019-03-22 Thread Nir Soffer
On Fri, Mar 22, 2019 at 3:22 PM Kevin Wolf wrote: > If qemu-img convert sees that the target image isn't zero-initialised > yet, it tries to do an efficient zero write for the whole image first > to save the overhead of repeated explicit zero writes during the > conversion. Obviously, this

[Qemu-devel] [PATCH] qemu-img: Enable BDRV_REQ_MAY_UNMAP in convert

2019-03-23 Thread Nir Soffer
k/2019-03/msg00755.html I'm not sure this change is correct for all cases, posting for discussion. [1] http://lists.nongnu.org/archive/html/qemu-block/2019-03/msg00761.html Signed-off-by: Nir Soffer --- qemu-img.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b

Re: [Qemu-devel] [PATCH 0/6] block: Fix slow pre-zeroing in qemu-img convert

2019-03-23 Thread Nir Soffer
On Fri, Mar 22, 2019 at 10:47 PM Eric Blake wrote: > On 3/22/19 3:22 PM, Nir Soffer wrote: > > > Thanks for fixing this! This will be a very important performance fix for > > importing > > VMs. > > > > The change description sounds good to me. > > > &

Re: [Qemu-devel] [Qemu-block] [PATCH v2] iotests: handle TypeError for Python3 in test 242

2019-02-25 Thread Nir Soffer
On Mon, Feb 25, 2019 at 10:36 PM Eduardo Habkost wrote: > On Fri, Feb 22, 2019 at 02:26:13PM +0300, Andrey Shinkevich wrote: > > The data type for bytes in Python3 differs from the one in Python2. > > Those cases should be managed separately. > > > > v1: > > In the first version, the TypeError

Re: [Qemu-devel] [Qemu-block] [RFC PATCH 00/11] qcow2: External data files

2019-01-31 Thread Nir Soffer
On Thu, Jan 31, 2019 at 7:57 PM Kevin Wolf wrote: This will be very useful for new oVirt Cinder based storage. Thanks for working on this! I did not see any discussion about this here, but I did not follow this list closely lately. Do we have more info on this? a feature page describing the use

Re: [Qemu-devel] [Qemu-block] [RFC PATCH 01/11] qcow2: Extend spec for external data files

2019-01-31 Thread Nir Soffer
On Thu, Jan 31, 2019 at 8:43 PM Eric Blake wrote: ... > > @@ -450,8 +461,10 @@ Standard Cluster Descriptor: > > 1 - 8:Reserved (set to 0) > > > > 9 - 55:Bits 9-55 of host cluster offset. Must be aligned > to a > > -cluster boundary. If the offset

Re: [Qemu-devel] [RFC PATCH 10/11] qcow2: Store data file name in the image

2019-01-31 Thread Nir Soffer
On Thu, Jan 31, 2019 at 8:20 PM Kevin Wolf wrote: > Rather than requiring that the external data file node is passed > explicitly when creating the qcow2 node, store the filename in the > designated header extension during .bdrv_create and read it from there > as a default during .bdrv_open. >

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 +++ >

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 >> preallo

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

2019-05-13 Thread Nir Soffer
= 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] [PATCH v2] iotests: Filter 175's allocation information

2019-05-16 Thread Nir Soffer
On Thu, May 16, 2019 at 2:03 PM Max Reitz wrote: > On 13.05.19 17:52, 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 > > --- > > v2: [Nir] > > -

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

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

2019-08-13 Thread Nir Soffer
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 - Improve the commit message

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

2019-08-16 Thread Nir Soffer
le 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. Signed-off

  1   2   3   4   >