qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c13e80: block: adding lzfse decompressing sup


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] c13e80: block: adding lzfse decompressing support as a mod...
Date: Sun, 16 Dec 2018 08:32:13 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c13e80d792d00fbdb48e8e81bcc0d7616cc29821
      
https://github.com/qemu/qemu/commit/c13e80d792d00fbdb48e8e81bcc0d7616cc29821
  Author: Julio Faracco <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    A block/dmg-lzfse.c

  Log Message:
  -----------
  block: adding lzfse decompressing support as a module.

QEMU dmg support includes zlib and bzip2, but it does not contains lzfse
support. This commit adds the source file to extend compression support
for new DMGs.

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


  Commit: 83bc1f9768f29d350494dba9b36d5da217fbb989
      
https://github.com/qemu/qemu/commit/83bc1f9768f29d350494dba9b36d5da217fbb989
  Author: Julio Faracco <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/Makefile.objs
    M configure

  Log Message:
  -----------
  configure: adding support to lzfse library.

This commit includes the support to lzfse opensource library. With this
library dmg block driver can decompress images with this type of
compression inside.

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


  Commit: 7a40b418ec95e80a7d164acb5104a9fa50ecc901
      
https://github.com/qemu/qemu/commit/7a40b418ec95e80a7d164acb5104a9fa50ecc901
  Author: Julio Faracco <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

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

  Log Message:
  -----------
  dmg: including dmg-lzfse module inside dmg block driver.

This commit includes the support to new module dmg-lzfse into dmg block
driver. It includes the support for block type ULFO (0x80000007).

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


  Commit: 95a156f689269da57e42dd1b001ea86c0877ed86
      
https://github.com/qemu/qemu/commit/95a156f689269da57e42dd1b001ea86c0877ed86
  Author: Julio Faracco <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/dmg.c

  Log Message:
  -----------
  dmg: exchanging hardcoded dmg UDIF block types to enum.

This change is better to understand what kind of block type is being
handled by the code. Using a syntax similar to the DMG documentation is
easier than tracking all hex values assigned to a block type.

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


  Commit: e4f9752c4a9c1b5d33bf6494aaff261b401933f2
      
https://github.com/qemu/qemu/commit/e4f9752c4a9c1b5d33bf6494aaff261b401933f2
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/replication.c

  Log Message:
  -----------
  block/replication: drop extra synchronization

After commit f8d59dfb40
    "block/backup: fix fleecing scheme: use serialized writes" fleecing
(specifically reading from backup target, when backup source is in
backing chain of backup target) is safe, because all backup-job writes
to target are serialized. Therefore we don't need additional
synchronization for these reads.

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


  Commit: 3a75187fd878be685e38d94583aa14bb87b892e9
      
https://github.com/qemu/qemu/commit/3a75187fd878be685e38d94583aa14bb87b892e9
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

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

  Log Message:
  -----------
  block/backup: drop unused synchronization interface

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


  Commit: 19a44488532eeccb522c6ee6c36f08b6c69809b0
      
https://github.com/qemu/qemu/commit/19a44488532eeccb522c6ee6c36f08b6c69809b0
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: use Z_OK instead of 0 for deflateInit2 return code check

Use appropriate macro, corresponding to deflateInit2 spec.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6994fd78b9a98e9cd32ee45c23edba1919cfbdd0
      
https://github.com/qemu/qemu/commit/6994fd78b9a98e9cd32ee45c23edba1919cfbdd0
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: make more generic interface for qcow2_compress

Give explicit size both for source and destination buffers, to make it
similar with decompression path and than cleanly reuse parameter
structure for decompression threads.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f4b3e2a960ed571397292150539455a2dd981338
      
https://github.com/qemu/qemu/commit/f4b3e2a960ed571397292150539455a2dd981338
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

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

  Log Message:
  -----------
  qcow2: move decompression from qcow2-cluster.c to qcow2.c

Compression is done in threads in qcow2.c. We want to do decompression
in the same way, so, firstly, move it to the same file.

The only change is braces around if-body in decompress_buffer, to
satisfy checkpatch.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 341926ab83e2b4d5af1f8c7633e8b6d72d318458
      
https://github.com/qemu/qemu/commit/341926ab83e2b4d5af1f8c7633e8b6d72d318458
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: refactor decompress_buffer

- make it look more like a pair of qcow2_compress - rename the function
  and its parameters
- drop extra out_len variable, check filling of output buffer by strm
  structure itself
- fix code style
- add some documentation

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c068a1cd5203cc406a648a641e773ba906cf4aaa
      
https://github.com/qemu/qemu/commit/c068a1cd5203cc406a648a641e773ba906cf4aaa
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: use byte-based read in qcow2_decompress_cluster

We are gradually moving away from sector-based interfaces, towards
byte-based.  Get rid of it here too.

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


  Commit: c3c10f7295421f3b6638716d59cac9531c34adc8
      
https://github.com/qemu/qemu/commit/c3c10f7295421f3b6638716d59cac9531c34adc8
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

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

  Log Message:
  -----------
  qcow2: aio support for compressed cluster read

Allocate buffers locally and release qcow2 lock. Than, reads inside
qcow2_co_preadv_compressed may be done in parallel, however all
decompression is still done synchronously. Let's improve it in the
following commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e23c9d7a1c827ac41cc4719d4c4800139b232857
      
https://github.com/qemu/qemu/commit/e23c9d7a1c827ac41cc4719d4c4800139b232857
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: do decompression in threads

Do decompression in threads, like it is already done for compression.
This improves asynchronous compressed reads performance.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d57c44d00f0daddd6d31b326ef844bf2facf6d8a
      
https://github.com/qemu/qemu/commit/d57c44d00f0daddd6d31b326ef844bf2facf6d8a
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Reorganise RawPosixAIOData

RawPosixAIOData contains a lot of fields for several separate operations
that are to be processed in a worker thread and that need different
parameters. The struct is currently rather unorganised, with unions that
cover some, but not all operations, and even one #define for field names
instead of a union.

Clean this up to have some common fields and a single union. As a side
effect, on x86_64 the struct shrinks from 72 to 48 bytes.

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


  Commit: 5d5de250056b0972cde2e88133db702960a32b72
      
https://github.com/qemu/qemu/commit/5d5de250056b0972cde2e88133db702960a32b72
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Factor out raw_thread_pool_submit()

Getting the thread pool of the AioContext of a block node and scheduling
some work in it is an operation that is already done twice, and we'll
get more instances. Factor it out into a separate function.

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


  Commit: 29cb4c01e7b38589fa4fe3f9ea82f69dc2df3051
      
https://github.com/qemu/qemu/commit/29cb4c01e7b38589fa4fe3f9ea82f69dc2df3051
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Avoid aio_worker() for QEMU_AIO_TRUNCATE

aio_worker() doesn't add anything interesting, it's only a useless
indirection. Call the handler function directly instead.

As we know that this handler function is only called from coroutine
context and the coroutine stays around until the worker thread finishes,
we can keep RawPosixAIOData on the stack.

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


  Commit: 58a209c43747c311ceb6f6a6f3e5904b354efce2
      
https://github.com/qemu/qemu/commit/58a209c43747c311ceb6f6a6f3e5904b354efce2
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Avoid aio_worker() for QEMU_AIO_COPY_RANGE

aio_worker() doesn't add anything interesting, it's only a useless
indirection. Call the handler function directly instead.

As we know that this handler function is only called from coroutine
context and the coroutine stays around until the worker thread finishes,
we can keep RawPosixAIOData on the stack.

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


  Commit: 7154d8ae66c75c97b08c8f1c80dd6f46f0dbffca
      
https://github.com/qemu/qemu/commit/7154d8ae66c75c97b08c8f1c80dd6f46f0dbffca
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Avoid aio_worker() for QEMU_AIO_WRITE_ZEROES

aio_worker() doesn't add anything interesting, it's only a useless
indirection. Call the handler function directly instead.

As we know that this handler function is only called from coroutine
context and the coroutine stays around until the worker thread finishes,
we can keep RawPosixAIOData on the stack.

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


  Commit: 46ee0f462bfa1e374fa0f5df5834b061a632af6d
      
https://github.com/qemu/qemu/commit/46ee0f462bfa1e374fa0f5df5834b061a632af6d
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Avoid aio_worker() for QEMU_AIO_DISCARD

aio_worker() doesn't add anything interesting, it's only a useless
indirection. Call the handler function directly instead.

As we know that this handler function is only called from coroutine
context and the coroutine stays around until the worker thread finishes,
we can keep RawPosixAIOData on the stack.

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


  Commit: 06dc9bd57182eb1a09cd0f7b1cb145937ed4e618
      
https://github.com/qemu/qemu/commit/06dc9bd57182eb1a09cd0f7b1cb145937ed4e618
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Avoid aio_worker() for QEMU_AIO_FLUSH

aio_worker() doesn't add anything interesting, it's only a useless
indirection. Call the handler function directly instead.

As we know that this handler function is only called from coroutine
context and the coroutine stays around until the worker thread finishes,
we can keep RawPosixAIOData on the stack.

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


  Commit: 54c7ca1b8135e728b70320418d6424ad78cc4629
      
https://github.com/qemu/qemu/commit/54c7ca1b8135e728b70320418d6424ad78cc4629
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Move read/write operation logic out of aio_worker()

aio_worker() for reads and writes isn't boring enough yet. It still does
some postprocessing for handling short reads and turning the result into
the right return value.

However, there is no reason why handle_aiocb_rw() couldn't do the same,
and even without duplicating code between the read and write path. So
move the code there.

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


  Commit: 999e6b69ce5adc0c68cdd90211569f61f006858b
      
https://github.com/qemu/qemu/commit/999e6b69ce5adc0c68cdd90211569f61f006858b
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Avoid aio_worker() for QEMU_AIO_READ/WRITE

aio_worker() doesn't add anything interesting, it's only a useless
indirection. Call the handler function directly instead.

As we know that this handler function is only called from coroutine
context and the coroutine stays around until the worker thread finishes,
we can keep RawPosixAIOData on the stack.

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


  Commit: c9db2b6489f7d04b5fd3288565cb163476a04dc1
      
https://github.com/qemu/qemu/commit/c9db2b6489f7d04b5fd3288565cb163476a04dc1
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Remove paio_submit_co()

The function is not used any more, remove it.

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


  Commit: 2f3a7ab39bec4ba8022dc4d42ea641165b004e3e
      
https://github.com/qemu/qemu/commit/2f3a7ab39bec4ba8022dc4d42ea641165b004e3e
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c
    M include/scsi/pr-manager.h
    M scsi/pr-manager.c
    M scsi/trace-events

  Log Message:
  -----------
  file-posix: Switch to .bdrv_co_ioctl

No real reason to keep using the callback based mechanism here when the
rest of the file-posix driver is coroutine based. Changing it brings
ioctls more in line with how other request types work.

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


  Commit: 0342567115feaf24bafcb25be903a9d732ac78ca
      
https://github.com/qemu/qemu/commit/0342567115feaf24bafcb25be903a9d732ac78ca
  Author: Kevin Wolf <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Avoid aio_worker() for QEMU_AIO_IOCTL

aio_worker() doesn't add anything interesting, it's only a useless
indirection. Call the handler function directly instead.

As we know that this handler function is only called from coroutine
context and the coroutine stays around until the worker thread finishes,
we can keep RawPosixAIOData on the stack.

This was the last user of aio_worker(), so the function goes away now.

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


  Commit: 6e1000a863f9dcdb4a6f51cd7cd0782f23120ba5
      
https://github.com/qemu/qemu/commit/6e1000a863f9dcdb4a6f51cd7cd0782f23120ba5
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

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

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

Most callers of bdrv_reopen() only use it to switch a BlockDriverState
between read-only and read-write, so this patch adds a new function
that does just that.

We also want to get rid of the flags parameter in the bdrv_reopen()
API, so this function sets the "read-only" option and passes the
original flags (which will then be updated in bdrv_reopen_prepare()).

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


  Commit: e94d3dba6a91e3c0be59b20cc841c9da8a49f7aa
      
https://github.com/qemu/qemu/commit/e94d3dba6a91e3c0be59b20cc841c9da8a49f7aa
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Use bdrv_reopen_set_read_only() in bdrv_backing_update_filename()

This patch replaces the bdrv_reopen() calls that set and remove the
BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function.

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


  Commit: e70cdc57daa5d5a16caf3e681ed2ec3522cd75ad
      
https://github.com/qemu/qemu/commit/e70cdc57daa5d5a16caf3e681ed2ec3522cd75ad
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  block: Use bdrv_reopen_set_read_only() in commit_start/complete()

This patch replaces the bdrv_reopen() calls that set and remove the
BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function.

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


  Commit: c742a3643f113fe92cf904dd897fa03c2784d30d
      
https://github.com/qemu/qemu/commit/c742a3643f113fe92cf904dd897fa03c2784d30d
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  block: Use bdrv_reopen_set_read_only() in bdrv_commit()

This patch replaces the bdrv_reopen() calls that set and remove the
BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function.

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


  Commit: e7d22f8bc60351c8c16c6130efb09f08ba09d789
      
https://github.com/qemu/qemu/commit/e7d22f8bc60351c8c16c6130efb09f08ba09d789
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/stream.c

  Log Message:
  -----------
  block: Use bdrv_reopen_set_read_only() in stream_start/complete()

This patch replaces the bdrv_reopen() calls that set and remove the
BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function.

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


  Commit: 051a60f6a342c83fc489e1533b9f2799fa2b2b9b
      
https://github.com/qemu/qemu/commit/051a60f6a342c83fc489e1533b9f2799fa2b2b9b
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Use bdrv_reopen_set_read_only() in qmp_change_backing_file()

This patch replaces the bdrv_reopen() calls that set and remove the
BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function.

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


  Commit: 1b57774f79e6fb5e848149e0bf227e0534e9ade5
      
https://github.com/qemu/qemu/commit/1b57774f79e6fb5e848149e0bf227e0534e9ade5
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Use bdrv_reopen_set_read_only() in external_snapshot_commit()

This patch replaces the bdrv_reopen() call that set and remove the
BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function.

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


  Commit: 1ba793889583cf9b548bf61bd5c8f224ad6c1415
      
https://github.com/qemu/qemu/commit/1ba793889583cf9b548bf61bd5c8f224ad6c1415
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block: Use bdrv_reopen_set_read_only() in the mirror driver

The 'block-commit' QMP command is implemented internally using two
different drivers. If the source image is the active layer then the
mirror driver is used (commit_active_start()), otherwise the commit
driver is used (commit_start()).

In both cases the destination image must be put temporarily in
read-write mode. This is done correctly in the latter case, but what
commit_active_start() does is copy all flags instead.

This patch replaces the bdrv_reopen() calls in that function with
bdrv_reopen_set_read_only() so that only the read-only status is
changed.

A similar change is made in mirror_exit(), which is also used by the
'drive-mirror' and 'blockdev-mirror' commands.

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


  Commit: 295cf237c2e5112de3e2aa7c3dbc80580b80bf88
      
https://github.com/qemu/qemu/commit/295cf237c2e5112de3e2aa7c3dbc80580b80bf88
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

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

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

No one is using this function anymore, so we can safely remove it.

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


  Commit: dc900c35239bc865df2dff5880eabcd25b974f19
      
https://github.com/qemu/qemu/commit/dc900c35239bc865df2dff5880eabcd25b974f19
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M qemu-io-cmds.c
    M tests/qemu-iotests/133
    M tests/qemu-iotests/133.out

  Log Message:
  -----------
  qemu-io: Put flag changes in the options QDict in reopen_f()

When reopen_f() puts a block device in the reopen queue, some of the
new options are passed using a QDict, but others ("read-only" and the
cache options) are passed as flags.

This patch puts those flags in the QDict. This way the flags parameter
becomes redundant and we'll be able to get rid of it in a subsequent
patch.

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


  Commit: 3c4e964762c7d0292185473657dd2afc0d2d060b
      
https://github.com/qemu/qemu/commit/3c4e964762c7d0292185473657dd2afc0d2d060b
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/replication.c

  Log Message:
  -----------
  block: Clean up reopen_backing_file() in block/replication.c

This function is used to put the hidden and secondary disks in
read-write mode before launching the backup job, and back in read-only
mode afterwards.

This patch does the following changes:

  - Use an options QDict with the "read-only" option instead of
    passing the changes as flags only.

  - Simplify the code (it was unnecessarily complicated and verbose).

  - Fix a bug due to which the secondary disk was not being put back
    in read-only mode when writable=false (because in this case
    orig_secondary_flags always had the BDRV_O_RDWR flag set).

  - Stop clearing the BDRV_O_INACTIVE flag.

The flags parameter to bdrv_reopen_queue() becomes redundant and we'll
be able to get rid of it in a subsequent patch.

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


  Commit: 2e891722c5e3d0372e042173a425925e14749bf0
      
https://github.com/qemu/qemu/commit/2e891722c5e3d0372e042173a425925e14749bf0
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block.c
    M block/replication.c
    M include/block/block.h
    M qemu-io-cmds.c

  Log Message:
  -----------
  block: Remove flags parameter from bdrv_reopen_queue()

Now that all callers are passing all flag changes as QDict options,
the flags parameter is no longer necessary, so we can get rid of it.

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


  Commit: 9aa09ddd1edf1256cb6e4e23293720fee130f07c
      
https://github.com/qemu/qemu/commit/9aa09ddd1edf1256cb6e4e23293720fee130f07c
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Stop passing flags to bdrv_reopen_queue_child()

Now that all callers are passing the new options using the QDict we no
longer need the 'flags' parameter.

This patch makes the following changes:

   1) The update_options_from_flags() call is no longer necessary
      so it can be removed.

   2) The update_flags_from_options() call is now used in all cases,
      and is moved down a few lines so it happens after the options
      QDict contains the final set of values.

   3) The flags parameter is removed. Now the flags are initialized
      using the current value (for the top-level node) or the parent
      flags (after inherit_options()). In both cases the initial
      values are updated to reflect the new options in the QDict. This
      happens in bdrv_reopen_queue_child() (as explained above) and in
      bdrv_reopen_prepare().

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


  Commit: 8eb4b07b6f9466f850be5cfb7d471cdd97086178
      
https://github.com/qemu/qemu/commit/8eb4b07b6f9466f850be5cfb7d471cdd97086178
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

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

  Log Message:
  -----------
  block: Remove assertions from update_flags_from_options()

This function takes four options (cache.direct, cache.no-flush,
read-only and auto-read-only) from a QemuOpts object and updates the
flags accordingly.

If any of those options is not set (because it was missing from the
original QDict or because it had an invalid value) then the function
aborts with a failed assertion:

   $ qemu-io -c 'reopen -o read-only=foo' hd.qcow2
   block.c:1126: update_flags_from_options: Assertion `qemu_opt_find(opts, 
BDRV_OPT_CACHE_DIRECT)' failed.
   Aborted

This assertion is unnecessary, and it forces any caller of
bdrv_reopen() to pass all the aforementioned four options. This may
have made sense in order to remove ambiguity when bdrv_reopen() was
taking both flags and options, but that's not the case anymore.

It's also unnecessary if we want to validate the option values,
because bdrv_reopen_prepare() already takes care of that, as we can
see if we remove the assertions:

   $ qemu-io -c 'reopen -o read-only=foo' hd.qcow2
   Parameter 'read-only' expects 'on' or 'off'

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


  Commit: e6d79c41c961bcdacb60b46c88009b33841f90a7
      
https://github.com/qemu/qemu/commit/e6d79c41c961bcdacb60b46c88009b33841f90a7
  Author: Alberto Garcia <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Assert that flags are up-to-date in bdrv_reopen_prepare()

Towards the end of bdrv_reopen_queue_child(), before starting to
process the children, the update_flags_from_options() function is
called in order to have BDRVReopenState.flags in sync with the options
from the QDict.

This is necessary because during the reopen process flags must be
updated for all nodes in the queue so bdrv_is_writable_after_reopen()
and the permission checks work correctly.

Because of that, calling update_flags_from_options() again in
bdrv_reopen_prepare() doesn't really change the flags (they are
already up-to-date). But we need to call it in order to remove those
options from QemuOpts and that way indicate that they have been
processed.

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


  Commit: 2c26e648e4350079b0c86a6627b2d3566c3709c0
      
https://github.com/qemu/qemu/commit/2c26e648e4350079b0c86a6627b2d3566c3709c0
  Author: Christian Borntraeger <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M tests/qemu-iotests/235

  Log Message:
  -----------
  iotests: make 235 work on s390 (and others)

"-machine pc" will not work all architectures. Lets fall back to the
default machine by not specifying it.

In addition we also need to specify -no-shutdown on s390 as qemu will
exit otherwise.

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


  Commit: 537c3d4f64297911a5b70a151926cd7851bbf752
      
https://github.com/qemu/qemu/commit/537c3d4f64297911a5b70a151926cd7851bbf752
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror: add missing coroutine_fn annotations

Marking a function coroutine_fn currently has no effect on the compiler,
but it documents that this function must be called from coroutine
context and it may yield.  This is important information for the
programmer.

Also, if we ever transition to a stackless coroutine implementation,
then it's likely that the annotation will become mandatory so the
compiler can use the correct calling convention for coroutine functions.

Cc: Max Reitz <address@hidden>
Cc: John Snow <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 58b1f0f21edcab13f78a376b1d90267626be1275
      
https://github.com/qemu/qemu/commit/58b1f0f21edcab13f78a376b1d90267626be1275
  Author: Peter Maydell <address@hidden>
  Date:   2018-12-16 (Sun, 16 Dec 2018)

  Changed paths:
    M block.c
    M block/Makefile.objs
    M block/backup.c
    M block/commit.c
    A block/dmg-lzfse.c
    M block/dmg.c
    M block/dmg.h
    M block/file-posix.c
    M block/mirror.c
    M block/qcow2-cluster.c
    M block/qcow2.c
    M block/qcow2.h
    M block/replication.c
    M block/stream.c
    M blockdev.c
    M configure
    M include/block/block.h
    M include/block/block_backup.h
    M include/scsi/pr-manager.h
    M qemu-io-cmds.c
    M scsi/pr-manager.c
    M scsi/trace-events
    M tests/qemu-iotests/133
    M tests/qemu-iotests/133.out
    M tests/qemu-iotests/235

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

Block layer patches:

- qcow2: Decompression worker threads
- dmg: lzfse compression support
- file-posix: Simplify delegation to worker thread
- Don't pass flags to bdrv_reopen_queue()
- iotests: make 235 work on s390 (and others)

# gpg: Signature made Fri 14 Dec 2018 10:55:09 GMT
# gpg:                using RSA key 7F09B272C88F2FD6
# 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: (42 commits)
  block/mirror: add missing coroutine_fn annotations
  iotests: make 235 work on s390 (and others)
  block: Assert that flags are up-to-date in bdrv_reopen_prepare()
  block: Remove assertions from update_flags_from_options()
  block: Stop passing flags to bdrv_reopen_queue_child()
  block: Remove flags parameter from bdrv_reopen_queue()
  block: Clean up reopen_backing_file() in block/replication.c
  qemu-io: Put flag changes in the options QDict in reopen_f()
  block: Drop bdrv_reopen()
  block: Use bdrv_reopen_set_read_only() in the mirror driver
  block: Use bdrv_reopen_set_read_only() in external_snapshot_commit()
  block: Use bdrv_reopen_set_read_only() in qmp_change_backing_file()
  block: Use bdrv_reopen_set_read_only() in stream_start/complete()
  block: Use bdrv_reopen_set_read_only() in bdrv_commit()
  block: Use bdrv_reopen_set_read_only() in commit_start/complete()
  block: Use bdrv_reopen_set_read_only() in bdrv_backing_update_filename()
  block: Add bdrv_reopen_set_read_only()
  file-posix: Avoid aio_worker() for QEMU_AIO_IOCTL
  file-posix: Switch to .bdrv_co_ioctl
  file-posix: Remove paio_submit_co()
  ...

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


Compare: https://github.com/qemu/qemu/compare/3866e6bebd0c...58b1f0f21edc
      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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