add basic recovery logic to quorum driver
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 22 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | block/quorum: initialize qcrs.aiocb for readblock/ | +12 | 0 replies | |
| 2/8 | block: add driver operation callbacksblock.c include/ include/ | +17 | 4 replies | |
| 3/8 | block/sheepdog: propagate disconnect/reconnect events to upper driverblock/ | +9 | 2 replies | |
| 4/8 | block/quorum: add quorum_aio_release() helperblock/ | +8 | 1 reply | |
| 5/8 | quorum: fix quorum_aio_cancel()block/ | +3 | 4 replies | |
| 6/8 | block/quorum: add broken state to BlockDriverStateblock/ include/ | +87 | 2 replies | |
| 7/8 | block: add two helpersblock.c include/ | +12 | 1 reply | |
| 8/8 | quorum: add basic device recovery logicblock/ trace-events | +191 | 2 replies |
Reviews trailers per patch
1 of 8 patches has a Reviewed-by or Acked-by.
| Patch | Benoît Canet |
|---|---|
| 1/8 | |
| 2/8 | |
| 3/8 | |
| 4/8 | R-b |
| 5/8 | |
| 6/8 | |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 0/8] add basic recovery logic to quorum driver
This patch set mainly add mainly two logics to implement device recover
- notify qourum driver of the broken states from the child driver(s)
- dirty track and sync the device after it is repaired
Thus quorum allow VMs to continue while some child devices are broken and when the child devices are repaired and return back, we sync dirty bits during downtime to keep data consistency.
The recovery logic is based on the driver state bitmap and will sync the dirty bits with a timeslice window in a coroutine in this prtimive implementation.
Simple graph about 2 children with threshold=1 and read-pattern=fifo:
(similary to DRBD)
+ denote device sync iteration
- IO on a single device
= IO on two devices
sync complete, release dirty bitmap
^
|
====-----------------++++----++++----++==========
| |
| v
| device repaired and begin to sync v
device broken, create a dirty bitmap
This sync logic can take care of nested broken problem, that devices are broken while in sync. We just start a sync process after the devices are repaired again and switch the devices from broken to sound only when the sync completes.
For read-pattern=quorum mode, it enjoys the recovery logic without any problem.
Todo:
- use aio interface to sync data (multiple transfer in one go)
- dynamic slice window to control sync bandwidth more smoothly
- add auto-reconnection mechanism to other protocol (if not support yet)
- add tests
Liu Yuan (8):
block/quorum: initialize qcrs.aiocb for read
block: add driver operation callbacks
block/sheepdog: propagate disconnect/reconnect events to upper driver block/quorum: add quorum_aio_release() helper
quorum: fix quorum_aio_cancel()
block/quorum: add broken state to BlockDriverState
block: add two helpers
quorum: add basic device recovery logic
block.c | 17 +++ block/quorum.c | 324 +++++++++++++++++++++++++++++++++++++++++----- block/sheepdog.c | 9 ++ include/block/block.h | 9 ++ include/block/block_int.h | 6 + trace-events | 5 + 6 files changed, 336 insertions(+), 34 deletions(-)
Signature · 1 line
1.9.1