qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 0731a5: block: Constify data passed by pointe


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 0731a5: block: Constify data passed by pointer to blk_name
Date: Fri, 05 May 2017 03:04:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0731a50feba67a829b86df6dffec682c821f1152
      
https://github.com/qemu/qemu/commit/0731a50feba67a829b86df6dffec682c821f1152
  Author: Krzysztof Kozlowski <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block/block-backend.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Constify data passed by pointer to blk_name

blk_name() is not modifying data passed to it through pointer and it
returns also a pointer to const so the argument can be made const for
code safeness.

Signed-off-by: Krzysztof Kozlowski <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ad02b7af0c4f8cf97cb68dd94c899f8b448ab76d
      
https://github.com/qemu/qemu/commit/ad02b7af0c4f8cf97cb68dd94c899f8b448ab76d
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Remove unnecessary includes

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


  Commit: 0d5e0bb2f78d04955a34ad6784cc7d457716df83
      
https://github.com/qemu/qemu/commit/0d5e0bb2f78d04955a34ad6784cc7d457716df83
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block/file-win32.c

  Log Message:
  -----------
  file-win32: Remove unnecessary include

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


  Commit: 362b3786ebd1f97737783b53de056265efa9e870
      
https://github.com/qemu/qemu/commit/362b3786ebd1f97737783b53de056265efa9e870
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block.c
    M block/io.c

  Log Message:
  -----------
  Revert "block/io: Comment out permission assertions"

This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.

This commit was necessary for the 2.9 release because we were unable to
fix the underlying issue(s) in time. However, we will be for 2.10.

Signed-off-by: Max Reitz <address@hidden>
Acked-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9fd77f997208c0c98cbd8ec522e34fd2103f5d30
      
https://github.com/qemu/qemu/commit/9fd77f997208c0c98cbd8ec522e34fd2103f5d30
  Author: Peter Lieven <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: simplify img_convert

img_convert has been around before there was an ImgConvertState or
a block backend, but it has never been modified to directly use
these structs. Change this by parsing parameters directly into
the ImgConvertState and directly use BlockBackend where possible.
Furthermore variable initialization has been reworked and sorted.

Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0042fd3663662c848aaff5c65b6880e545d94b18
      
https://github.com/qemu/qemu/commit/0042fd3663662c848aaff5c65b6880e545d94b18
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Call blk_resume_after_migration() for postcopy

Commit d35ff5e6 ('block: Ignore guest dev permissions during incoming
migration') added blk_resume_after_migration() to the precopy migration
path, but neglected to add it to the duplicated code that is used for
postcopy migration. This means that the guest device doesn't request the
necessary permissions, which ultimately led to failing assertions.

Add the missing blk_resume_after_migration() to the postcopy path.

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


  Commit: 69404d9e474e9df3d32fbab74b856d76acd77580
      
https://github.com/qemu/qemu/commit/69404d9e474e9df3d32fbab74b856d76acd77580
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M tests/qemu-iotests/028.out
    M tests/qemu-iotests/051
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/051.pc.out
    M tests/qemu-iotests/068
    M tests/qemu-iotests/068.out
    M tests/qemu-iotests/130.out
    M tests/qemu-iotests/142
    M tests/qemu-iotests/142.out
    M tests/qemu-iotests/145
    M tests/qemu-iotests/145.out
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/common.qemu

  Log Message:
  -----------
  qemu-iotests: Filter HMP readline escape characters

The only thing the escape characters achieve is making the reference
output unreadable and lines that are potentially so long that git
doesn't want to put them into an email any more. Let's filter them out.

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


  Commit: 312758e23724044adb66ad1cd7fcde399817ec5b
      
https://github.com/qemu/qemu/commit/312758e23724044adb66ad1cd7fcde399817ec5b
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

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

  Log Message:
  -----------
  qemu-iotests: Test postcopy migration

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 4a0082401a770261b85625a41eef4a4e89ad7a74
      
https://github.com/qemu/qemu/commit/4a0082401a770261b85625a41eef4a4e89ad7a74
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: An empty filename counts as no filename

Reproducer:
    $ ./qemu-img info ''
    qemu-img: ./block.c:1008: bdrv_open_driver: Assertion
  `!drv->bdrv_needs_filename || bs->filename[0]' failed.
    [1]    26105 abort (core dumped)  ./qemu-img info ''

This patch fixes this to be:
    $ ./qemu-img info ''
    qemu-img: Could not open '': The 'file' block driver requires a file
    name

Cc: qemu-stable <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 42dc10f17a7f1754d419e715114c37f5c5fde12f
      
https://github.com/qemu/qemu/commit/42dc10f17a7f1754d419e715114c37f5c5fde12f
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M tests/qemu-iotests/051
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/051.pc.out

  Log Message:
  -----------
  iotests/051: Add test for empty filename

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1ea88d359f8ccfa4bf25d885748f0a49a41de4ae
      
https://github.com/qemu/qemu/commit/1ea88d359f8ccfa4bf25d885748f0a49a41de4ae
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

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

  Log Message:
  -----------
  qemu-iotests: Remove PERL_PROG and BC_PROG

We test for the presence of perl and bc and save their path in the
variables PERL_PROG and BC_PROG, but never actually make use of them.
Remove the checks and assignments so qemu-iotests can run even when
bc isn't installed.

Reported-by: Yash Mankad <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>


  Commit: 242e496b39d364765e428e182b3bdeee94cc5c84
      
https://github.com/qemu/qemu/commit/242e496b39d364765e428e182b3bdeee94cc5c84
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

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

  Log Message:
  -----------
  qemu_iotests: Remove _readlink()

It is unused.

Suggested-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>


  Commit: e914404efb9d2af79e08750c6700b642ea0d2ec7
      
https://github.com/qemu/qemu/commit/e914404efb9d2af79e08750c6700b642ea0d2ec7
  Author: Fam Zheng <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Remove NULL check in bdrv_co_flush

Reported by Coverity. We already use bs in bdrv_inc_in_flight before
checking for NULL. It is unnecessary as all callers pass non-NULL bs, so
drop it.

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


  Commit: 03a0aa37d225384ec265bcae18ee1dd410b9b601
      
https://github.com/qemu/qemu/commit/03a0aa37d225384ec265bcae18ee1dd410b9b601
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

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

  Log Message:
  -----------
  iotests: Launch qemu-nbd with -e 42

There is no reason for the qemu-nbd server used for tests not to accept
an arbitrary number of clients. In fact, test 181 will require it to
accept two clients at the same time (and thus it fails before this
patch).

This patch updates common.rc to launch qemu-nbd with -e 42 which should
be enough for all of our current and future tests.

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


  Commit: fea41826db2b14402430b41ed30dd4623353f681
      
https://github.com/qemu/qemu/commit/fea41826db2b14402430b41ed30dd4623353f681
  Author: Thomas Huth <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M qemu-options.hx
    M vl.c

  Log Message:
  -----------
  Issue a deprecation warning if the user specifies the "-hdachs" option.

If the user needs to specify the disk geometry, the corresponding
parameters of the "-device ide-hd" option should be used instead.
"-hdachs" is considered as deprecated and might be removed soon.

Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8248169497ec8b15504815e86bb85b588dbe0592
      
https://github.com/qemu/qemu/commit/8248169497ec8b15504815e86bb85b588dbe0592
  Author: Eric Blake <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M tests/qemu-iotests/026
    M tests/qemu-iotests/026.out
    M tests/qemu-iotests/026.out.nocache

  Log Message:
  -----------
  iotests: Fix typo in 026

s/refcout/refcount/

CC: address@hidden
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 24dfdfd0ff79ea094c41eb34d9acdc0a689d5617
      
https://github.com/qemu/qemu/commit/24dfdfd0ff79ea094c41eb34d9acdc0a689d5617
  Author: Fam Zheng <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M tests/qemu-iotests/109
    M tests/qemu-iotests/109.out
    M tests/qemu-iotests/common.filter

  Log Message:
  -----------
  iotests: 109: Filter out "len" of failed jobs

Mirror calculates job len from current I/O progress:

    s->common.len = s->common.offset +
              (cnt + s->sectors_in_flight) * BDRV_SECTOR_SIZE;

The final "len" of a failed mirror job in iotests 109 depends on the
subtle timing of the completion of read and write issued in the first
mirror iteration.  The second iteration may or may not have run when the
I/O error happens, resulting in non-deterministic output of the
BLOCK_JOB_COMPLETED event text.

Similar to what was done in a752e4786, filter out the field to make the
test robust.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Tested-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: de234897b60e034ba94b307fc289e2dc692c9251
      
https://github.com/qemu/qemu/commit/de234897b60e034ba94b307fc289e2dc692c9251
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block/blkdebug.c
    M block/blkreplay.c
    M block/blkverify.c

  Log Message:
  -----------
  block: Do not unref bs->file on error in BD's open

The block layer takes care of removing the bs->file child if the block
driver's bdrv_open()/bdrv_file_open() implementation fails. The block
driver therefore does not need to do so, and indeed should not unless it
sets bs->file to NULL afterwards -- because if this is not done, the
bdrv_unref_child() in bdrv_open_inherit() will dereference the freed
memory block at bs->file afterwards, which is not good.

We can now decide whether to add a "bs->file = NULL;" after each of the
offending bdrv_unref_child() invocations, or just drop them altogether.
The latter is simpler, so let's do that.

Cc: qemu-stable <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f13ce1be35b13f09c0a28269c74468f6766f0365
      
https://github.com/qemu/qemu/commit/f13ce1be35b13f09c0a28269c74468f6766f0365
  Author: Denis V. Lunev <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: fix alignment calculations in bdrv_co_do_zero_pwritev

tail_padding_bytes is calculated wrong. F.e. for
    offset = 0
    bytes = 2048
    align = 512
we will have tail_padding_bytes = 512 which is definitely wrong. The patch
fixes that arithmetics.

Fortunately this problem is harmless, we will have 1 extra allocation and
free thus there is no need to put this into stable. The problem is here
from the very beginning.

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 3258b91141090b05edcaab8f1d1dd355ca91b49a
      
https://github.com/qemu/qemu/commit/3258b91141090b05edcaab8f1d1dd355ca91b49a
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img/convert: Use @opts for one thing only

After storing the creation options for the new image into @opts, we
fetch some things for our own information, like the backing file name,
or whether to use encryption or preallocation.

With the -n parameter, there will not be any creation options; this is
not too bad because this just means that querying a NULL @opts will
always return the default value.

However, we also use @opts for the --object options. Therefore, @opts is
not necessarily NULL if -n was specified; instead, it may contain those
options. In practice, this probably does not cause any problems because
there most likely is no object that supports any of the parameters we
query here, but this is neither something we should rely on nor does
this variable reuse make the code very nice to read.

Therefore, just use a separate variable for the --object options.

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


  Commit: 48758a84738c5be8cf022062ed0b85ff2ebacc0c
      
https://github.com/qemu/qemu/commit/48758a84738c5be8cf022062ed0b85ff2ebacc0c
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M qemu-img.c
    M tests/qemu-iotests/122.out

  Log Message:
  -----------
  qemu-img/convert: Move bs_n > 1 && -B check down

It does not make much sense to use a backing image for the target when
you concatenate multiple images (because then there is no correspondence
between the source images' backing files and the target's); but it was
still possible to give one by using -o backing_file=X instead of -B X.

Fix this by moving the check.

(Also, change the error message because -B is not the only way to
 specify the backing file, evidently.)

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


  Commit: 2b4c0a20fbcfdba838d412d07739b2f4b6f7cd9a
      
https://github.com/qemu/qemu/commit/2b4c0a20fbcfdba838d412d07739b2f4b6f7cd9a
  Author: Max Reitz <address@hidden>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M qemu-img-cmds.hx
    M qemu-img.texi

  Log Message:
  -----------
  qemu-img: Document backing options

The create and convert subcommands have shorthands to set the
backing_file and, in the case of create, the backing_fmt options for the
new image. However, they have not been documented so far, which is
remedied by this patch.

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


  Commit: 55b9392b98e500399f2da1edc1d110bbfd40fb05
      
https://github.com/qemu/qemu/commit/55b9392b98e500399f2da1edc1d110bbfd40fb05
  Author: Max Reitz <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M block/vhdx.c

  Log Message:
  -----------
  block/vhdx: Make vhdx_create() always set errp

This patch makes vhdx_create() always set errp in case of an error. It
also adds errp parameters to vhdx_create_bat() and
vhdx_create_new_region_table() so we can pass on the error object
generated by blk_truncate() as of a future commit.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: ed3d2ec98a33fbdeabc471b11ff807075f07e996
      
https://github.com/qemu/qemu/commit/ed3d2ec98a33fbdeabc471b11ff807075f07e996
  Author: Max Reitz <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/block-backend.c
    M block/commit.c
    M block/crypto.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/vdi.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M blockdev.c
    M include/block/block.h
    M include/sysemu/block-backend.h
    M qemu-img.c
    M qemu-io-cmds.c

  Log Message:
  -----------
  block: Add errp to b{lk,drv}_truncate()

For one thing, this allows us to drop the error message generation from
qemu-img.c and blockdev.c and instead have it unified in
bdrv_truncate().

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 4bff28b81a0ddb48a09d279e99ab847e8a292506
      
https://github.com/qemu/qemu/commit/4bff28b81a0ddb48a09d279e99ab847e8a292506
  Author: Max Reitz <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/crypto.c
    M block/file-posix.c
    M block/file-win32.c
    M block/gluster.c
    M block/iscsi.c
    M block/nfs.c
    M block/qcow2.c
    M block/qed.c
    M block/raw-format.c
    M block/rbd.c
    M block/sheepdog.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: Add errp to BD.bdrv_truncate()

Add an Error parameter to the block drivers' bdrv_truncate() interface.
If a block driver does not set this in case of an error, the generic
bdrv_truncate() implementation will do so.

Where it is obvious, this patch also makes some block drivers set this
value.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: f59adb325618a2d2ba16aece551e7ab6acadb0ae
      
https://github.com/qemu/qemu/commit/f59adb325618a2d2ba16aece551e7ab6acadb0ae
  Author: Max Reitz <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M block.c
    M block/file-posix.c
    M block/gluster.c
    M block/iscsi.c
    M block/nfs.c
    M block/qcow2.c
    M block/qed.c
    M block/raw-format.c
    M block/rbd.c

  Log Message:
  -----------
  block: Add .bdrv_truncate() error messages

Add missing error messages for the block driver implementations of
.bdrv_truncate(); drop the generic one from block.c's bdrv_truncate().

Since one of these changes touches a mis-indented block in
block/file-posix.c, this patch fixes that coding style issue along the
way.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 048c5fd1bfc787adcb1b726ce997e87fe44545fd
      
https://github.com/qemu/qemu/commit/048c5fd1bfc787adcb1b726ce997e87fe44545fd
  Author: Eric Blake <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M block/qcow2.c
    M tests/qemu-iotests/066
    M tests/qemu-iotests/066.out

  Log Message:
  -----------
  qcow2: Allow discard of final unaligned cluster

As mentioned in commit 0c1bd46, we ignored requests to
discard the trailing cluster of an unaligned image.  While
discard is an advisory operation from the guest standpoint,
(and we are therefore free to ignore any request), our
qcow2 implementation exploits the fact that a discarded
cluster reads back as 0.  As long as we discard on cluster
boundaries, we are fine; but that means we could observe
non-zero data leaked at the tail of an unaligned image.

Enhance iotest 66 to cover this case, and fix the implementation
to honor a discard request on the final partial cluster.

Signed-off-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: d4a7f45ec9a54ca52e6381a792dc2aaea656338a
      
https://github.com/qemu/qemu/commit/d4a7f45ec9a54ca52e6381a792dc2aaea656338a
  Author: Klim Kireev <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M include/block/block_int.h

  Log Message:
  -----------
  block: fix obvious coding style mistakes in block_int.h

Signed-off-by: Klim Kireev <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 504c205a0d4a790dba2be0dc0aab8b8d1b905a7d
      
https://github.com/qemu/qemu/commit/504c205a0d4a790dba2be0dc0aab8b8d1b905a7d
  Author: Denis V. Lunev <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: assert no image modification under BDRV_O_INACTIVE

As long as BDRV_O_INACTIVE is set, the image file is only opened so we
have a file descriptor for it. We're definitely not supposed to modify
the image, it's still owned by the migration source.

This commit is an addition to 09e0c771 but the assert() is added to
bdrv_truncate().

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 9f1b92add20d244677c916e77d840b6282f691ac
      
https://github.com/qemu/qemu/commit/9f1b92add20d244677c916e77d840b6282f691ac
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: improve convert_iteration_sectors()

Do not do extra call to _get_block_status()

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-id: address@hidden
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: db933fbe0646fb75f93bbb8eb7d4d9db31c4d345
      
https://github.com/qemu/qemu/commit/db933fbe0646fb75f93bbb8eb7d4d9db31c4d345
  Author: Lidong Chen <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

When the buffer is zero, blk_co_pwrite_zeroes is more effective than
blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. This patch can reduce
the time for converting qcow2 images with lots of zero data.

Signed-off-by: Lidong Chen <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 4f38497b0fc03dcb24c9014c2cf34d324ab20c1e
      
https://github.com/qemu/qemu/commit/4f38497b0fc03dcb24c9014c2cf34d324ab20c1e
  Author: John Snow <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M tests/qemu-iotests/common

  Log Message:
  -----------
  iotests: clarify help text

Split the help text to highlight the groups of options
a little better, carving out a clear "format" and
"protocols" section.

Signed-off-by: John Snow <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: cc02e89eb4eb8b1cc43b2bc168dc0fca48ee721f
      
https://github.com/qemu/qemu/commit/cc02e89eb4eb8b1cc43b2bc168dc0fca48ee721f
  Author: John Snow <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M tests/qemu-iotests/common

  Log Message:
  -----------
  iotests: fix exclusion option

If you are running out-of-tree, the -x option to exclude
a certain iotest is broken.

Replace porcelain usage of ls with a sturdier awk command.

Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: John Snow <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 262fbae692722d5c8b647ba6b079409baefc3e3e
      
https://github.com/qemu/qemu/commit/262fbae692722d5c8b647ba6b079409baefc3e3e
  Author: Max Reitz <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M qemu-img.texi
    M util/qemu-progress.c

  Log Message:
  -----------
  progress: Show current progress on SIGINFO

Currently we only print progress information on retrieval of SIGUSR1.
Some systems have a dedicated SIGINFO for this, however, so it should be
handled appropriately if it is available.

Buglink: https://bugs.launchpad.net/qemu/+bug/1662468
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 5fc0fe383fff318b38291dcdf2cf38e329ec232a
      
https://github.com/qemu/qemu/commit/5fc0fe383fff318b38291dcdf2cf38e329ec232a
  Author: Kevin Wolf <address@hidden>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/block-backend.c
    M block/commit.c
    M block/crypto.c
    M block/file-posix.c
    M block/file-win32.c
    M block/gluster.c
    M block/iscsi.c
    M block/mirror.c
    M block/nfs.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/rbd.c
    M block/sheepdog.c
    M block/vdi.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M blockdev.c
    M include/block/block.h
    M include/block/block_int.h
    M include/sysemu/block-backend.h
    M qemu-img.c
    M qemu-img.texi
    M qemu-io-cmds.c
    M tests/qemu-iotests/066
    M tests/qemu-iotests/066.out
    M tests/qemu-iotests/common
    M util/qemu-progress.c

  Log Message:
  -----------
  Merge remote-tracking branch 'mreitz/tags/pull-block-2017-04-28' into 
queue-block

Block patches for the block queue

# gpg: Signature made Fri Apr 28 20:50:48 2017 CEST
# gpg:                using RSA key 0xF407DB0061D5CF40
# gpg: Good signature from "Max Reitz <address@hidden>"
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* mreitz/tags/pull-block-2017-04-28:
  progress: Show current progress on SIGINFO
  iotests: fix exclusion option
  iotests: clarify help text
  qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed
  qemu-img: improve convert_iteration_sectors()
  block: assert no image modification under BDRV_O_INACTIVE
  block: fix obvious coding style mistakes in block_int.h
  qcow2: Allow discard of final unaligned cluster
  block: Add .bdrv_truncate() error messages
  block: Add errp to BD.bdrv_truncate()
  block: Add errp to b{lk,drv}_truncate()
  block/vhdx: Make vhdx_create() always set errp

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


  Commit: 12a95f320a36ef66f724a49bb05e4fb553ac5dbe
      
https://github.com/qemu/qemu/commit/12a95f320a36ef66f724a49bb05e4fb553ac5dbe
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-04 (Thu, 04 May 2017)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/blkreplay.c
    M block/blkverify.c
    M block/block-backend.c
    M block/commit.c
    M block/crypto.c
    M block/file-posix.c
    M block/file-win32.c
    M block/gluster.c
    M block/io.c
    M block/iscsi.c
    M block/mirror.c
    M block/nfs.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/rbd.c
    M block/sheepdog.c
    M block/vdi.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M blockdev.c
    M include/block/block.h
    M include/block/block_int.h
    M include/sysemu/block-backend.h
    M migration/savevm.c
    M qemu-img-cmds.hx
    M qemu-img.c
    M qemu-img.texi
    M qemu-io-cmds.c
    M qemu-options.hx
    M tests/qemu-iotests/026
    M tests/qemu-iotests/026.out
    M tests/qemu-iotests/026.out.nocache
    M tests/qemu-iotests/028.out
    M tests/qemu-iotests/051
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/051.pc.out
    M tests/qemu-iotests/066
    M tests/qemu-iotests/066.out
    M tests/qemu-iotests/068
    M tests/qemu-iotests/068.out
    M tests/qemu-iotests/109
    M tests/qemu-iotests/109.out
    M tests/qemu-iotests/122.out
    M tests/qemu-iotests/130.out
    M tests/qemu-iotests/142
    M tests/qemu-iotests/142.out
    M tests/qemu-iotests/145
    M tests/qemu-iotests/145.out
    A tests/qemu-iotests/181
    A tests/qemu-iotests/181.out
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/common.qemu
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/group
    M util/qemu-progress.c
    M vl.c

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

Block layer patches

# gpg: Signature made Fri 28 Apr 2017 09:20:17 PM BST
# 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

* kwolf/tags/for-upstream: (34 commits)
  progress: Show current progress on SIGINFO
  iotests: fix exclusion option
  iotests: clarify help text
  qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed
  qemu-img: improve convert_iteration_sectors()
  block: assert no image modification under BDRV_O_INACTIVE
  block: fix obvious coding style mistakes in block_int.h
  qcow2: Allow discard of final unaligned cluster
  block: Add .bdrv_truncate() error messages
  block: Add errp to BD.bdrv_truncate()
  block: Add errp to b{lk,drv}_truncate()
  block/vhdx: Make vhdx_create() always set errp
  qemu-img: Document backing options
  qemu-img/convert: Move bs_n > 1 && -B check down
  qemu-img/convert: Use @opts for one thing only
  block: fix alignment calculations in bdrv_co_do_zero_pwritev
  block: Do not unref bs->file on error in BD's open
  iotests: 109: Filter out "len" of failed jobs
  iotests: Fix typo in 026
  Issue a deprecation warning if the user specifies the "-hdachs" option.
  ...

Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


Compare: https://github.com/qemu/qemu/compare/e619b14746e5...12a95f320a36

reply via email to

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