DenVdmj / xdelta

Automatically exported from code.google.com/p/xdelta (actual: https://github.com/jmacd/xdelta-devel/)
0 stars 0 forks source link

Xdelta3 Block Device interface #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Xdelta3 can be used to store very efficiently multiple disk images made as
backup.(You get an image file of a partition under linux by running:
running dd if /dev/sda1 of=image.file) Sometimes you want to mount able
to mount an image, if one wants to retrieve a single file. If you have an
uncompressed image it can be done by entering:

losetup /dev/loop0 image.file
mount /dev/loop0 /mountpoint

It would be nice to create have a "block device interface" of the xdelta
program, that if the "image.file" is represented by an "original.file"
and a "delta.file" you can do:

xdelta3losetup /dev/loop0 original.file delta_file

and then have block device access to the file delta compressed "image.file"

You would need able to random access to single blocks of the delta file
in order to implement this. The most important access would be read access 

If xdelta library would support random access of single blocks one could
write a block device ddriver tool for xdelta3.

what I found so far:

implementation of losetup (which can serve as a reference implementation) 
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/
There is an article how to write block device drivers 
http://www.linuxjournal.com/article/2890

Original issue reported on code.google.com by lau...@gmail.com on 22 Feb 2009 at 11:23

GoogleCodeExporter commented 9 years ago
You wouldn't need to go kernel mode with a device driver. If you can write a 
FUSE 
filesystem for xdelta, couldn't you mount a file from that virtual filesystem 
into 
the loop device?

Original comment by nicolas....@gmail.com on 17 Sep 2009 at 4:04

GoogleCodeExporter commented 9 years ago
The FUSE filesystem sounds to me like the right way to go.

Original comment by stev...@t7a.org on 19 Mar 2011 at 10:56