[PR #13] [CLOSED] fix QED flush: QED did not perform proper flush #21

Open
opened 2026-01-31 21:29:24 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qemu/qemu/pull/13
Author: @wuxb45
Created: 8/6/2014
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • fe46e64 fix QED flush: QED did not perform proper flush on synchronized write or flush, at least one flush method should be provided (common/co/aio)

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 block/qed.c (+7 -0)

📄 Description

Sorry I misunderstood qed... Please ignore this request!!

fix QED flush: QED did not perform proper flush on synchronized write or flush, at least one flush method should be provided (common/co/aio)'

I was doing "sync write" benchmarking on varies qemu supported formats (on ssd). I was surprised that QED shows significant high performance over several other formats (qcow2/vmdk/vdi..). In some testcases QED even runs a little bit faster than raw format!

After careful reading of the code I found QED skipped the necessary flush by providing nothing on flush api. unlike read/write which require at least one type of implementation, flush API is not mandatory in API because your format could guarantee that synchronization is done in write path. However that's not the case in QED because data is buffered in the backing file and need proper flush to make it safe.

However I'm not a skilled qemu developer. Above is what I got from my thinking and study. Please correct me if I misunderstood the system.

Thanks!
Xingbo
(It's quite a hard work to go through the long callback chain, though much easier that tcg's heavy use of glue macros...)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qemu/qemu/pull/13 **Author:** [@wuxb45](https://github.com/wuxb45) **Created:** 8/6/2014 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`fe46e64`](https://github.com/qemu/qemu/commit/fe46e640f53a006907091e910fb4868a878ea0a8) fix QED flush: QED did not perform proper flush on synchronized write or flush, at least one flush method should be provided (common/co/aio) ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `block/qed.c` (+7 -0) </details> ### 📄 Description Sorry I misunderstood qed... Please ignore this request!! fix QED flush: QED did not perform proper flush on synchronized write or flush, at least one flush method should be provided (common/co/aio)' I was doing "sync write" benchmarking on varies qemu supported formats (on ssd). I was surprised that QED shows significant high performance over several other formats (qcow2/vmdk/vdi..). In some testcases QED even runs a little bit faster than raw format! After careful reading of the code I found QED skipped the necessary flush by providing nothing on _flush_ api. unlike read/write which require at least one type of implementation, flush API is not mandatory in API because your format could guarantee that synchronization is done in write path. However that's not the case in QED because data is buffered in the backing file and need proper flush to make it safe. However I'm not a skilled qemu developer. Above is what I got from my thinking and study. Please correct me if I misunderstood the system. Thanks! Xingbo (It's quite a hard work to go through the long callback chain, though much easier that tcg's heavy use of glue macros...) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 21:29:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/qemu#21