qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] cbee81: iscsi: Don't set error if already set


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] cbee81: iscsi: Don't set error if already set in iscsi_do_...
Date: Sat, 05 Apr 2014 03:00:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: cbee81f6de57ddc1b21ba28f01f6a3b5d87428a5
      
https://github.com/qemu/qemu/commit/cbee81f6de57ddc1b21ba28f01f6a3b5d87428a5
  Author: Fam Zheng <address@hidden>
  Date:   2014-04-04 (Fri, 04 Apr 2014)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: Don't set error if already set in iscsi_do_inquiry

This eliminates the possible assertion failure in error_setg().

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4c2e5f8f46a17966dc45b5a3e07b97434c0eabdf
      
https://github.com/qemu/qemu/commit/4c2e5f8f46a17966dc45b5a3e07b97434c0eabdf
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-04 (Fri, 04 Apr 2014)

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

  Log Message:
  -----------
  qcow2: Flush metadata during read-only reopen

If lazy refcounts are enabled for a backing file, committing to this
backing file may leave it in a dirty state even if the commit succeeds.
The reason is that the bdrv_flush() call in bdrv_commit() doesn't flush
refcount updates with lazy refcounts enabled, and qcow2_reopen_prepare()
doesn't take care to flush metadata.

In order to fix this, this patch also fixes qcow2_mark_clean(), which
contains another ineffective bdrv_flush() call beause lazy refcounts are
disabled only afterwards. All existing callers of qcow2_mark_clean()
either don't modify refcounts or already flush manually, so that this
fixes only a latent, but not yet actually triggerable bug.

Another instance of the same problem is live snapshots. Again, a real
corruption is prevented by an explicit flush for non-read-only images in
external_snapshot_prepare(), but images using lazy refcounts stay dirty.

Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: 8885eadedd0ea8b57c1baa367ee2c2d616700bd9
      
https://github.com/qemu/qemu/commit/8885eadedd0ea8b57c1baa367ee2c2d616700bd9
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-04 (Fri, 04 Apr 2014)

  Changed paths:
    M block/qcow2-cluster.c

  Log Message:
  -----------
  qcow2: Put cache reference in error case

When qcow2_get_cluster_offset() sees a zero cluster in a version 2
image, it (rightfully) returns an error. But in doing so it shouldn't
leak an L2 table cache reference.

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


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

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

  Log Message:
  -----------
  block: Don't parse 'filename' option

When using the QDict option 'filename', it is supposed to be interpreted
literally. The code did correctly avoid guessing the protocol from any
string before the first colon, but it still called bdrv_parse_filename()
which would, for example, incorrectly remove a 'file:' prefix in the
raw-posix driver.

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


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

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

  Log Message:
  -----------
  qemu-iotests: Remove CR line endings in reference output

qemu doesn't print these CRs any more. The test still didn't fail
because the output comparison ignores line endings, but the change turns
up each time when you want to update the output.

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


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

  Changed paths:
    M block.c
    M include/block/block.h
    M tests/qemu-iotests/051
    M tests/qemu-iotests/051.out

  Log Message:
  -----------
  block: Fix snapshot=on for protocol parsed from filename

Since commit 9fd3171a, BDRV_O_SNAPSHOT uses an option QDict to specify
the originally requested image as the backing file of the newly created
temporary snapshot. This means that the filename is stored in
"file.filename", which is an option that is not parsed for protocol
names. Therefore things like -drive file=nbd:localhost:10809 were
broken because it looked for a local file with the literal name
'nbd:localhost:10809'.

This patch changes the way BDRV_O_SNAPSHOT works once again. We now open
the originally requested image as normal, and then do a similar
operation as for live snapshots to put the temporary snapshot on top.
This way, both driver specific options and parsed filenames work.

As a nice side effect, this results in code movement to factor
bdrv_append_temp_snapshot() out. This is a good preparation for moving
its call to drive_init() and friends eventually.

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


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

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Check bdrv_getlength() return value in bdrv_append_temp_snapshot()

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


  Commit: 4d1cb6e6f51b0d8405f701806a203a73e7431fe5
      
https://github.com/qemu/qemu/commit/4d1cb6e6f51b0d8405f701806a203a73e7431fe5
  Author: Peter Maydell <address@hidden>
  Date:   2014-04-04 (Fri, 04 Apr 2014)

  Changed paths:
    M dma-helpers.c

  Log Message:
  -----------
  dma-helpers: Initialize DMAAIOCB in_cancel flag

Initialize the dbs->in_cancel flag in dma_bdrv_io(), since qemu_aio_get()
does not return zero-initialized memory. Spotted by the clang sanitizer
(which complained when the value loaded in dma_complete() was not valid
for a bool type); this might have resulted in leaking the AIO block.

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


  Commit: 8c2664d86917c987944f1ca9770d1f7bbbf8eca8
      
https://github.com/qemu/qemu/commit/8c2664d86917c987944f1ca9770d1f7bbbf8eca8
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-04-04 (Fri, 04 Apr 2014)

  Changed paths:
    M include/sysemu/iothread.h
    M iothread.c

  Log Message:
  -----------
  iothread: make IOThread struct definition public

Make the IOThread struct definition public so objects can be embedded in
parent structs.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Tested-by: Christian Borntraeger <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 54bee5c2b487250dcb8631ddff4307f329ec0541
      
https://github.com/qemu/qemu/commit/54bee5c2b487250dcb8631ddff4307f329ec0541
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-04-04 (Fri, 04 Apr 2014)

  Changed paths:
    M hw/block/dataplane/virtio-blk.c

  Log Message:
  -----------
  dataplane: replace iothread object_add() with embedded instance

Before IOThread was its own object, each virtio-blk device would create
its own internal thread.  We need to preserve this behavior for
backwards compatibility when users do not specify -device
virtio-blk-pci,iothread=<id>.

This patch changes how the internal IOThread object is created.
Previously we used the monitor object_add() function, which is really a
layering violation.  The problem is that this needs to assign a name but
we don't have a name for this internal object.

Generating names for internal objects is a pain but even worse is that
they may collide with user-defined names.

Paolo Bonzini <address@hidden> suggested that the internal IOThread
object should not be named.  This way the conflict cannot happen and we
no longer need object_add().

One gotcha is that internal IOThread objects will not be listed by the
query-iothreads command since they are not named.  This is okay though
because query-iothreads is new and the internal IOThread is just for
backwards compatibility.  New users should explicitly define IOThread
objects.

Reported-by: Christian Borntraeger <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Tested-by: Christian Borntraeger <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8ae60ee85ceaea6bfc4c62fb8ed180a1ba8010a5
      
https://github.com/qemu/qemu/commit/8ae60ee85ceaea6bfc4c62fb8ed180a1ba8010a5
  Author: Peter Maydell <address@hidden>
  Date:   2014-04-05 (Sat, 05 Apr 2014)

  Changed paths:
    M block.c
    M block/iscsi.c
    M block/qcow2-cluster.c
    M block/qcow2.c
    M dma-helpers.c
    M hw/block/dataplane/virtio-blk.c
    M include/block/block.h
    M include/sysemu/iothread.h
    M iothread.c
    M tests/qemu-iotests/039
    M tests/qemu-iotests/039.out
    M tests/qemu-iotests/051
    M tests/qemu-iotests/051.out

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

Block patches for 2.0.0

# gpg: Signature made Fri 04 Apr 2014 20:25:08 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream:
  dataplane: replace iothread object_add() with embedded instance
  iothread: make IOThread struct definition public
  dma-helpers: Initialize DMAAIOCB in_cancel flag
  block: Check bdrv_getlength() return value in bdrv_append_temp_snapshot()
  block: Fix snapshot=on for protocol parsed from filename
  qemu-iotests: Remove CR line endings in reference output
  block: Don't parse 'filename' option
  qcow2: Put cache reference in error case
  qcow2: Flush metadata during read-only reopen
  iscsi: Don't set error if already set in iscsi_do_inquiry

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


Compare: https://github.com/qemu/qemu/compare/bae2c2709064...8ae60ee85cea

reply via email to

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