<h1>The fix: raise the victory flag</h1>
<p>
- Filler text - need a graphic here showing multiple combinations:
+ QEMU 4.0 added <code>BDRV_REQ_NO_FALLBACK</code> to detect if
+ zeroing is fast, and automatically utilizes it during 'qemu-img
+ convert':
+ <ul>
+ <li>No support for flag: avoid pre-zeroing
+ <li>Flag supported and succeeds (for O(1) implementation):
+ pre-zeroing is a win
+ <li>Flag supported but fails (for O(n) implementation): no penalty
+ from pre-zeroing
+ </ul>
- <br>[WZ] = WRITE_ZEROES, normal
- <br>[FZ+] = WRITE_ZEROES, successful with FAST_ZERO flag
- <br>[FZ-] = WRITE_ZEROES, fails with FAST_ZERO flag
- <br>[W...] = WRITE for data
-
-<pre>
- O(1) server O(n) server
-pre-patch [W...][WZ][W...][WZ] [W...][WZ..][W...][WZ..]
-
-with fast zero [FZ+][W...][W...] [FZ-][W...][WZ..][W...][WZ..]
- (faster) (marginally slower)
-</pre>
-
-Or maybe a graph of demo results:
-<pre>
- | B
- 12|
- |
- |
- |
- |
- |
- |
- | A B
- 8 | B B B
- |
- |
- |
- t |
- i |
- m |
- e | A A
- 4 | A A
- |
- |
- |
- |
- |
- |
- |
- 0 +----------------------------------------------------------------
- just WRITE WRITE_ZEROES blind FAST_ZERO FAST_ZERO
- on every hole pre-zeroing missing supported
-</pre>
+<img src="4500-graph.png" width="70%" style="display: block; margin: auto;"/>
</p>