We have always tried to keep changes just in unionfs segment only. But by accomplish nothing, we need change the other segment.
The thread calls VOP_READDIR cannot make a sharp distinction between "vnode of UPPER layer" and "vnode of LOWER layer" what it treats now by current FreeBSD's unionfs and kernel land APIs.
It leads some unionfs problem. We cannot solve those problem by just only changes in unionfs segument.
We add information value to sys/uio.h like a uio->offset to make a sharp distinction between UPPER and LOWER which it treats, and to sys/file, too.
sys/uio.h:
add ---> "int uio_layer;"
sys/file.h:
add ---> "int f_layer;"
If you have any good idea for implemetation strategy or good name idea, please send me.
http://people.freebsd.org/~daichi/unionfs/
http://people.freebsd.org/~daichi/unionfs/index-ja.html
http://people.freebsd.org/~daichi/unionfs/request-new-api-for-vfs.html