From owner-freebsd-arch@FreeBSD.ORG Sat Mar 8 17:12:25 2014 Return-Path: Delivered-To: freebsd-arch@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 ESMTPS id 371BF63D; Sat, 8 Mar 2014 17:12:25 +0000 (UTC) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB23C6B8; Sat, 8 Mar 2014 17:12:24 +0000 (UTC) Received: by mail-ob0-f178.google.com with SMTP id wp18so5412625obc.23 for ; Sat, 08 Mar 2014 09:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=lTewJyv+dA1klkTiv2wkMblGiNrwBwdS2SGlSBgvW8g=; b=CX8yLLZiYx5CJO+OlwXZ/ywdKe9MafyDLbeLPMxOh+wxqZoNyHfcuwAtRuTOhdzR9p mtuoFn152EPQd8ydoyHBX0JITFr24cRnsUNaT6L3+3VWfcvpCMD1eZqYG6BfHdufbLw4 TqnGu6h8HlTcSrK+VS6a0Of8E+VsyYrGNF0v+tyV6p1wiWvYpAtUAdqHiOzrpe/696Bg X/J0p1UxWKtAX5qRvmxVyW4wrfhwd+U/lOa19Mwa/Sbeeq40lG5BEtL1wsHMQUOZduRi OFbZ1+HYRF1GwrUjaJuBWeMZgXwwK4OsonrjMt95ZLMWt+MBhgwO9LApRPDVkyOqb2GA JfTg== X-Received: by 10.60.51.230 with SMTP id n6mr16650075oeo.35.1394298744183; Sat, 08 Mar 2014 09:12:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.80.194 with HTTP; Sat, 8 Mar 2014 09:11:54 -0800 (PST) In-Reply-To: <1394290468.1149.397.camel@revolution.hippie.lan> References: <1394148413.1149.348.camel@revolution.hippie.lan> <1394199416.1149.367.camel@revolution.hippie.lan> <1394290468.1149.397.camel@revolution.hippie.lan> From: Jia-Shiun Li Date: Sun, 9 Mar 2014 01:11:54 +0800 Message-ID: Subject: Re: Teach mdmfs about tmpfs and use tmpfs in rc scripts To: Ian Lepore Content-Type: text/plain; charset=UTF-8 Cc: freebsd-rc@freebsd.org, freebsd-arch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 17:12:25 -0000 On Sat, Mar 8, 2014 at 10:54 PM, Ian Lepore wrote: > Okay, if people think that all this work should be done in the rc > scripts rather than in a program, then the rc scripts need to be changed > to do what I did in the program: honor existing options that make sense > for tmpfs (any -o options for the mount, translate -s to size=, and > don't use tmpfs if the config requests multilabel MAC). And the changes > need to happen in rc.subr and in rc.initdiskless which doesn't use > rc.subr. Oh, and of course, don't do any of it if tmpfs isn't > available. > > If this isn't done, peoples' existing configurations may break (in the > case of the MAC option, break in a way with potential security > implications). > > I've gotta say, I don't understand the basic resistance to having a > single unified tool for configuring a memory filesystem. > Probably because we were focusing on the usual rc case? For the usual rc case it is easier to change scripts to use tmpfs altogether. But it will break compatibility of rc.conf flags too. Upgraded users will need to modify them manually. And I am not sure if there are more advanced uses, like setting multilabel for /var & /tmp. In these cases your patch makes more sense. Think that's just us not catching your point yet. ;) -Jia-Shiun.