Gentoo Archives: gentoo-dev

From: Yuxuan Shui <yshuiv7@×××××.com>
To: ryao@g.o
Cc: gentoo-dev@l.g.o
Subject: [gentoo-dev] GSoC proposal: cp --reflink support for zfs.
Date: Wed, 12 Mar 2014 07:15:25
Message-Id: CAGqt0zzuStrjZMXgSA_mJKFdrgDuyR1Oju5D69x_nJG6MhG2MQ@mail.gmail.com
1 Hi,
2
3 I would like to implement cp --reflink support for ZFSOnLinux as my GSoC
4 project.
5
6 cp --reflink is used to create a COW copy of a file, so the file will not
7 take any disk space if it's not modified. This feature is very useful for
8 cases like storing a lot of almost identical virtual machine images. Also
9 this is a frequently requested feature for ZoL. [1][2][3]
10
11 Currently only btrfs support this feature, so my goal it to bring it to ZoL
12 as well.
13
14 I think the only way to do it (without changing too many parts of ZoL) is
15 to use the deduplication feature of zfs. A COW copy could be done by create
16 a new entry in ddt for the old file, and create a new file which points to
17 the ddt entry.
18
19 Please let me know if this proposal makes sense, and if that's the right
20 way to do it.
21
22 Thanks.
23
24 [1]:
25 https://groups.google.com/a/zfsonlinux.org/forum/#!topic/zfs-discuss/mvGB7QEpt3w
26 [2]: https://github.com/zfsonlinux/zfs/issues/405
27 [3]: https://github.com/zfsonlinux/zfs/issues/1063
28 --
29
30 Regards
31 Yuxuan Shui

Replies