Per Baatrup wrote:
I would like to to concatenate N files into one big file taking advantage of 
ZFS copy-on-write semantics so that the file concatenation is done without 
actually copying any (large amount of) file content.
  cat f1 f2 f3 f4 f5 > f15
Is this already possible when source and target are on the same ZFS filesystem?

Am looking into the ZFS source code to understand if there are sufficient (private) 
interfaces to make a simple "zcat -o f15   f1 f2 f3 f4 f5" userland application 
in C code. Does anybody have advice on this?

TIA
Per
You are right that a lot of blocks should be re-usable. This is
essentially ZFS's (new) dedup feature, so why bother writing complicated
(non-posix) userland extensions, when you already have the storage
optimization in recent versions of ZFS...?

Also what you are proposing in fs implementation would not actually be
on file level but (normally) on block allocation level. This idea will
break down badly unless your 'files' are all aligned and in multiples of
the blocksize (which is dynamic/configurable in ZFS).

Lastly, you might post at zfs-code :)


_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to