From owner-freebsd-stable@freebsd.org Tue Aug 9 06:02:18 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40169BB377A for ; Tue, 9 Aug 2016 06:02:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x22e.google.com (mail-pf0-x22e.google.com [IPv6:2607:f8b0:400e:c00::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D44D1C08 for ; Tue, 9 Aug 2016 06:02:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x22e.google.com with SMTP id p64so1680717pfb.1 for ; Mon, 08 Aug 2016 23:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=78uicXUxmB71cYf+CrReSrgZOlJzDofI50KSIyb7KNg=; b=a0D+qv75W3QHC5GmHWJXqDJExXrS0XIa+a+0hlZ80eWOX02q4QfRK1yv/RsZwjBTC+ x6Vf1sUdm0XZWKRKcM+7BXadWaL3sl5i1EtGRWfUQXEIekAqfBVqz+Bwuc4fs8Y3jl9H pjJRfCWlfV9Vc3xto9zoongX5drYRnRT4S1hIiN+yEZ3AUajsenI5V7nDgj6N4IjDlkW nbjIm/m8C+Q5ITUuwH3nDNfV97ICWygaL3qVWt/JGB4Zk8uxSblIva24OiqQHTfSyG1S IBTvw3V1xJSSRjiGOs/yhdJSfzt+wfhrdVVIjaSvPBBkx/lSaoFGpGwM9tYiZ2QCyITy iLCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=78uicXUxmB71cYf+CrReSrgZOlJzDofI50KSIyb7KNg=; b=H8bksAEkp/15VJ/lwmoxK791SOF0IIHzKdggUApfA5wSD9nvRaRGcliLIX3YKQ4Fsq 3zmDWJdNDbfq2mSRINStIFgpBlDe8y7MvbV4/3hMU6PR0HdaF8m9/jUaMiDZajZTewbw MK/GfLtDn28m24FN8q9jhV/OJZWax3swky9FQlM2mhPzo3U4NnCtgaDMDYWCKL22vAqq 0KCf2MNZC4gY2dbv4HTCaDiQ0jw36bKQ09K3hepPcsmDGBWH9u1JXC5SgNPd2vgNa/A9 vNLQCRO6OVkqq2w+6oTFm6uo1Ofa2AnjVUVyoVPYIQriURIy9PLo47hx0yRJMYBN9Bcj ojOg== X-Gm-Message-State: AEkoouth4NuR8gF15eyC+sKyzDzZiXUbdqqUXb6yRwe/01lP/OmBwX9N4Y4AO061TPQNoQ== X-Received: by 10.98.204.74 with SMTP id a71mr168675089pfg.149.1470722537649; Mon, 08 Aug 2016 23:02:17 -0700 (PDT) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id xx7sm52516989pac.3.2016.08.08.23.02.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2016 23:02:17 -0700 (PDT) Sender: Mark Johnston Date: Mon, 8 Aug 2016 23:02:13 -0700 From: Mark Johnston To: Harry Schmalzbauer Cc: Rick Macklem , FreeBSD Stable Subject: Re: unionfs bugs, a partial patch and some comments [Was: Re: 1-BETA3 Panic: __lockmgr_args: downgrade a recursed lockmgr nfs @ /usr/local/share/deploy-tools/RELENG_11/src/sys/fs/unionfs/union_vnops.c:1905] Message-ID: <20160809060213.GA67664@raichu> References: <57A79E24.8000100@omnilan.de> <57A83C78.1070403@omnilan.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <57A83C78.1070403@omnilan.de> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2016 06:02:18 -0000 On Mon, Aug 08, 2016 at 10:02:00AM +0200, Harry Schmalzbauer wrote: > Bezüglich Rick Macklem's Nachricht vom 07.08.2016 23:34 (localtime): > > Harry Schmalzbauer wrote: > >> Hello, > >> > >> I had another crash which I'm quite sure was triggered by mount_unionfs: > > Just in case you are not already aware, unionfs is always broken. Read > > the BUGS > > section at the end of "man mount_unionfs". If it were easy to fix, > > someone would > > have done so long ago. Yes, some use it successfully, but if not... > > > > Sorry, but I suspect that is how it will remain, rick > > Thanks for the hint, not happy to hear that, but I was not aware of that > explicit warning in man 8 mount_unionfs :-( > > This feature is utterly important for me (all my productive machines > have "/" read-only mounted and "/etc" is an union to a writable, synch > mounted separate fs), so back in 2012, after a lot of locking redesign > has been done in 9-current, I got Attilio Raos attention and he gave out > some test patches for 9.0. > He was aware of missing locking adjustments, but patches addressing the > majority of them didn't work. > Since then I'm draging a minimal patch which prevents at least the > kernel panics for me. > Unfortunately I don't have the skills to continue Attilio Raos work. > > Just for anybody else needing unionfs: > https://people.freebsd.org/~attilio/unionfs_missing_insmntque_lock.patch > > This patch still applies and I'm successfully using this (unmodified) up > to FreeBSD-10.3 and never had any panic in all these years. Having spent some time looking at unionfs, I'm a bit skeptical that this patch will address the panic you reported earlier, though I'd be interested to know if it does. Reading the code, I think it will just address an INVARIANTS-only assertion in insmntque1(). Unfortunately, unionfs is quite difficult to fix within the current constraints of FreeBSD's VFS. unionfs_readdir() is a particularly good demonstration of this fact: some callers of VOP_READDIR expect the cookies returned by the FS to be monotonically increasing, but unionfs has no straightforward way to make this guarantee. > > I will continue using it for FreeBSD-11 and I guess it will also prevent > my last reported panics. > But I wanted to take part in the BETA test without local modifications > at first. > > Another very importend usage scenario of unionfs for me is for my build > host(s). I'm (nfs4-)sharing a svn-checked out read-only portstree. My > inofficial "ports/inofficial" directory perfectly shows up by > unionfs-mounting it below the unaltered portstree :-) > > For me, unionfs is as important as ZFS (and nullfs) is in FreeBSD. > > First thing to do for me, after I won in lottery, was to find someone > who can be sponsored fixing unionfs ;-) And bringing MNAMELEN into 21st > century state, matching ZFS needs: > https://lists.freebsd.org/pipermail/freebsd-hackers/2015-November/048640.html > This is another patch I'm carrying for a very long time which solves > tremendous limitations for me. Without that, I couldn't use ZFS > snapshots in real world, along with a human-friendly dataset naming :-) > > -Harry > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"