On Fri, Jan 25, 2008 at 02:27:34PM -0600, Anthony Liguori wrote:
> Andre Przywara wrote:
> >Laurent Vivier wrote:
> >>What I'm wondering is how loop and device mapper can work ?
> >I shortly evaluated the loop device idea, but came to the conclusion
> >that this not so easy to implement (and would require qcow code in the
> >kernel). I see only little chance for this go upstream in Linux and
> >maintaining this out-of-tree is actually a bad idea.
> I recently was poking around at the loop device and discovered that it
> had a plugging xfer ops to allow for encrypted loop devices. My initial
> analysis was that by simply adding a couple of operations to that
> structure (such as map_sector and get_size), you could very easily write
> a kernel module that registered a set of xfer ops that implemented QCOW
The loop device encryption stuff has long been deprecated in
favour of the device mapper crypt layer - dm-crypt & cryptsetup
command. The loop device is really not at all nice for write access
because it will cache data in memory arbitrarily leading to potentially
huge data loss upon crashes. This is why Xen stopped using loop device
and write blktap daemon - although that has its own set of problems,
at least it has data integrity.
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|