RFC: unionfs multiple mounts, cross mounts and recursive mounts limits and manegement feature

Daichi GOTO daichi at freebsd.org
Thu Apr 21 05:49:47 UTC 2011


Hi unionfs lovers,

It is possible to mount unionfs multiple times more than once at a
mount point. However, exceeding multiple mounts could consume kernel
stack over its limits and lead a system panic easily. Some users 
reported that they got a system panic by multiple unionfs mounts.

So I make a preproduction prototype to check multiple mounts, 
cross mounts, recursive mounts and the combination of those of unionfs
and prevent that situation.

http://people.freebsd.org/~daichi/unionfs/experiments/unionfs-cross-mount3.diff

It is adjustable with sysctl value 'vfs.unionfs.recursive_limit' as
multiple mounts limits. The default value is 1 and it means two-layered ok.
Max value of 'vfs.unionfs.recursive_limit' is 8, it is heuristic value. 
I couldn't get a system panic unless 'vfs.unionfs.recursive_limit' is over 8.

Test reports, suggestions and new patches are always welcome. I'm considering
to get merged into current if there are no issues and problems.

-- 
Daichi GOTO


More information about the freebsd-fs mailing list