2

I am working on a data-deduplication scheme between disks and am wondering how I can dig down into the XFS internals and create/modify extents for files.

Here is an example of what I want to do, suppose we have the file:

bippity
boppity
boo

And we have a block size of 8 bytes(enough for bippity and the new line)

Now I change the file to

bip
boppity
boo

Only the first line changed, I would like to create a file that creates an extent(or block) for the first line, writes the data to that extent, and then joins that extent with the extent already on disk, so only one change has to be pushed out to disk.

Is this possible on xfs(or even better, on a general file system)? I don't mind getting down into the nitty-gritty, but I cannot seem to find a lot of info on this particular subject.

user439407
  • 1,666
  • 2
  • 19
  • 40
  • source is available: http://xfs.org/index.php/Getting_the_latest_source_code there are also userland toolsets – jim mcnamara Dec 27 '11 at 15:41
  • 1
    Blocks are typically multiples of 1024 bytes, often 4096 bytes. What you are proposing, on the order of these block sizes rather than the 8 byte blocks you hypothesize, is what ZFS does. – casualcoder Jan 02 '12 at 02:43

0 Answers0