All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v8 00/36] block: Image locking series
@ 2016-09-30 12:09 Fam Zheng
  2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 01/36] block: Add flag bits for image locking Fam Zheng
                   ` (36 more replies)
  0 siblings, 37 replies; 69+ messages in thread
From: Fam Zheng @ 2016-09-30 12:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: berrange, John Snow, qemu-block, Kevin Wolf, rjones, Jeff Cody,
	Max Reitz, Markus Armbruster, stefanha, den, pbonzini, eblake

Hi all,

I wanted to post something before the long holiday as promised, but I couldn't
refine or test enough due to limited time.  Please take this as an RFC and do a
high level review. Thanks.

v8: Move user interface option from block device to qdev. [Kevin]
    Add "exclusive" back. [Kevin]

    Note: limited by the qdev interface, until blk_lock_image() is called, the
    images are not locked by block layer at open, because before device tells
    us what to do, block layer cannot figure out the correct lock mode any
    more.

    TODO 1: Lock explicitly in utils (qemu-img, qemu-io, etc) after opening
    image.

    TODO 2: The image locking test case 153 patch is not updated thus broken
    because of the moved option.

    TODO 3: Are the open flags unnecessary because we already have
    ImageLockMode? If so, how to converge them?

Fam Zheng (36):
  block: Add flag bits for image locking
  qapi: Add ImageLockMode
  block: Introduce image file locking
  osdep: Add qemu_lock_fd and qemu_unlock_fd
  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
  block: Add blk_lock_image
  virtio-blk: Apply lock-mode when realize
  scsi-disk: Apply lock-mode when realize
  scsi-generic: Apply lock-mode when realize
  qdev: Add "lock-mode" to block device options
  ide: Apply lock-mode when initialize
  nvme: Apply lock-mode when initialize
  usb-storage: Apply lock-mode when realize
  pflash: Add "lock-mode" property
  qemu-iotests: 046: Move version detection out from verify_io
  qemu-iotests: 091: Prepare for image lock
  qemu-iotests: 030: Disable image locking when checking test image
  iotests: 087: Disable image locking in cases where file is shared
  iotests: 087: Disable image locking in cases where file is shared
  iotests: 130: Check image info locklessly
  iotests: Disable image locking in 085
  tests: Use null-co:// instead of /dev/null
  qemu-iotests: Add test case 153 for image locking
  ahci: Use shared lock for shared storage migration
  tests/postcopy: Use shared lock for images
  fdc: Add lock-mode qdev properties
  m25p80: Add 'lock-mode' property
  nand: Add 'lock-mode' property
  onenand: Add 'lock-mode' property
  spapr_nvram: Add 'lock-mode' property
  sd: Add 'lock-mode' property

 block.c                        |  52 +++++
 block/block-backend.c          |  18 ++
 block/raw-posix.c              | 318 +++++++++++++++++++++++++++++-
 blockdev.c                     |   5 +
 hw/block/fdc.c                 |  19 +-
 hw/block/m25p80.c              |   8 +
 hw/block/nand.c                |   8 +
 hw/block/nvme.c                |   6 +-
 hw/block/onenand.c             |   7 +
 hw/block/pflash_cfi01.c        |  10 +
 hw/block/pflash_cfi02.c        |   9 +
 hw/block/virtio-blk.c          |   5 +
 hw/core/qdev-properties.c      |  10 +
 hw/ide/core.c                  |  10 +-
 hw/ide/qdev.c                  |   2 +-
 hw/nvram/spapr_nvram.c         |   8 +
 hw/scsi/scsi-disk.c            |   6 +
 hw/scsi/scsi-generic.c         |   7 +
 hw/sd/sd.c                     |   8 +
 hw/usb/dev-storage.c           |   5 +
 include/block/block.h          |   8 +-
 include/block/block_int.h      |   5 +
 include/hw/block/block.h       |   3 +
 include/hw/ide/internal.h      |   3 +-
 include/hw/qdev-properties.h   |   3 +
 include/qemu/osdep.h           |   2 +
 include/sysemu/block-backend.h |   2 +
 qapi/block-core.json           |  18 ++
 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 +
 tests/ahci-test.c              |  27 ++-
 tests/drive_del-test.c         |   2 +-
 tests/nvme-test.c              |   2 +-
 tests/postcopy-test.c          |   9 +-
 tests/qemu-iotests/030         |   2 +-
 tests/qemu-iotests/046         |  22 ++-
 tests/qemu-iotests/085         |   6 +-
 tests/qemu-iotests/091         |   9 +-
 tests/qemu-iotests/091.out     |   1 +
 tests/qemu-iotests/130         |   4 +-
 tests/qemu-iotests/130.out     |   4 +-
 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                   |  29 +++
 53 files changed, 1398 insertions(+), 90 deletions(-)
 create mode 100755 tests/qemu-iotests/153
 create mode 100644 tests/qemu-iotests/153.out

-- 
2.7.4

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

end of thread, other threads:[~2016-10-27  6:25 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 12:09 [Qemu-devel] [PATCH v8 00/36] block: Image locking series Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 01/36] block: Add flag bits for image locking Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 02/36] qapi: Add ImageLockMode Fam Zheng
2016-10-21 20:45   ` Max Reitz
2016-10-25  5:36     ` Fam Zheng
2016-10-25 13:20       ` Max Reitz
2016-10-25 13:34         ` Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 03/36] block: Introduce image file locking Fam Zheng
2016-10-21 21:04   ` Max Reitz
2016-10-25  5:48     ` Fam Zheng
2016-10-25 13:21       ` Max Reitz
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 04/36] osdep: Add qemu_lock_fd and qemu_unlock_fd Fam Zheng
2016-10-21 21:15   ` Max Reitz
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 05/36] raw-posix: Add image locking support Fam Zheng
2016-10-21 23:40   ` Max Reitz
2016-10-25  6:31     ` Fam Zheng
2016-10-25 13:28       ` Max Reitz
2016-10-25 13:43         ` Fam Zheng
2016-10-26 14:56           ` Max Reitz
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 06/36] qemu-io: Add "-L" option for BDRV_O_NO_LOCK Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 07/36] qemu-img: Add "-L" option to sub commands Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 08/36] qemu-img: Update documentation of "-L" option Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 09/36] qemu-nbd: Add "--no-lock/-L" option Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 10/36] block: Don't lock drive-backup target image in none mode Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 11/36] block: Add blk_lock_image Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 12/36] virtio-blk: Apply lock-mode when realize Fam Zheng
2016-10-22  0:08   ` Max Reitz
2016-10-22  0:12     ` Max Reitz
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 13/36] scsi-disk: " Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 14/36] scsi-generic: " Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 15/36] qdev: Add "lock-mode" to block device options Fam Zheng
2016-10-22  0:11   ` Max Reitz
2016-10-25  5:58     ` Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 16/36] ide: Apply lock-mode when initialize Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 17/36] nvme: " Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 18/36] usb-storage: Apply lock-mode when realize Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 19/36] pflash: Add "lock-mode" property Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 20/36] qemu-iotests: 046: Move version detection out from verify_io Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 21/36] qemu-iotests: 091: Prepare for image lock Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 22/36] qemu-iotests: 030: Disable image locking when checking test image Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 23/36] iotests: 087: Disable image locking in cases where file is shared Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 24/36] " Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 25/36] iotests: 130: Check image info locklessly Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 26/36] iotests: Disable image locking in 085 Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 27/36] tests: Use null-co:// instead of /dev/null Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 28/36] qemu-iotests: Add test case 153 for image locking Fam Zheng
2016-09-30 12:09 ` [Qemu-devel] [PATCH v8 29/36] ahci: Use shared lock for shared storage migration Fam Zheng
2016-09-30 12:10 ` [Qemu-devel] [PATCH v8 30/36] tests/postcopy: Use shared lock for images Fam Zheng
2016-09-30 12:10 ` [Qemu-devel] [PATCH v8 31/36] fdc: Add lock-mode qdev properties Fam Zheng
2016-09-30 12:10 ` [Qemu-devel] [PATCH v8 32/36] m25p80: Add 'lock-mode' property Fam Zheng
2016-09-30 12:10 ` [Qemu-devel] [PATCH v8 33/36] nand: " Fam Zheng
2016-09-30 12:10 ` [Qemu-devel] [PATCH v8 34/36] onenand: " Fam Zheng
2016-09-30 12:10 ` [Qemu-devel] [PATCH v8 35/36] spapr_nvram: " Fam Zheng
2016-09-30 12:10 ` [Qemu-devel] [PATCH v8 36/36] sd: " Fam Zheng
2016-10-22  1:00 ` [Qemu-devel] [PATCH v8 00/36] block: Image locking series Max Reitz
2016-10-24 10:11   ` Kevin Wolf
2016-10-24 18:03     ` Max Reitz
2016-10-25  8:24       ` Kevin Wolf
2016-10-25 13:30         ` Max Reitz
2016-10-25 14:57           ` Kevin Wolf
2016-10-26 11:01             ` Fam Zheng
2016-10-26 15:12               ` Max Reitz
2016-10-26 15:33                 ` Kevin Wolf
2016-10-26 15:34                   ` Max Reitz
2016-10-27  6:25                   ` Fam Zheng
2016-10-26 15:04             ` Max Reitz
2016-10-25  7:09     ` Fam Zheng
2016-10-25  8:06       ` Richard W.M. Jones
2016-10-25  9:19         ` 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.