From owner-freebsd-current@FreeBSD.ORG Thu Apr 21 06:06:07 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B3E5106566B for ; Thu, 21 Apr 2011 06:06:07 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.246.90]) by mx1.freebsd.org (Postfix) with ESMTP id 398538FC08 for ; Thu, 21 Apr 2011 06:06:07 +0000 (UTC) Received: from parancell.ongs.co.jp (dullmdaler.ongs.co.jp [202.216.246.94]) by natial.ongs.co.jp (Postfix) with ESMTPSA id 380FF12543B; Thu, 21 Apr 2011 14:49:46 +0900 (JST) Date: Thu, 21 Apr 2011 14:49:47 +0900 From: Daichi GOTO To: freebsd-current@freebsd.org, freebsd-fs@freebsd.org Message-Id: <20110421144947.b887081e.daichi@freebsd.org> Organization: FreeBSD Project X-Mailer: Sylpheed 3.1.0 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: ozawa@ongs.co.jp Subject: RFC: unionfs multiple mounts, cross mounts and recursive mounts limits and manegement feature X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 06:06:07 -0000 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