[zfs-code] How does zfs COW deal with '..' in brother directory?

2008-11-11 Thread Matthew Ahrens
Chen Zheng wrote: > Hi matt, > > I have some problems about understanding zfs COW implemention. Suppose > b and c are both children dir of a, if c changes, there will be new > versions of both a and c, namely c' and a'. > > a a' > b c c' > Actually, there will not be a new version of A unl

[zfs-code] How does zfs COW deal with '..' in brother directory?

2008-11-11 Thread Eddie Edwards
I think this is the correct answer: The parent directory is stored as a 64-bit object id in znode->zp_parent. This is just an index and is relative to the containing objset. The /index/ remains valid even after the /contents/ of directory ?a? have changed, so directory ?b? does not need updat

[zfs-code] How does zfs COW deal with '..' in brother directory?

2008-11-11 Thread Eddie Edwards
Actually, thinking about it, that may not answer your question. There's still the issue of how zp_parent (the znode that represents '..') is updated in the znode ... -- This message posted from opensolaris.org

[zfs-code] How does zfs COW deal with '..' in brother directory?

2008-11-11 Thread Eddie Edwards
'..' is a virtual directory node and doesn't exist on disc, so there is no issue with COW here. See zfs_dirlook() for details of the treatment of '..'; code starts with if (name[0] == '.' && name[1] == '.' && name[2] == 0). HTH -- This message posted from opensolaris.org

[zfs-code] zfs for Windows

2008-11-11 Thread Eddie Edwards
A friend and I were discussing zfs the other day and decided it would be fun to port it to Windows! This seems like a good level of challenge without being utterly impossible (we're both reasonably competent systems programmers). So I'm looking for some information about the vfs driver model.