From owner-svn-src-head@FreeBSD.ORG Tue Nov 18 15:19:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20648A75; Tue, 18 Nov 2014 15:19:31 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 867BB31D; Tue, 18 Nov 2014 15:19:30 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sAIFJPhr050607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Nov 2014 17:19:25 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sAIFJPhr050607 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sAIFJPYO050606; Tue, 18 Nov 2014 17:19:25 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Nov 2014 17:19:25 +0200 From: Konstantin Belousov To: Mark Felder Subject: Re: svn commit: r274653 - head/usr.sbin/freebsd-update Message-ID: <20141118151925.GX17068@kib.kiev.ua> References: <201411181338.sAIDc9U3051869@svn.freebsd.org> <20141118142449.GW17068@kib.kiev.ua> <1416321839.350194.192432157.42AB6F37@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1416321839.350194.192432157.42AB6F37@webmail.messagingengine.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, cperciva@freebsd.org, Ian Lepore X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 15:19:31 -0000 On Tue, Nov 18, 2014 at 08:43:59AM -0600, Mark Felder wrote: > On Tue, Nov 18, 2014, at 08:24, Konstantin Belousov wrote: > > Why do you suppose that md-backed volumes are not persistent ? > > vnode-backed devices are stable. > > > > You're right, a vnode-backed filesystem would definitely be persistent. > Clearly I've done a poor job of researching this thoroughly. I've now > read md(4) in its entirety and remember mounting disk images like > Linux's "mount -o loop" in the past. I don't see a way to reliably > detect an mfs filesystem because it uses md and masquerades as ufs in > df's output. Do you have any suggestions on how to detect this reliably? > > On the other hand, anyone could write a filesystem we aren't > blacklisting and fall into the same trap. I thought this was going to > help a few people since Oliver reported it and seemed to have a valid > use-case for a tmpfs mounted /var but still wanted to use > freebsd-update. Instead I'm beginning to think we should just throw this > away and add an entry into BUGS in the man page and call it a day. We > can't keep everyone from shooting their feet off and we probably > shouldn't waste our time trying. Up to you. You could somewhat improve this by parsing mdconfig -lv output and see if the device is swap/memory or vnode backed. In either case, if the code to detect transient /var is kept around, there should be a way to turn heuristic off and just do what user asked for. Some sort of the force flag.