A key feature of reflinks is that they operate on any data in a mountpoint, but 
what you described only applies to data with a deduplication table entry. In 
such cases, it do not see what it accomplishes over simply using data 
deduplication. In specific, there is no efficiency advantage. It is not clear 
to me that trying to cut corners to obtain one is possible without incurring 
consistency issues with the deduplication table falling out of sync. In the 
case that there is no deduplication table entry, you would need to rewrite the 
file. reflinks are intended to be as done as quickly as hard links, so this 
would seem to negate the benefit.

Matthew Ahrens and I have discussed reflinks in the past and we both agree that 
they would be non-trivial to implement. That does not mean it cannot be done, 
but I do not think this particular approach would succeed. However, I encourage 
you to keep thinking about such things. If you think of a way of doing this 
that seems workable, it would likely be something that could be made into a 
GSoC project.

With that said, if you want to do a ZoL-related project for Gentoo, I have some 
other things that I could suggest that I believe are workable. Such ideas are 
things that I was asked to prepare on extremely short notice and I have not yet 
had time to publish them. Let me know if you would be interested.

On Mar 12, 2014, at 3:15 AM, Yuxuan Shui <yshu...@gmail.com> wrote:

> Hi,
> 
> I would like to implement cp --reflink support for ZFSOnLinux as my GSoC 
> project.
> 
> cp --reflink is used to create a COW copy of a file, so the file will not 
> take any disk space if it's not modified. This feature is very useful for 
> cases like storing a lot of almost identical virtual machine images. Also 
> this is a frequently requested feature for ZoL. [1][2][3]
> 
> Currently only btrfs support this feature, so my goal it to bring it to ZoL 
> as well.
> 
> I think the only way to do it (without changing too many parts of ZoL) is to 
> use the deduplication feature of zfs. A COW copy could be done by create a 
> new entry in ddt for the old file, and create a new file which points to the 
> ddt entry.
> 
> Please let me know if this proposal makes sense, and if that's the right way 
> to do it.
> 
> Thanks.
> 
> [1]: 
> https://groups.google.com/a/zfsonlinux.org/forum/#!topic/zfs-discuss/mvGB7QEpt3w
> [2]: https://github.com/zfsonlinux/zfs/issues/405
> [3]: https://github.com/zfsonlinux/zfs/issues/1063
> -- 
> 
> Regards
> Yuxuan Shui

Reply via email to