All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] dm-userspace
@ 2006-04-26 22:45 ` Dan Smith
  0 siblings, 0 replies; 19+ messages in thread
From: Dan Smith @ 2006-04-26 22:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 2368 bytes --]

Xen needs to be able to directly access disk formats such as QEMU's
qcow, VMware's vmdk, and possibly others.  Most of these formats are
based on copy-on-write ideas, and thus have a base image and a bunch
of modified blocks stored elsewhere.  Presenting this to a virtual
machine transparently as a normal block device would be ideal.  The
solution I propose is to use device-mapper for redirecting block
accesses to the appropriate locations within either the base image or
the COW space, with the following constraints:

1. The block-allocation algorithm and formatting scheme should not be
   in the kernel.  This gives the most flexibility and puts the
   complexity in userspace.
2. Actual data flow should happen only in the kernel, and userspace
   should be able to control it without the blocks being passed back
   and forth.

So, I developed a generic device-mapper target called dm-userspace
which allows a userspace application to control the block mapping in a
mostly generic way.  With the functionality it provides, I was able to
write a userspace daemon that handles the mapping of blocks such that
a qcow file could be presented as a single block device, mounted and
accessed as if it were a normal disk.  If/when VMware releases their
vmdk spec under the GPL, adding support for it would be relatively
simple.  This would give us a unified block device to export to the
virtual machine, that would be backed by a complex format such as vmdk
or qcow.

In addition to providing support for the above scenario, dm-userspace
could be used for other things as well.  It's possible that new
device-mapper targets could be developed in userspace using a special
application that used dm-userspace to simulate the kernel
environment.  Additionally, filesystem debuggers may be able to use
dm-userspace to provide interactive control and logging of disk
writes. 

A patch against 2.6.16.9 to add dm-userspace to the kernel is
available here:

  http://static.danplanet.com/dm-userspace/dmu-2.6.16.9.patch

After you have a patched kernel, you can build the (very tiny) helper
library and example program, available here:

  http://static.danplanet.com/dm-userspace/libdmu-0.1.tar.gz

Comments would be appreciated :)

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 19+ messages in thread
* [RFC] dm-userspace
@ 2006-04-19 19:48 Dan Smith
  2006-04-20 17:50 ` Eric Van Hensbergen
  0 siblings, 1 reply; 19+ messages in thread
From: Dan Smith @ 2006-04-19 19:48 UTC (permalink / raw)
  To: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 1307 bytes --]

Hi List,

As you all know, I'm working on a userspace-controlled CoW
implementation using device-mapper.  The idea is to offer a pseudo
device through device-mapper that has CoW behavior, but where the
block allocation decisions are made from userspace.

My thoughts are that it might be best to abandon the concept of the
"dm-cow" target and instead work on a "dm-userspace" target.  The
userspace cow application I'm working on would remain mostly the
same.  Similarly, dm-userspace would look almost identical to my
dm-cow does right now, but more generic.  The target would simply
present the details of the data passed to the map() function to
userspace, which would respond with a target device and sector of
where to send the request.

A generic dm-userspace target would allow for testing of new
algorithms (RAID, CoW, etc) from a userspace application, as well as
some more interesting things involving distributed applications.  Just
like FUSE allows for some neat (although not necessarily
high-performance) tricks, dm-userspace could allow the same thing for
block devices.

Would the device-mapper maintainers be interested in accepting
something like dm-userspace upstream?

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-05-10 13:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-26 22:45 [RFC] dm-userspace Dan Smith
2006-04-26 22:45 ` Dan Smith
2006-04-26 22:55 ` Ming Zhang
2006-04-26 22:55   ` [dm-devel] " Ming Zhang
2006-04-26 23:07   ` Dan Smith
2006-04-26 23:07     ` [dm-devel] " Dan Smith
2006-04-26 23:41     ` Ming Zhang
2006-04-26 23:41       ` [dm-devel] " Ming Zhang
2006-04-27  2:22       ` Dan Smith
2006-04-27  2:22         ` [dm-devel] " Dan Smith
2006-04-27 13:09         ` Ming Zhang
2006-04-27 13:09           ` [dm-devel] " Ming Zhang
2006-05-09 23:02   ` Dan Smith
2006-05-09 23:02     ` [dm-devel] " Dan Smith
2006-05-10 13:27     ` Ming Zhang
2006-05-10 13:27       ` [dm-devel] " Ming Zhang
  -- strict thread matches above, loose matches on Subject: below --
2006-04-19 19:48 Dan Smith
2006-04-20 17:50 ` Eric Van Hensbergen
2006-04-20 20:06   ` Dan Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.