[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v13 19/20] file-posix: Add image lo
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v13 19/20] file-posix: Add image locking in perm operations |
Date: |
Thu, 20 Apr 2017 17:42:12 +0800 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Thu, 04/20 15:52, Fam Zheng wrote:
> virtlockd in libvirt locks the first byte, so we start looking at the
> file bytes from 0x10.
>
> The complication is in the transactional interface. To make the reopen
> logic managable, and allow better reuse, the code is internally
> organized with a table from old mode to the new one.
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> block/file-posix.c | 744
> ++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 741 insertions(+), 3 deletions(-)
Need to squash this in to fix the patchew make check error on centos 6:
diff --git a/block/file-posix.c b/block/file-posix.c
index b85ac9c..f1563ae 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1069,7 +1069,7 @@ static int raw_handle_lock_update(BlockDriverState *bs,
int lock_fd;
if (!RAW_LOCK_SUPPORTED) {
- return 0;
+ goto cleanup;
}
if (bdrv_get_flags(bs) & BDRV_O_INACTIVE) {
- [Qemu-block] [PATCH v13 11/20] iotests: 087: Don't attach test image twice, (continued)
- [Qemu-block] [PATCH v13 11/20] iotests: 087: Don't attach test image twice, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 10/20] iotests: 085: Avoid image locking conflict, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 12/20] iotests: 091: Quit QEMU before checking image, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 13/20] iotests: 172: Use separate images for multiple devices, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 14/20] tests: Use null-co:// instead of /dev/null as the dummy image, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 15/20] file-posix: Add 'locking' option, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 16/20] tests: Disable image lock in test-replication, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 17/20] block: Workaround drive-backup sync=none for image locking, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 18/20] osdep: Add qemu_lock_fd and qemu_unlock_fd, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 19/20] file-posix: Add image locking in perm operations, Fam Zheng, 2017/04/20
- [Qemu-block] [PATCH v13 20/20] tests: Add test-image-lock, Fam Zheng, 2017/04/20
- Re: [Qemu-block] [Qemu-devel] [PATCH v13 00/20] block: Image locking series, no-reply, 2017/04/20
- Re: [Qemu-block] [Qemu-devel] [PATCH v13 00/20] block: Image locking series, no-reply, 2017/04/20
- Re: [Qemu-block] [Qemu-devel] [PATCH v13 00/20] block: Image locking series, no-reply, 2017/04/20