Gentoo Archives: gentoo-dev

From: Yuxuan Shui <yshuiv7@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] GSoC proposal: cp --reflink support for zfs.
Date: Wed, 12 Mar 2014 17:07:19
Message-Id: CAGqt0zwfZw55zTA2Gc6gGf972kkLBWaruks7MageS636O1+hfQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] GSoC proposal: cp --reflink support for zfs. by Richard Yao
1 Hi,
2
3 On Wed, Mar 12, 2014 at 9:30 PM, Richard Yao <ryao@g.o> wrote:
4 >
5 > On 03/12/2014 08:45 AM, Alex Xu wrote:
6 > > On 12/03/14 03:15 AM, Yuxuan Shui wrote:
7 > >> Hi,
8 > >>
9 > >> I would like to implement cp --reflink support for ZFSOnLinux as my GSoC
10 > >> project.
11 > >>
12 > >> cp --reflink is used to create a COW copy of a file, so the file will not
13 > >> take any disk space if it's not modified. This feature is very useful for
14 > >> cases like storing a lot of almost identical virtual machine images. Also
15 > >> this is a frequently requested feature for ZoL. [1][2][3]
16 > >>
17 > >> Currently only btrfs support this feature, so my goal it to bring it to ZoL
18 > >> as well.
19 > >>
20 > >> I think the only way to do it (without changing too many parts of ZoL) is
21 > >> to use the deduplication feature of zfs. A COW copy could be done by create
22 > >> a new entry in ddt for the old file, and create a new file which points to
23 > >> the ddt entry.
24 > >>
25 > >> Please let me know if this proposal makes sense, and if that's the right
26 > >> way to do it.
27 > >>
28 > >> Thanks.
29 > >>
30 > >> [1]:
31 > >> https://groups.google.com/a/zfsonlinux.org/forum/#!topic/zfs-discuss/mvGB7QEpt3w
32 > >> [2]: https://github.com/zfsonlinux/zfs/issues/405
33 > >> [3]: https://github.com/zfsonlinux/zfs/issues/1063
34 > >>
35 > >
36 > > While I can't comment too much on the technical aspects, they seem to be
37 > > relatively sound.
38 > >
39 > > However, there are some issues with the, er... other aspects, for lack
40 > > of better terminology.
41 > >
42 > > 1. This is possibly out of scope as a Gentoo project, since ZOL is not
43 > > really part of Gentoo. If it's not, then you're out of luck, because ZOL
44 > > is not an accepted organization.
45 >
46 > Things that provide us with improvements over what we have are
47 > definitely worth consideration as GSoC projects. However, what is
48 > accepted ultimately depends on not only feedback from a potential
49 > mentor, but also a vote of Gentoo developers.
50
51 Maybe I could propose this project to illumos? Since they seems to
52 accept proposal for OpenZFS.
53
54 >
55 > > 2. This is likely too small to be a GSoC project. Perhaps see [0] for a
56 > > list of example ideas, if only so you can get a grasp on the size of a
57 > > good project.
58 > >
59 > > It does sound like a good idea though, and even if you can't do it as
60 > > part of GSoC, you should pursue it anyways.
61 >
62 > Leaning on my understanding of ZFS internals, I can say that this is
63 > large enough. However, I do not think it will accomplish the desired
64 > result if implemented in the manner suggested.
65
66 Could you elaborate why this won't work? Thanks.
67
68 >
69
70 --
71
72 Regards
73 Yuxuan Shui