All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v6 00/22] block: Lock images when opening
@ 2016-06-03  8:48 Fam Zheng
  2016-06-03  8:48 ` [Qemu-devel] [PATCH v6 01/22] block: Add flag bits for image locking Fam Zheng
                   ` (21 more replies)
  0 siblings, 22 replies; 53+ messages in thread
From: Fam Zheng @ 2016-06-03  8:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Max Reitz, Jeff Cody, Markus Armbruster, Eric Blake,
	qemu-block, rjones, stefanha, pbonzini, John Snow, berrange, den

v6: Rebase, and address comments from Max and Rich:

    Dropped the gluster implementation because the previous reviewed version
    doesn't handle reopen correctly. Left for another day.

    Added Max's reviewed-by in patches 1, 3, 7, 12, 13, 16, 17 and 20 - 22.

    Updated "qemu -help" text. [Rich]

    Per patch changelog:

    [02/22] qapi: Add lock-mode in blockdev-add options
            Fix the copy-pasto in qapi comment. [Max]

    [04/22] block: Introduce image file locking
            Partly reworked, main difference being the new
            "bdrv_get_locking_cmd".

    [05/22] osdep: Add qemu_lock_fd and qemu_unlock_fd
            Comment fix, whitespace and empty line cleaning up, and error code.
            [Max]
            Put the new functions under "#ifndef _WIN32" so windows build
            doesn't break.

    [06/22] osdep: Introduce qemu_dup
            Commit message grammar. [Max]
            Wrap with "#ifndef _WIN32". [Max]

    [07/22] raw-posix: Use qemu_dup

    [08/22] raw-posix: Add image locking support
            Basically rewritten to handle reopen more reliably.

    [09/22] qemu-io: Add "-L" option for BDRV_O_NO_LOCK
            "image lock" -> "image locking" for consistency. [Max]
            "int nolock" -> "bool nolock". [Max]

    [11/22] qemu-img: Update documentation of "-L" option
            Drop dead assignment to flags and src_flags. [Max]

    [15/22] qemu-iotests: 046: Move version detection out from verify_io
            Drop unnecessary "-L". [Max]

    [18/22] iotests: 087: Disable image locking in cases where file is shared
            Spell fix in commit message. [Max]
            Move '"lock-mode": "off"' after "node-name" for consistency. [Max]

    [19/22] iotests: Disable image locking in 085
            Use "'read-only': true". [Max]

v5: - Change "lock-image=on/off" to "lock-mode=exclusive/shared/off".
      Default is "lock-mode=exclusive" to exclusively lock RW images and shared
      lock RO images; with lock-mode="shared", RW images are shared locked too;
      lock-mode=off turns off image locking completely.
    - Use F_OFD_SETLK fcntl so that close/dup on different fds are not a
      problem.
    - Update test cases.


Fam Zheng (22):
  block: Add flag bits for image locking
  qapi: Add lock-mode in blockdev-add options
  blockdev: Add and parse "lock-mode" option for image locking
  block: Introduce image file locking
  osdep: Add qemu_lock_fd and qemu_unlock_fd
  osdep: Introduce qemu_dup
  raw-posix: Use qemu_dup
  raw-posix: Add image locking support
  qemu-io: Add "-L" option for BDRV_O_NO_LOCK
  qemu-img: Add "-L" option to sub commands
  qemu-img: Update documentation of "-L" option
  qemu-nbd: Add "--no-lock/-L" option
  block: Don't lock drive-backup target image in none mode
  mirror: Disable image locking on target backing chain
  qemu-iotests: 046: Move version detection out from verify_io
  qemu-iotests: Wait for QEMU processes before checking image in 091
  qemu-iotests: 030: Disable image locking when checking test image
  iotests: 087: Disable image locking in cases where file is shared
  iotests: Disable image locking in 085
  tests: Use null-co:// instead of /dev/null
  block: Turn on image locking by default
  qemu-iotests: Add test case 153 for image locking

 block.c                    |  57 ++++++
 block/raw-posix.c          | 295 ++++++++++++++++++++++++++++++-
 blockdev.c                 |  38 +++-
 include/block/block.h      |  13 +-
 include/block/block_int.h  |   5 +
 include/qemu/osdep.h       |   5 +
 qapi/block-core.json       |  19 +-
 qemu-img-cmds.hx           |  44 ++---
 qemu-img.c                 |  92 ++++++++--
 qemu-img.texi              |   3 +
 qemu-io.c                  |  24 ++-
 qemu-nbd.c                 |   7 +-
 qemu-nbd.texi              |   2 +
 qemu-options.hx            |   1 +
 tests/drive_del-test.c     |   2 +-
 tests/nvme-test.c          |   2 +-
 tests/qemu-iotests/030     |   2 +-
 tests/qemu-iotests/046     |  22 +--
 tests/qemu-iotests/085     |   3 +-
 tests/qemu-iotests/087     |   6 +
 tests/qemu-iotests/091     |   3 +
 tests/qemu-iotests/091.out |   1 +
 tests/qemu-iotests/153     | 197 +++++++++++++++++++++
 tests/qemu-iotests/153.out | 426 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/group   |   1 +
 tests/usb-hcd-uhci-test.c  |   2 +-
 tests/usb-hcd-xhci-test.c  |   2 +-
 tests/virtio-blk-test.c    |   2 +-
 tests/virtio-scsi-test.c   |   4 +-
 util/osdep.c               |  38 ++++
 30 files changed, 1241 insertions(+), 77 deletions(-)
 create mode 100755 tests/qemu-iotests/153
 create mode 100644 tests/qemu-iotests/153.out

-- 
2.8.2

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2016-09-06 17:16 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03  8:48 [Qemu-devel] [PATCH v6 00/22] block: Lock images when opening Fam Zheng
2016-06-03  8:48 ` [Qemu-devel] [PATCH v6 01/22] block: Add flag bits for image locking Fam Zheng
2016-06-17  9:05   ` Kevin Wolf
2016-06-03  8:48 ` [Qemu-devel] [PATCH v6 02/22] qapi: Add lock-mode in blockdev-add options Fam Zheng
2016-06-17  9:17   ` Kevin Wolf
2016-06-18 11:16     ` Fam Zheng
2016-06-20 13:24       ` Kevin Wolf
2016-06-03  8:48 ` [Qemu-devel] [PATCH v6 03/22] blockdev: Add and parse "lock-mode" option for image locking Fam Zheng
2016-06-17  9:23   ` Kevin Wolf
2016-07-05 13:37     ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2016-07-08  2:56       ` Fam Zheng
2016-07-08  9:50         ` Kevin Wolf
2016-07-08 13:05           ` Max Reitz
2016-09-06 16:45             ` Kevin Wolf
2016-09-06 16:51               ` Daniel P. Berrange
2016-09-06 17:15                 ` Kevin Wolf
2016-06-03  8:48 ` [Qemu-devel] [PATCH v6 04/22] block: Introduce image file locking Fam Zheng
2016-06-08  1:51   ` Jason Dillaman
2016-06-08  2:45     ` Fam Zheng
2016-06-17 11:34   ` Kevin Wolf
2016-06-22  7:23     ` Fam Zheng
2016-06-22  8:30       ` Kevin Wolf
2016-06-22  9:04         ` Fam Zheng
2016-06-03  8:48 ` [Qemu-devel] [PATCH v6 05/22] osdep: Add qemu_lock_fd and qemu_unlock_fd Fam Zheng
2016-06-17 12:12   ` Kevin Wolf
2016-06-22  7:34     ` Fam Zheng
2016-06-22  8:34       ` Kevin Wolf
2016-06-22  9:10         ` Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 06/22] osdep: Introduce qemu_dup Fam Zheng
2016-06-17 12:32   ` Kevin Wolf
2016-06-17 13:08     ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2016-06-22  7:37       ` Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 07/22] raw-posix: Use qemu_dup Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 08/22] raw-posix: Add image locking support Fam Zheng
2016-06-03 23:53   ` Fam Zheng
2016-06-17 13:07   ` Kevin Wolf
2016-06-22  8:27     ` Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 09/22] qemu-io: Add "-L" option for BDRV_O_NO_LOCK Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 10/22] qemu-img: Add "-L" option to sub commands Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 11/22] qemu-img: Update documentation of "-L" option Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 12/22] qemu-nbd: Add "--no-lock/-L" option Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 13/22] block: Don't lock drive-backup target image in none mode Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 14/22] mirror: Disable image locking on target backing chain Fam Zheng
2016-06-06 15:03   ` Max Reitz
2016-06-08  3:22     ` Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 15/22] qemu-iotests: 046: Move version detection out from verify_io Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 16/22] qemu-iotests: Wait for QEMU processes before checking image in 091 Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 17/22] qemu-iotests: 030: Disable image locking when checking test image Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 18/22] iotests: 087: Disable image locking in cases where file is shared Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 19/22] iotests: Disable image locking in 085 Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 20/22] tests: Use null-co:// instead of /dev/null Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 21/22] block: Turn on image locking by default Fam Zheng
2016-06-03  8:49 ` [Qemu-devel] [PATCH v6 22/22] qemu-iotests: Add test case 153 for image locking Fam Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.