qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 7e3e73: qcow2-refcount: fix check_oflag_copie


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7e3e73: qcow2-refcount: fix check_oflag_copied
Date: Thu, 09 May 2019 09:12:15 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7e3e736cbd37a633ed5673de4254424745fbf520
      
https://github.com/qemu/qemu/commit/7e3e736cbd37a633ed5673de4254424745fbf520
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2-refcount: fix check_oflag_copied

Increase corruptions_fixed only after successful fix.

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


  Commit: a5fff8d4b4d928311a5005efa12d0991fe3b66f9
      
https://github.com/qemu/qemu/commit/a5fff8d4b4d928311a5005efa12d0991fe3b66f9
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

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

  Log Message:
  -----------
  qcow2-refcount: avoid eating RAM

qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat
an unpredictable amount of memory on corrupted table entries, which are
referencing regions far beyond the end of file.

Prevent this, by skipping such regions from further processing.

Interesting that iotest 138 checks exactly the behavior which we fix
here. So, change the test appropriately.

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


  Commit: 1ef337b7a023e91db7f30f2dc0f5fc417194d412
      
https://github.com/qemu/qemu/commit/1ef337b7a023e91db7f30f2dc0f5fc417194d412
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2-refcount: check_refcounts_l2: reduce ignored overlaps

Reduce number of structures ignored in overlap check: when checking
active table ignore active tables, when checking inactive table ignore
inactive ones.

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


  Commit: cbb51e9f9373996c36e79601cf07e499aa5809a1
      
https://github.com/qemu/qemu/commit/cbb51e9f9373996c36e79601cf07e499aa5809a1
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2-refcount: check_refcounts_l2: don't count fixed cluster as allocated

Do not count a cluster which is fixed to be ZERO as allocated.

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


  Commit: 54b10010eb85e002c847339927f31aef33713afc
      
https://github.com/qemu/qemu/commit/54b10010eb85e002c847339927f31aef33713afc
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2-refcount: don't mask corruptions under internal errors

No reasons for not reporting found corruptions as corruptions in case
of some internal errors, especially in case of just failed to fix l2
entry (and in this case, missed corruptions may influence comparing
logic, when we calculate difference between corruptions fields of two
results)

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


  Commit: 444b82369b9f4f487538f2cb23647862c48aca1c
      
https://github.com/qemu/qemu/commit/444b82369b9f4f487538f2cb23647862c48aca1c
  Author: Andrey Shinkevich <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/qcow2-bitmap.c

  Log Message:
  -----------
  qcow2: discard bitmap when removed

Bitmap data may take a lot of disk space, so it's better to discard it
always.

Signed-off-by: Andrey Shinkevich <address@hidden>
Message-id: address@hidden
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
[mreitz: Use the commit message proposed by Vladimir]
Signed-off-by: Max Reitz <address@hidden>


  Commit: b8c1f90118ee81090ff9093790f88bf335132814
      
https://github.com/qemu/qemu/commit/b8c1f90118ee81090ff9093790f88bf335132814
  Author: Max Reitz <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/ssh.c
    M tests/qemu-iotests/207
    M tests/qemu-iotests/207.out
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  block/ssh: Implement .bdrv_refresh_filename()

This requires some changes to keep iotests 104 and 207 working.

qemu-img info in 104 will now return a filename including the user name
and the port, which need to be filtered by adjusting REMOTE_TEST_DIR in
common.rc.  This additional information has to be marked optional,
however (which is simple as REMOTE_TEST_DIR is a regex), because
otherwise 197 and 215 would fail: They use it (indirectly) to filter
qemu-img create output which contains a backing filename they have
passed to it -- which probably does not contain a user name or port
number.

The problem in 207 is a nice one to have: qemu-img info used to return
json:{} filenames, but with this patch it returns nice plain ones.  We
now need to adjust the filtering to hide the user name (and port number
while we are at it).  The simplest way to do this is to include both in
iotests.remote_filename() so that bdrv_refresh_filename() will not
change it, and then iotests.img_info_log() will filter it correctly
automatically.

Signed-off-by: Max Reitz <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 21205c7c3bd0910d7b71274ddbede9c7001e1cb4
      
https://github.com/qemu/qemu/commit/21205c7c3bd0910d7b71274ddbede9c7001e1cb4
  Author: Max Reitz <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/ssh.c

  Log Message:
  -----------
  block/ssh: Implement .bdrv_dirname()

ssh_bdrv_dirname() is basically the generic bdrv_dirname(), except it
takes care not to silently chop off any query string (i.e.,
host_key_check).

Signed-off-by: Max Reitz <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 0b3ca76e52f025caf234b77d471465e983a711d0
      
https://github.com/qemu/qemu/commit/0b3ca76e52f025caf234b77d471465e983a711d0
  Author: Alberto Garcia <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Assert that drv->bdrv_child_perm is set in bdrv_child_perm()

There is no need to check for this because all block drivers that have
children implement bdrv_child_perm and all callers already ensure that
bs->drv is set.

Furthermore, if this check would fail then the callers would end up
with uninitialized values for nperm and nshared.

This patch replaces the check with an assertion.

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 6a63419980499b4fad1416326dc98609380c4df8
      
https://github.com/qemu/qemu/commit/6a63419980499b4fad1416326dc98609380c4df8
  Author: Alberto Garcia <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Use bdrv_append() in commit_start()

This function combines bdrv_set_backing_hd() and bdrv_replace_node()
so we can use it to simplify the code a bit in commit_start().

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 1278dce7927301bf3d004a40061dbd2c1e0846a8
      
https://github.com/qemu/qemu/commit/1278dce7927301bf3d004a40061dbd2c1e0846a8
  Author: Max Reitz <address@hidden>
  Date:   2019-05-07 (Tue, 07 May 2019)

  Changed paths:
    M tests/qemu-iotests/110
    M tests/qemu-iotests/126

  Log Message:
  -----------
  iotests: Fix iotests 110 and 126

A recent patch results in qemu-img reporting the backing file format of
vmdk images as vmdk.  This broke iotests 110 and 126.

Fixes: 7502be838e2fb62cc00f9e55f632e0b88ead5e6e
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 812b835fb4d23dd108b2f9802158472d50b73579
      
https://github.com/qemu/qemu/commit/812b835fb4d23dd108b2f9802158472d50b73579
  Author: Peter Maydell <address@hidden>
  Date:   2019-05-09 (Thu, 09 May 2019)

  Changed paths:
    M block.c
    M block/commit.c
    M block/qcow2-bitmap.c
    M block/qcow2-refcount.c
    M block/ssh.c
    M tests/qemu-iotests/110
    M tests/qemu-iotests/126
    M tests/qemu-iotests/138
    M tests/qemu-iotests/138.out
    M tests/qemu-iotests/207
    M tests/qemu-iotests/207.out
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-07' 
into staging

Block patches:
- Fixes to qcow2's implementation of qemu-img check
- Our SSH driver now supports bdrv_refresh_filename()
- Miscellaneous fixes

# gpg: Signature made Tue 07 May 2019 16:16:58 BST
# gpg:                using RSA key F407DB0061D5CF40
# gpg: Good signature from "Max Reitz <address@hidden>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2019-05-07:
  iotests: Fix iotests 110 and 126
  commit: Use bdrv_append() in commit_start()
  block: Assert that drv->bdrv_child_perm is set in bdrv_child_perm()
  block/ssh: Implement .bdrv_dirname()
  block/ssh: Implement .bdrv_refresh_filename()
  qcow2: discard bitmap when removed
  qcow2-refcount: don't mask corruptions under internal errors
  qcow2-refcount: check_refcounts_l2: don't count fixed cluster as allocated
  qcow2-refcount: check_refcounts_l2: reduce ignored overlaps
  qcow2-refcount: avoid eating RAM
  qcow2-refcount: fix check_oflag_copied

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


Compare: https://github.com/qemu/qemu/compare/9d86d9eac955...812b835fb4d2



reply via email to

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