From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Efh-00046U-V7 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 11:38:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1Efh-0004sW-0u for qemu-devel@nongnu.org; Mon, 31 Oct 2016 11:38:50 -0400 From: Fam Zheng Date: Mon, 31 Oct 2016 23:38:20 +0800 Message-Id: <1477928314-11184-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 00/14] block: Image locking series List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Daniel P. Berrange" , Kevin Wolf , Max Reitz , qemu-block@nongnu.org, rjones@redhat.com This is v9 of the image locking series. I redid the whole series, adopting the "two locks" approach from Kevin and Max. Depends on "[Qemu-devel] [PATCH] raw-posix: Rename 'raw_s' to 'rs'" in Max's block branch. Fam Zheng (14): osdep: Add qemu_lock_fd and qemu_unlock_fd block: Define BDRV_O_SHARE_RW qemu-io: Set "share-rw" flag together with read-only qemu-img: Set "share-rw" flag in read-only commands block: Set "share-rw" flag in drive-backup when sync=none block: Set "share-rw" flag for incoming migration iotests: 055: Don't attach the drive to vm for drive-backup iotests: 030: Read-only open image for getting map iotests: 087: Don't attch test image twice iotests: 085: Avoid image locking conflict iotests: 091: Quit QEMU before checking image tests: Use null-co:// instead of /dev/null as the dummy image raw-posix: Implement image locking tests: Add test-image-lock block/raw-posix.c | 710 +++++++++++++++++++++++++++++++++++++++++---- blockdev.c | 5 +- include/block/block.h | 2 + include/qemu/osdep.h | 2 + qemu-img.c | 10 +- qemu-io.c | 2 + tests/Makefile.include | 2 + tests/drive_del-test.c | 2 +- tests/nvme-test.c | 2 +- tests/qemu-iotests/030 | 4 +- tests/qemu-iotests/055 | 32 +- tests/qemu-iotests/085 | 32 +- tests/qemu-iotests/085.out | 3 +- tests/qemu-iotests/087 | 6 +- tests/qemu-iotests/091 | 2 + tests/test-image-lock.c | 179 ++++++++++++ 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 ++ 21 files changed, 939 insertions(+), 95 deletions(-) create mode 100644 tests/test-image-lock.c -- 2.7.4