block: Fixes for bdrv_drain
Status from this message: Thanks, applied to my block tree:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest9 patches 2 repliesApplied
- v39 patches 4 repliesSuperseded
- v29 patches 4 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 9 patches | 7 replies | Superseded |
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | block: Add more types for tracked requestblock/ include/ | +14 | 0 replies | |
| 2/9 | block: Track flush requestsblock/ | +8 | 0 replies | |
| 3/9 | block: Track discard requestsblock/ | +10 | 0 replies | |
| 4/9 | iscsi: Emulate commands in iscsi_aio_ioctl as iscsi_ioctlblock/ | +38 | 0 replies | |
| 5/9 | block: Add ioctl parameter fields to BlockRequestinclude/ | +12 | 0 replies | |
| 6/9 | block: Emulate bdrv_ioctl with bdrv_aio_ioctl and track bothblock/ | +92 | 0 replies | |
| 7/9 | block: Drop BlockDriver.bdrv_ioctlblock/ block/ block/ +1 more | +0 | 0 replies | |
| 8/9 | block: Introduce BlockDriver.bdrv_drain callbackblock/ include/ | +21 | 1 reply | |
| 9/9 | qed: Implement .bdrv_drainblock/ | +13 | 0 replies |
Reviews trailers per patch
8 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Kevin Wolf | Paolo Bonzini |
|---|---|---|
| 1/9 | R-b | |
| 2/9 | R-b | |
| 3/9 | R-b | |
| 4/9 | R-b | |
| 5/9 | R-b | |
| 6/9 | ||
| 7/9 | R-b | |
| 8/9 | R-b | |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v4 0/9] block: Fixes for bdrv_drain
v4: Don't miss children's children. [Paolo]
v3: Don't reuse coroutine in bdrv_aio_ioctl. [Stefan]
Recursely call .bdrv_drain callback only. [Stefan, Paolo] Added Kevin's reviewed-by in other patches.
v2: Add Kevin's reviewed-by in patches 1, 2, 5-7, 9.
Address Kevin's reviewing comments which are:
- Explicit "ret = 0" before out label in patch 3.
- Add missing qemu_aio_unref() in patch 4.
- Recurse into all children in bdrv_drain in patch 8.
Previously bdrv_drain and bdrv_drain_all don't handle ioctl, flush and discard requests (which are fundamentally the same as read and write requests that change disk state). Forgetting such requests leaves us in risk of violating the invariant that bdrv_drain() callers rely on - all asynchronous requests must have completed after bdrv_drain returns.
Enrich the tracked request types, and add tracked_request_begin/end pairs to all three code paths. As a prerequisite, ioctl code is moved into coroutine too.
The last two patches take care of QED's "need check" timer, so that after bdrv_drain returns, the driver is in a consistent state.
Fam
Fam Zheng (9):
block: Add more types for tracked request
block: Track flush requests
block: Track discard requests
iscsi: Emulate commands in iscsi_aio_ioctl as iscsi_ioctl
block: Add ioctl parameter fields to BlockRequest
block: Emulate bdrv_ioctl with bdrv_aio_ioctl and track both
block: Drop BlockDriver.bdrv_ioctl
block: Introduce BlockDriver.bdrv_drain callback
qed: Implement .bdrv_drain
block/io.c | 150 +++++++++++++++++++++++++++++++++++++++------- block/iscsi.c | 73 +++++++++++----------- block/qed.c | 13 ++++ block/raw-posix.c | 8 --- block/raw_bsd.c | 6 -- include/block/block.h | 16 +++-- include/block/block_int.h | 17 +++++- 7 files changed, 208 insertions(+), 75 deletions(-)
Signature · 1 line
2.4.3