[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH RFC 03/16] blockjob: Add BLK_PERM_AIO_CONTEXT_CHANGE
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH RFC 03/16] blockjob: Add BLK_PERM_AIO_CONTEXT_CHANGE shared perm on bs |
Date: |
Tue, 21 Mar 2017 11:16:22 +0800 |
Signed-off-by: Fam Zheng <address@hidden>
---
blockjob.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/blockjob.c b/blockjob.c
index 69126af..3fd84b7 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -197,6 +197,9 @@ void *block_job_create(const char *job_id, const
BlockJobDriver *driver,
}
}
+ /* The notifier we'll register on @blk takes care of following context
+ * change, so permit it. */
+ shared_perm |= BLK_PERM_AIO_CONTEXT_CHANGE;
blk = blk_new(perm, shared_perm);
ret = blk_insert_bs(blk, bs, errp);
if (ret < 0) {
--
2.9.3
- [Qemu-block] [PATCH RFC 00/16] block: Protect AIO context change with perm API, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 01/16] block: Define BLK_PERM_AIO_CONTEXT_CHANGE, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 02/16] block-backend: Add blk_request_perm, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 03/16] blockjob: Add BLK_PERM_AIO_CONTEXT_CHANGE shared perm on bs,
Fam Zheng <=
- [Qemu-block] [PATCH RFC 04/16] block: Propagate BLK_PERM_AIO_CONTEXT_CHANGE down the graph, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 05/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 06/16] backup: Do initial aio context move of target via BB interface, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 07/16] mirror: Request aio context change permission on target, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 08/16] commit: Allow aio context change on s->base, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 09/16] mirror: Do initial aio context move of target via BB interface, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 10/16] virtio-scsi: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 11/16] virtio-blk: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 12/16] blk: fix aio context loss on media change, Fam Zheng, 2017/03/20
- [Qemu-block] [PATCH RFC 13/16] nbd: Allow BLK_PERM_AIO_CONTEXT_CHANGE on BB, Fam Zheng, 2017/03/20