On Thu, Apr 25, 2013 at 01:59:23AM +0000, Zhangleiqiang wrote: > May be the "in_use" flag of "bs" at the "drive" unit is too large. > Perhaps the "in_use" flag should just lock at the unit of one or some > "image(s)" in the image chain, the "image(s)" needed to be locked are always > the ones will be write during the job. > > E.g. "drive_mirror" lock the "snapshot-file", "block-commit" lock the > dst image of the commit job, etc.
Choosing a finer-grained approach is not too hard. The tricky parts are: 1. Extending the QMP API to support multiple block jobs. Old clients only know how to deal with 1 block job but they should continue to work. 2. Thinking through all block jobs and their possible interactions. Stefan