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

From: Daichi GOTO <daichi_at_freebsd.org>
Date: Thu, 21 Apr 2011 14:49:47 +0900
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
Received on Thu Apr 21 2011 - 04:06:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC