qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 2b12ba: qemu-iotests: Test 137 only supports


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 2b12ba: qemu-iotests: Test 137 only supports 'file' protoc...
Date: Sun, 26 Feb 2017 08:00:11 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 2b12baf0e3f5679d685ff19ca4ad5e54de0585bb
      
https://github.com/qemu/qemu/commit/2b12baf0e3f5679d685ff19ca4ad5e54de0585bb
  Author: Jeff Cody <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M tests/qemu-iotests/137

  Log Message:
  -----------
  qemu-iotests: Test 137 only supports 'file' protocol

Since test 137 make uses of qcow2.py, only local files are supported.

Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dfac03dcd4e88ad218e3c0800720eb60a9aa9bae
      
https://github.com/qemu/qemu/commit/dfac03dcd4e88ad218e3c0800720eb60a9aa9bae
  Author: Jeff Cody <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  qemu-iotests: add ability to exclude certain protocols from tests

Add the ability for shell script tests to exclude specific
protocols.  This is useful to allow all protocols except ones known to
not support a feature used in the test (e.g. .bdrv_create).

Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 43421ea05f8dfe85dcbb2d4932730fe8cb74dbf4
      
https://github.com/qemu/qemu/commit/43421ea05f8dfe85dcbb2d4932730fe8cb74dbf4
  Author: Jeff Cody <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  qemu-iotests: redirect nbd server stdout to /dev/null

Some iotests (e.g. 174) try to filter the output of _make_test_image by
piping the stdout.  Pipe the server stdout to /dev/null, so that filter
pipe does not need to wait until process completion.

Signed-off-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f6a7240442727cefe000a5b4fdee4d844ddd6bfe
      
https://github.com/qemu/qemu/commit/f6a7240442727cefe000a5b4fdee4d844ddd6bfe
  Author: Nir Soffer <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  qemu-img: Do not truncate before preallocation

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 raw file on
NFS version 3 server.

$ time ./qemu-img-master create -f raw -o preallocation=falloc mnt/test 1g
Formatting 'mnt/test', fmt=raw size=1073741824 preallocation=falloc

real    0m21.185s
user    0m0.022s
sys     0m0.574s

$ time ./qemu-img-fix create -f raw -o preallocation=falloc mnt/test 1g
Formatting 'mnt/test', fmt=raw size=1073741824 preallocation=falloc

real    0m11.601s
user    0m0.016s
sys     0m0.525s

$ time dd if=/dev/zero of=mnt/test bs=1M count=1024 oflag=direct
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 15.6627 s, 68.6 MB/s

real    0m16.104s
user    0m0.009s
sys     0m0.220s

Running with strace we can see that without this change we do one
pread() and one pwrite() for each block. With this change, we do only
one pwrite() per block.

$ strace ./qemu-img-master create -f raw -o preallocation=falloc mnt/test 8192
...
pread64(9, "\0", 1, 4095)               = 1
pwrite64(9, "\0", 1, 4095)              = 1
pread64(9, "\0", 1, 8191)               = 1
pwrite64(9, "\0", 1, 8191)              = 1

$ strace ./qemu-img-fix create -f raw -o preallocation=falloc mnt/test 8192
...
pwrite64(9, "\0", 1, 4095)              = 1
pwrite64(9, "\0", 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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6f993f3fca4763a6b494ff587d4400b6e8a5ef31
      
https://github.com/qemu/qemu/commit/6f993f3fca4763a6b494ff587d4400b6e8a5ef31
  Author: Nir Soffer <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    A tests/qemu-iotests/175
    A tests/qemu-iotests/175.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  qemu-img: Add tests for raw image preallocation

Add tests for creating raw image with and without the preallocation
option.

Signed-off-by: Nir Soffer <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5a1dad9d5a5777c4883de78d9f35bd8141175798
      
https://github.com/qemu/qemu/commit/5a1dad9d5a5777c4883de78d9f35bd8141175798
  Author: Nir Soffer <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  qemu-img: Truncate before full preallocation

In a previous commit (qemu-img: Do not truncate before preallocation) we
moved truncate to the PREALLOC_MODE_OFF branch to avoid slowdown in
posix_fallocate().

However this change is not optimal when using PREALLOC_MODE_FULL, since
knowing the final size from the beginning could allow the file 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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c6ccc2c5e6a58a847f51075abfef20e212c1a3e5
      
https://github.com/qemu/qemu/commit/c6ccc2c5e6a58a847f51075abfef20e212c1a3e5
  Author: Nir Soffer <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  qemu-img: Improve documentation for PREALLOC_MODE_FALLOC

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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2c3b44da07d341557a8203cc509ea07fe3605e11
      
https://github.com/qemu/qemu/commit/2c3b44da07d341557a8203cc509ea07fe3605e11
  Author: John Snow <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M tests/qemu-iotests/030

  Log Message:
  -----------
  iotests: Fix another race in 030

We can't rely on a non-paused job to be present and running for us.
Assume that if the job is not present that it completed already.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7dad9ee6467e0e3024fbe09f8a363148558b8eef
      
https://github.com/qemu/qemu/commit/7dad9ee6467e0e3024fbe09f8a363148558b8eef
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Use BlockBackend to resize in qmp_block_resize()

In order to be able to do permission checking and to keep working with
the BdrvChild based bdrv_truncate() that this involves, we need to
create a temporary BlockBackend to resize the image.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 70b27f364315e4ad4cb77cdebe530e5bdbdf3dcb
      
https://github.com/qemu/qemu/commit/70b27f364315e4ad4cb77cdebe530e5bdbdf3dcb
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Use BB for resizing in qcow2_amend_options()

In order to able to convert bdrv_truncate() to take a BdrvChild and
later to correctly check the resize permission here, we need to use a
BlockBackend for resizing the image.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: becc347e1ca6884b4bc74a0572d3206bee7fec13
      
https://github.com/qemu/qemu/commit/becc347e1ca6884b4bc74a0572d3206bee7fec13
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Resize active commit base in mirror_run()

This is more consistent with the commit block job, and it moves the code
to a place where we already have the necessary BlockBackends to resize
the base image when bdrv_truncate() is changed to require a BdrvChild.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 52cdbc5869a3fbbe4d91c83e97dffb212af28ce3
      
https://github.com/qemu/qemu/commit/52cdbc5869a3fbbe4d91c83e97dffb212af28ce3
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/block-backend.c
    M block/crypto.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/raw-format.c
    M block/vhdx-log.c
    M block/vhdx.c
    M include/block/block.h

  Log Message:
  -----------
  block: Pass BdrvChild to bdrv_truncate()

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 4e4bf5c42c8b2847a90367936a6df6c277f4a76a
      
https://github.com/qemu/qemu/commit/4e4bf5c42c8b2847a90367936a6df6c277f4a76a
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block.c
    M block/bochs.c
    M block/cloop.c
    M block/crypto.c
    M block/dmg.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/raw-format.c
    M block/replication.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/051.pc.out

  Log Message:
  -----------
  block: Attach bs->file only during .bdrv_open()

The way that attaching bs->file worked was a bit unusual in that it was
the only child that would be attached to a node which is not opened yet.
Because of this, the block layer couldn't know yet which permissions the
driver would eventually need.

This patch moves the point where bs->file is attached to the beginning
of the individual .bdrv_open() implementations, so drivers already know
what they are going to do with the child. This is also more consistent
with how driver-specific children work.

For a moment, bdrv_open() gets its own BdrvChild to perform image
probing, but instead of directly assigning this BdrvChild to the BDS, it
becomes a temporary one and the node name is passed as an option to the
drivers, so that they can simply use bdrv_open_child() to create another
reference for their own use.

This duplicated child for (the not opened yet) bs is not the final
state, a follow-up patch will change the image probing code to use a
BlockBackend, which is completely independent of bs.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 2d6b86af1496d534f11cf21370345139dce62fcb
      
https://github.com/qemu/qemu/commit/2d6b86af1496d534f11cf21370345139dce62fcb
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Factor out bdrv_open_child_bs()

This is the part of bdrv_open_child() that opens a BDS with option
inheritance, but doesn't attach it as a child to the parent yet.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 5696c6e350be4d7b45b68e8460da1049bc9efe0a
      
https://github.com/qemu/qemu/commit/5696c6e350be4d7b45b68e8460da1049bc9efe0a
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Use BlockBackend for image probing

This fixes the use of a parent-less BdrvChild in bdrv_open_inherit() by
converting it into a BlockBackend. Which is exactly what it should be,
image probing is an external, standalone user of a node. The requests
can't be considered to originate from the format driver node because
that one isn't even opened yet.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 01a5650179a914a7603c77ccf0de9617064541ee
      
https://github.com/qemu/qemu/commit/01a5650179a914a7603c77ccf0de9617064541ee
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Factor out bdrv_open_driver()

This is a function that doesn't do any option parsing, but just does
some basic BlockDriverState setup and calls the .bdrv_open() function of
the block driver.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 680c7f96062e8c9fcc560eaf06fce164e2a564bc
      
https://github.com/qemu/qemu/commit/680c7f96062e8c9fcc560eaf06fce164e2a564bc
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block.c
    M include/block/block.h

  Log Message:
  -----------
  block: Add bdrv_new_open_driver()

This function allows to create more or less normal BlockDriverStates
even for BlockDrivers that aren't globally registered (e.g. helper
filters for block jobs).

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: a8a4d15c1c34d3cec704fb64eba4a3745a140a97
      
https://github.com/qemu/qemu/commit/a8a4d15c1c34d3cec704fb64eba4a3745a140a97
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: Use opened node as backing file

We should not try to assign a not yet opened node as the backing file,
because as soon as the permission system is added it will fail.  The
just added bdrv_new_open_driver() function is the right tool to open a
file with an internal driver, use it.

In case anyone wonders whether that magic fake backing file to trigger a
special action on 'commit' actually works today: No, not for me. One
reason is that we've been adding a raw format driver on top for several
years now and raw doesn't support commit. Other reasons include that the
backing file isn't writable and the driver doesn't support reopen, and
it's also size 0 and the driver doesn't support bdrv_truncate. All of
these are easily fixable, but then 'commit' ended up in an infinite loop
deep in the vvfat code for me, so I thought I'd best leave it alone. I'm
not really sure what it was supposed to do anyway.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: d185cf0ec64cd183218ca7e0810d9130c96ebebc
      
https://github.com/qemu/qemu/commit/d185cf0ec64cd183218ca7e0810d9130c96ebebc
  Author: Kevin Wolf <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M tests/test-blockjob-txn.c
    M tests/test-blockjob.c

  Log Message:
  -----------
  tests: Use opened block node for block job tests

blk_insert_bs() and block job related functions will soon require an
opened block node (permission calculations will involve the block
driver), so let our tests be consistent with the real users in this
respect.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 6b4e463ff35284a3c02c5ceab3351bb07137c77c
      
https://github.com/qemu/qemu/commit/6b4e463ff35284a3c02c5ceab3351bb07137c77c
  Author: Peter Maydell <address@hidden>
  Date:   2017-02-26 (Sun, 26 Feb 2017)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/block-backend.c
    M block/bochs.c
    M block/cloop.c
    M block/crypto.c
    M block/dmg.c
    M block/file-posix.c
    M block/mirror.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/qed.c
    M block/raw-format.c
    M block/replication.c
    M block/vdi.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M blockdev.c
    M include/block/block.h
    M tests/qemu-iotests/030
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/051.pc.out
    M tests/qemu-iotests/137
    A tests/qemu-iotests/175
    A tests/qemu-iotests/175.out
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/group
    M tests/test-blockjob-txn.c
    M tests/test-blockjob.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches

# gpg: Signature made Fri 24 Feb 2017 18:08:26 GMT
# gpg:                using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  tests: Use opened block node for block job tests
  vvfat: Use opened node as backing file
  block: Add bdrv_new_open_driver()
  block: Factor out bdrv_open_driver()
  block: Use BlockBackend for image probing
  block: Factor out bdrv_open_child_bs()
  block: Attach bs->file only during .bdrv_open()
  block: Pass BdrvChild to bdrv_truncate()
  mirror: Resize active commit base in mirror_run()
  qcow2: Use BB for resizing in qcow2_amend_options()
  blockdev: Use BlockBackend to resize in qmp_block_resize()
  iotests: Fix another race in 030
  qemu-img: Improve documentation for PREALLOC_MODE_FALLOC
  qemu-img: Truncate before full preallocation
  qemu-img: Add tests for raw image preallocation
  qemu-img: Do not truncate before preallocation
  qemu-iotests: redirect nbd server stdout to /dev/null
  qemu-iotests: add ability to exclude certain protocols from tests
  qemu-iotests: Test 137 only supports 'file' protocol

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/6528a4c1f20c...6b4e463ff352

reply via email to

[Prev in Thread] Current Thread [Next in Thread]