From owner-freebsd-fs@FreeBSD.ORG Sat Aug 24 07:34:28 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9FFD5CEE; Sat, 24 Aug 2013 07:34:28 +0000 (UTC) (envelope-from daichi@ongs.co.jp) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.246.90]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B69A2057; Sat, 24 Aug 2013 07:34:28 +0000 (UTC) Received: from [192.168.0.101] (unknown [81.136.246.149]) by natial.ongs.co.jp (Postfix) with ESMTPSA id ABFB7125427; Sat, 24 Aug 2013 16:24:32 +0900 (JST) Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Possible approach to fix PR 172334. From: Daichi GOTO In-Reply-To: Date: Sat, 24 Aug 2013 08:24:29 +0100 Message-Id: References: To: =?utf-8?Q?Jaume_Mart=C3=AD?= X-Mailer: Apple Mail (2.1508) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs@freebsd.org, daichi@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 07:34:28 -0000 Hi Jaume, thanks for your suggestion. I think that we should discuss your suggestion on freebsd-fs mailing = list with filesystems folks. If you do not subscribe the freebsd-fs, please = join it. And filesystem folks, what do you make of this suggestion? On 2013/08/23, at 16:41, Jaume Mart=ED wrote: > Hello Daichi, >=20 > I contact you regarding PR 172334 = (http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/172334). > I am interested in implementing a fix for this issue and I have been = thinking on a solution reusable for other file systems. > I would add a new operation in struct vop_vector that returns a list = of vnodes. > This operation would only make sense on vnodes from file systems that = use other vnodes instead of directly storing the data in a disk. > In the case of unionfs the return value would be a list with the = corresponding vnodes from the upper and/or lower layers where this vnode = is mapped.=20 >=20 > Using this operation it could be possible to traverse the vnode = dependency graph and look for loops. > In the case of the unionfs, it could be implemented in the domount = function a check to see if it is possible to reach on the dependency = graph the lowerrootvp starting from the upperrootvp, or viceversa, using = a simple graph traversal algorithm. >=20 > I would like to know your opinion on this solution, and if you = consider it is good enough to be eventually committed to the FreeBSD src = tree. > I am not an expert on the FreeBSD kernel nor on unionfs so please, = feel free to suggest any change you consider necessary to my approach. >=20 > Best regards, > Jaume -- Daichi GOTO, daichi@freebsd.org