Charles P Wright:
> Unionfs only gets hardlinks that were created on Unionfs right.

If you use the persistent inode number feature, you can handle hardlinks
created by branch fs, can't you?


> > What will happen after the cached dentry and inode are freed, by
> > shrink_dcache() or something? Is your i_stacked_inode freed too? Is it
> > still available?
> The lower-level inode can not be thrown out if there is a reference from a
> stacked inode, because the stacked inode takes a reference count on the
> lower-level inode.

Yes it is.
But how about the 1-1 mapping ballance? For example, if a user does
'find / -ls' or something,
- ecryptfs/wrapfs/unionfs inode cache may be discarded
- lower_inode may be survived, remains in cache (since unionfs branch is
  accessible by 'find')
- lower_inode->i_stacked_inode will point illegal address
- next time when ecryptfs/wrapfs/unionfs access the inode, something bad
  will happen

The posted code might be just a prototype to show the concept, so
the handlling the referrence counter of i_stacked_inode might be just
lacked.
But I am afraid if ecryptfs is going to handle iput/iget to
i_stacked_inode, it may create a 'never-freed-inode' since they refers
each other.


Junjiro Okajima
_______________________________________________
unionfs mailing list
unionfs@mail.fsl.cs.sunysb.edu
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to