[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC] Copy-on-Write Support for Xen

  • To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Dan Smith <danms@xxxxxxxxxx>
  • Date: Wed, 25 Jan 2006 14:01:13 -0800
  • Delivery-date: Wed, 25 Jan 2006 22:09:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi All, 

I'm starting to work on implementing Copy-on-Write support for Xen.
Below, I describe how I plan to accomplish this in hopes that people
will offer their opinions about the design.  I'm just beginning to
work on an implementation, but I hope to have something pre-pre-alpha
to post in a few weeks.

First, I will create a device-mapper extension called "dm-cow" which
knows about two devices: the base image and the CoW space.  Reads will
be mapped directly to the base device.  Writes will be queued and the
device/block/chunk information will be passed to a userspace tool.
The userspace tool will do the hard work of deciding which block in
the CoW space will be used for the write, and will do two things:

  1. Adjust the device-mapper table to directly map the new block to
     the appropriate block in the CoW space (using dm-linear)

  2. Notify dm-cow of the new space, so that outstanding write
     requests can be mapped and completed.

Further writes to the newly-mapped block will be mapped directly by
dm-linear into the correct block in the CoW space.  The userspace tool
would also be responsible for recording block relocation information
in the CoW space, for persistence.

This approach has the benefit of moving the block-allocation logic
into userspace, which means we could have plugins for different CoW
schemes, such as QEMU's qcow format.


Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@xxxxxxxxxx

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.