qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] e66417: block: Always pass NULL as drv for bd


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] e66417: block: Always pass NULL as drv for bdrv_open()
Date: Tue, 15 Sep 2015 03:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e6641719fed794be8e0c48a69761528ae6c95ed9
      
https://github.com/qemu/qemu/commit/e6641719fed794be8e0c48a69761528ae6c95ed9
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block.c
    M block/qcow2.c
    M block/vvfat.c
    M blockdev.c

  Log Message:
  -----------
  block: Always pass NULL as drv for bdrv_open()

Change all callers of bdrv_open() to pass the driver name in the options
QDict instead of passing its BlockDriver pointer.

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


  Commit: 6ebf9aa2ef7f3e094d91ea27140dc6e73774386a
      
https://github.com/qemu/qemu/commit/6ebf9aa2ef7f3e094d91ea27140dc6e73774386a
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/sheepdog.c
    M block/vdi.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

  Log Message:
  -----------
  block: Drop drv parameter from bdrv_open()

Now that this parameter is effectively unused, we can drop it and just
pass NULL on to bdrv_open_inherit().

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


  Commit: ce343771243a656b420c7a1b4099130f4a35bd5e
      
https://github.com/qemu/qemu/commit/ce343771243a656b420c7a1b4099130f4a35bd5e
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Drop drv parameter from bdrv_open_inherit()

Now that this parameter is effectively unused, we can drop it and just
pass NULL to bdrv_fill_options().

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


  Commit: 053e1578c9fa6a58e50e44de689f288063c77dbe
      
https://github.com/qemu/qemu/commit/053e1578c9fa6a58e50e44de689f288063c77dbe
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Drop drv parameter from bdrv_fill_options()

Now that this parameter is effectively unused, we can drop it and change
the function accordingly.

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


  Commit: cf25ff850f0b5d44cb79daea88daaf24ce7e4c44
      
https://github.com/qemu/qemu/commit/cf25ff850f0b5d44cb79daea88daaf24ce7e4c44
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

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

  Log Message:
  -----------
  block: Drop bdrv_find_whitelisted_format()

It is unused by now, so we can drop it.

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


  Commit: ff99129ab89a532f0ca0a0b89b9aa004c09d9b9d
      
https://github.com/qemu/qemu/commit/ff99129ab89a532f0ca0a0b89b9aa004c09d9b9d
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2-cache.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qcow2.h

  Log Message:
  -----------
  qcow2: Rename BDRVQcowState to BDRVQcow2State

BDRVQcowState is already used by qcow1, and gdb is always confused which
one to use. Rename the qcow2 one so they can be distinguished.

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


  Commit: 4d2cb0925176f3eb75ef8e5f9c02cc84d7930de2
      
https://github.com/qemu/qemu/commit/4d2cb0925176f3eb75ef8e5f9c02cc84d7930de2
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

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

  Log Message:
  -----------
  block: Allow specifying driver-specific options to reopen

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


  Commit: ff7cfd7d926eca40abeb9a1440829dc83facf54a
      
https://github.com/qemu/qemu/commit/ff7cfd7d926eca40abeb9a1440829dc83facf54a
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M qemu-io.c

  Log Message:
  -----------
  qemu-io: Remove duplicate 'open' error message

qemu_opts_parse_noisily() already prints an error message with the exact
reason why the parsing failed. No need to add another less specific one.

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


  Commit: 5bbd2e595e542ef6e5c76537e2bbad06192f72f4
      
https://github.com/qemu/qemu/commit/5bbd2e595e542ef6e5c76537e2bbad06192f72f4
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io: Add command 'reopen'

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


  Commit: f113ae839ec9d6d25169bfa521a1affb999201c2
      
https://github.com/qemu/qemu/commit/f113ae839ec9d6d25169bfa521a1affb999201c2
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Improve error message

Eric says that "any" sounds better than "either", and my non-native
feeling says the same, so let's change it.

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


  Commit: 4c75d1a157a6a0a6163c31f775b5e8ee5dd29f11
      
https://github.com/qemu/qemu/commit/4c75d1a157a6a0a6163c31f775b5e8ee5dd29f11
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Factor out qcow2_update_options()

Eventually we want to be able to change options at runtime. As a first
step towards that goal, separate some option handling code from the
general initialisation code in qcow2_open().

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


  Commit: 90efa0eaef2d1bbd161db6fd7a74d8e5a00d35a8
      
https://github.com/qemu/qemu/commit/90efa0eaef2d1bbd161db6fd7a74d8e5a00d35a8
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Move qcow2_update_options() call up

qcow2_update_options() only updates some variables in BDRVQcowState and
doesn't really depend on other parts of it being initialised yet, so it
can be moved so that it immediately follows the other half of option
handling code in qcow2_open().

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


  Commit: 94edf3fbe8277284ad7d33de632839c7b93414a9
      
https://github.com/qemu/qemu/commit/94edf3fbe8277284ad7d33de632839c7b93414a9
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Move rest of option handling to qcow2_update_options()

With this commit, the handling of driver-specific options in
qcow2_open() is completely separated out into qcow2_update_options().

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


  Commit: 007dbc396cfc613d72ecea7744fe7398b300aa7d
      
https://github.com/qemu/qemu/commit/007dbc396cfc613d72ecea7744fe7398b300aa7d
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Leave s unchanged on qcow2_update_options() failure

On return, either all new options should be applied to BDRVQcowState (on
success), or all of the old settings should be preserved (on failure).

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


  Commit: c1344ded70cf7d471aeb6fc08134997414631811
      
https://github.com/qemu/qemu/commit/c1344ded70cf7d471aeb6fc08134997414631811
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Fix memory leak in qcow2_update_options() error path

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


  Commit: ee55b17304d998ddf9c792496110da0cca37aac5
      
https://github.com/qemu/qemu/commit/ee55b17304d998ddf9c792496110da0cca37aac5
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Make qcow2_update_options() suitable for transactions

Before we can allow updating options at runtime with bdrv_reopen(), we
need to split the function into prepare/commit/abort parts.

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


  Commit: 5b0959a7d432062dcd740f8065004285b15695fa
      
https://github.com/qemu/qemu/commit/5b0959a7d432062dcd740f8065004285b15695fa
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Support updating driver-specific options in reopen

For updating the cache sizes, disabling lazy refcounts and updating the
clean_cache_timer there is a bit more to do than just changing the
variables, but otherwise we're all set for changing options during
bdrv_reopen().

Just implement the missing pieces and hook the functions up in
bdrv_reopen().

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


  Commit: e615053b1bd3e108a73958a54e3d0c5b965e15d3
      
https://github.com/qemu/qemu/commit/e615053b1bd3e108a73958a54e3d0c5b965e15d3
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/039
    M tests/qemu-iotests/039.out

  Log Message:
  -----------
  qemu-iotests: Reopen qcow2 with lazy-refcounts change

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


  Commit: 231f66d2a3401473778c70a75d5f670765ab6d91
      
https://github.com/qemu/qemu/commit/231f66d2a3401473778c70a75d5f670765ab6d91
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

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

  Log Message:
  -----------
  qemu-iotests: More qcow2 reopen tests

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


  Commit: b6d36def6d9e9fd187327182d0abafc9b7085d8f
      
https://github.com/qemu/qemu/commit/b6d36def6d9e9fd187327182d0abafc9b7085d8f
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2.h

  Log Message:
  -----------
  qcow2: Make size_to_clusters() return uint64_t

Sadly, some images may have more clusters than what can be represented
using a plain int. We should be prepared for that case (in
qcow2_check_refcounts() we actually were trying to catch that case, but
since size_to_clusters() truncated the returned value, that check never
did anything useful).

Cc: qemu-stable <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 097b500c2dff7addfcd5f4c8a111f6bfd0cb3977
      
https://github.com/qemu/qemu/commit/097b500c2dff7addfcd5f4c8a111f6bfd0cb3977
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

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

  Log Message:
  -----------
  iotests: Add test for checking large image files

Add a test for checking a qcow2 file with a multiple of 2^32 clusters.

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


  Commit: 3efffc3292d94271a15b1606b4a56adf6c6f04ed
      
https://github.com/qemu/qemu/commit/3efffc3292d94271a15b1606b4a56adf6c6f04ed
  Author: Radoslav Gerganov <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Fix next_cluster_sector for compressed write

When the VMDK is streamOptimized (or compressed), the
next_cluster_sector must not be incremented by a fixed number of
sectors. Instead of this, it must be rounded up to the next consecutive
sector. Fixing this results in much smaller compressed images.

Signed-off-by: Radoslav Gerganov <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2ac01520be8717f3492b10a083c3e0e22cb52cda
      
https://github.com/qemu/qemu/commit/2ac01520be8717f3492b10a083c3e0e22cb52cda
  Author: Max Reitz <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: Make qcow2_alloc_bytes() more explicit

In case of -EAGAIN returned by update_refcount(), we should discard the
cluster offset we were trying to allocate and request a new one, because
in theory that old offset might now be taken by a refcount block.

In practice, this was not the case due to update_refcount() generally
returning strictly monotonic increasing cluster offsets. However, this
behavior is not set in stone, and it is also not obvious when looking at
qcow2_alloc_bytes() alone, so we should not rely on it.

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


  Commit: 007e620a7576e4ce2ea6955541e87d8ae8ed32ae
      
https://github.com/qemu/qemu/commit/007e620a7576e4ce2ea6955541e87d8ae8ed32ae
  Author: Peter Maydell <address@hidden>
  Date:   2015-09-14 (Mon, 14 Sep 2015)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/commit.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-cache.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qcow2.h
    M block/qed.c
    M block/sheepdog.c
    M block/vdi.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 qemu-io-cmds.c
    M qemu-io.c
    M tests/qemu-iotests/039
    M tests/qemu-iotests/039.out
    A tests/qemu-iotests/137
    A tests/qemu-iotests/137.out
    A tests/qemu-iotests/138
    A tests/qemu-iotests/138.out
    M tests/qemu-iotests/group

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

Block layer patches (v2)

# gpg: Signature made Mon 14 Sep 2015 15:56:54 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream: (23 commits)
  qcow2: Make qcow2_alloc_bytes() more explicit
  vmdk: Fix next_cluster_sector for compressed write
  iotests: Add test for checking large image files
  qcow2: Make size_to_clusters() return uint64_t
  qemu-iotests: More qcow2 reopen tests
  qemu-iotests: Reopen qcow2 with lazy-refcounts change
  qcow2: Support updating driver-specific options in reopen
  qcow2: Make qcow2_update_options() suitable for transactions
  qcow2: Fix memory leak in qcow2_update_options() error path
  qcow2: Leave s unchanged on qcow2_update_options() failure
  qcow2: Move rest of option handling to qcow2_update_options()
  qcow2: Move qcow2_update_options() call up
  qcow2: Factor out qcow2_update_options()
  qcow2: Improve error message
  qemu-io: Add command 'reopen'
  qemu-io: Remove duplicate 'open' error message
  block: Allow specifying driver-specific options to reopen
  qcow2: Rename BDRVQcowState to BDRVQcow2State
  block: Drop bdrv_find_whitelisted_format()
  block: Drop drv parameter from bdrv_fill_options()
  ...

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


Compare: https://github.com/qemu/qemu/compare/2752e5bedb26...007e620a7576

reply via email to

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