Possible approach to fix PR 172334.

Daichi GOTO daichi at ongs.co.jp
Sat Aug 24 07:34:28 UTC 2013


Hi Jaume, thanks for your suggestion.

I think that we should discuss your suggestion on freebsd-fs mailing list
with filesystems folks.  If you do not subscribe the freebsd-fs, please join it.

And filesystem folks, what do you make of this suggestion?

On 2013/08/23, at 16:41, Jaume Martí <jaume.martif at gmail.com> wrote:
> Hello Daichi,
> 
> I contact you regarding PR 172334 (http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/172334).
> I am interested in implementing a fix for this issue and I have been thinking on a solution reusable for other file systems.
> I would add a new operation in struct vop_vector that returns a list of vnodes.
> This operation would only make sense on vnodes from file systems that use other vnodes instead of directly storing the data in a disk.
> In the case of unionfs the return value would be a list with the corresponding vnodes from the upper and/or lower layers where this vnode is mapped. 
> 
> Using this operation it could be possible to traverse the vnode dependency graph and look for loops.
> In the case of the unionfs, it could be implemented in the domount function a check to see if it is possible to reach on the dependency graph the lowerrootvp starting from the upperrootvp, or viceversa, using a simple graph traversal algorithm.
> 
> I would like to know your opinion on this solution, and if you consider it is good enough to be eventually committed to the FreeBSD src tree.
> I am not an expert on the FreeBSD kernel nor on unionfs so please, feel free to suggest any change you consider necessary to my approach.
> 
> Best regards,
> Jaume


--
Daichi GOTO, daichi at freebsd.org



More information about the freebsd-fs mailing list