The FreeBSD new unionfs implementation: The reason why we add int values to both sys/uio.h and sys/file.h

Daichi GOTO (daichi@freebsd.org)
First edition Tue Oct 10 20:25:06 2006
Last modified Tue Oct 10 21:02:48 2006

1 Introduction

We have always tried to keep changes just in unionfs segment only. But by accomplish nothing, we need change the other segment.

2 Problem Description

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.

3 Impact

It leads some unionfs problem. We cannot solve those problem by just only changes in unionfs segument.

4 Solution

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.

5 References

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