[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 05/27] block: Add bdrv_image_locked
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v3 05/27] block: Add bdrv_image_locked |
Date: |
Thu, 28 Apr 2016 20:57:24 +0800 |
Signed-off-by: Fam Zheng <address@hidden>
---
block.c | 5 +++++
include/block/block.h | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 6058d7c..453bef6 100644
--- a/block.c
+++ b/block.c
@@ -880,6 +880,11 @@ static int bdrv_unlock_image(BlockDriverState *bs)
return bdrv_lock_unlock_image_do(bs, false);
}
+bool bdrv_image_locked(BlockDriverState *bs)
+{
+ return bs->image_locked;
+}
+
static QemuOptsList bdrv_runtime_opts = {
.name = "bdrv_common",
.head = QTAILQ_HEAD_INITIALIZER(bdrv_runtime_opts.head),
diff --git a/include/block/block.h b/include/block/block.h
index b803597..bd623d9 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -282,7 +282,7 @@ int bdrv_drop_intermediate(BlockDriverState *active,
BlockDriverState *top,
BlockDriverState *bdrv_find_overlay(BlockDriverState *active,
BlockDriverState *bs);
BlockDriverState *bdrv_find_base(BlockDriverState *bs);
-
+bool bdrv_image_locked(BlockDriverState *bs);
typedef struct BdrvCheckResult {
int corruptions;
--
2.8.0
- [Qemu-devel] [PATCH v3 00/27] block: Lock images when opening, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 01/27] block: Add BDRV_O_NO_LOCK, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 03/27] blockdev: Add and parse "lock-image" option for block devices, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 02/27] qapi: Add lock-image in blockdev-add options, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 05/27] block: Add bdrv_image_locked,
Fam Zheng <=
- [Qemu-devel] [PATCH v3 04/27] block: Introduce image file locking, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 07/27] block: Handle image locking during reopen, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 06/27] block: Make bdrv_reopen_{commit, abort} private functions, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 08/27] osdep: Add qemu_lock_fd and qemu_unlock_fd, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 10/27] raw-posix: Use qemu_dup, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 09/27] osdep: Introduce qemu_dup, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 11/27] raw-posix: Implement .bdrv_lockf, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 12/27] gluster: Implement .bdrv_lockf, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 13/27] qemu-io: Add "-L" option for BDRV_O_NO_LOCK, Fam Zheng, 2016/04/28
- [Qemu-devel] [PATCH v3 14/27] qemu-img: Add "-L" option to sub commands, Fam Zheng, 2016/04/28