Chen Zheng
2008-Nov-07 03:20 UTC
[zfs-discuss] How does zfs handle with ''..'' while snapshotting
Hi, Let''s say dir a contains b and c, if I change c to c'', a will be a'' based on COW, right? a a'' b c c'' But what will happen if each children of a contains some pointer pointing back to a, like the ''..'' entry in b. It points to a before the change, which shall it point to, a or a'' after the change? Shall we modify b too? If yes, there will be a new b'', should we do the same with children of b recursively? If we leave b untouched, in the view of a'', after we cd b, ''..'' will point to a, that''s quite confusing. zfs did it right, but I can''t find it in the code, really appreciate that if someone can give me some hints. Thanks Best Regards Chenz -- args are passed by ref, but bindings are local, variables are in fact just a symbol referencing an object