On Wed, Feb 13, 2013 at 02:21:50PM +0100, Kevin Wolf wrote: > During the last few releases we have got rid of most of the overhead of > metadata writes during cluster allocation. What's left is the COW for > unaligned allocating write requests, and it's quite expensive. > > In the general case, this cost cannot be avoided. However, if we're > lucky enough that before the next flush the data copied during COW > would be overwritten, we can do without the COW. Sequential writes > always overwrite the COW area at the end of the cluster immediately, > so delaying the COW a bit and cancelling it if it's overwritten is a > worthwhile optimisation.
This series increases the complexity of qcow2 request processing by adding locks, state variables, and expanding the life-cycle of requests. My reaction to this RFC is that I'm a little scared not just of possible bugs I'll miss during code review, but also that future qcow2 modifications will get even trickier due to the new state. I hope to come up with some concrete ideas for simplifying this as I iterate over the patches some more. Stefan