From owner-freebsd-arch@FreeBSD.ORG Fri Oct 13 09:24:34 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.ORG Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 507D216A416 for ; Fri, 13 Oct 2006 09:24:32 +0000 (UTC) (envelope-from gni@gecko.de) Received: from kirk.baltic.net (kirk.baltic.net [193.189.247.10]) by mx1.FreeBSD.org (Postfix) with SMTP id BD4E843D80 for ; Fri, 13 Oct 2006 09:24:24 +0000 (GMT) (envelope-from gni@gecko.de) Received: (qmail 18908 invoked from network); 13 Oct 2006 09:14:05 -0000 Received: from waldorf.gecko.de (HELO asterix.int.gecko.de) (193.189.247.200) by kirk.baltic.net with SMTP; 13 Oct 2006 09:14:05 -0000 Received: from [192.168.60.99] (mail.rst-rostock.de [82.193.240.2]) by asterix.int.gecko.de; Fri, 13 Oct 2006 11:27:52 +0200 Message-ID: <452F5A8D.8090609@gecko.de> Date: Fri, 13 Oct 2006 11:21:17 +0200 From: Gunther Nikl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 MIME-Version: 1.0 To: freebsd-arch@FreeBSD.ORG, matteo@FreeBSD.ORG References: <200610101521.k9AFLJSX033185@lurza.secnetix.de> In-Reply-To: <200610101521.k9AFLJSX033185@lurza.secnetix.de> Content-Type: multipart/mixed; boundary="------------020706010402050204040408" Cc: Subject: Re: RFC: use of mdmfs "new" options in fstab X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2006 09:24:34 -0000 This is a multi-part message in MIME format. --------------020706010402050204040408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Oliver Fromme wrote: > Matteo Riondato wrote: > > This means that it's impossible to use mdmfs "new" option > > in fstab, which is quite limiting. > > Yes, it's a real PITA. For example, I would like to mount > several memory file systems from within fstab, but I don't > need nor want soft-updates. Howver, the -S option is not > available for mount_mfs. I was using a mfs /tmp on a 4.x setup and migrating it to 5.x was harder than expected. This included the wish to disable softupdates and using FFSv1. Before I noticed the rc support for md /tmp, I created a /sbin/mount_md script to get access to all fancy mdmfs options from within /etc/fstab. > (On a related note, I also don't want the .snap directory > to appear on those memory file systems. newfs(8) has the > -n option to suppress it, but mdmfs doesn't.) Attached is a patch (against 6-STABLE) that corrects the -n option. Its probably an oversight that -n has still the old meaning there. FWIW, the patch is incomplete since the manpage isn't changed. > > 2)disable bug-for-bug compatibility with mount_mfs when the > > program name is "mount_mfs" or "mfs". The "-C" otion will still be > > available for those who want compatibility. See attached > > mdmfs.c.diff . > > > > I would prefer option #2, but any comment is really appreciated. > > Personally, I would love to see #2 committed (and MFCed). Yes, that would be worthwhile. > Therefore I propose that your patch #2 be slightly > modified: When mdmfs is called as mount_mfs, don't > imply -C (hence all options are available), but do > imply -p 1777. Then it shouldn't break any existing > usages, as far as I can imagine. Good catch. At first I missed the implied -p 1777 when switching from mfs to my homegrown mount_md script. Gunther --------------020706010402050204040408 Content-Type: text/plain; name="dif-mdmfs.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dif-mdmfs.c" Index: mdmfs.c =================================================================== RCS file: /home/ncvs/src/sbin/mdmfs/mdmfs.c,v retrieving revision 1.23.2.1 diff -u -r1.23.2.1 mdmfs.c --- mdmfs.c 4 Nov 2005 19:37:14 -0000 1.23.2.1 +++ mdmfs.c 25 May 2006 12:21:44 -0000 @@ -121,7 +121,7 @@ compat = true; while ((ch = getopt(argc, argv, - "a:b:Cc:Dd:e:F:f:hi:LlMm:Nn:O:o:p:Ss:t:Uv:w:X")) != -1) + "a:b:Cc:Dd:e:F:f:hi:LlMm:NnO:o:p:Ss:t:Uv:w:X")) != -1) switch (ch) { case 'a': argappend(&newfs_arg, "-a %s", optarg); @@ -187,7 +187,7 @@ norun = true; break; case 'n': - argappend(&newfs_arg, "-n %s", optarg); + argappend(&newfs_arg, "-n"); break; case 'O': argappend(&newfs_arg, "-o %s", optarg); @@ -666,15 +666,15 @@ name = "mdmfs"; if (!compat) fprintf(stderr, -"usage: %s [-DLlMNSUX] [-a maxcontig] [-b block-size] [-c cylinders]\n" +"usage: %s [-DLlMNnSUX] [-a maxcontig] [-b block-size] [-c cylinders]\n" "\t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n" -"\t[-m percent-free] [-n rotational-positions] [-O optimization]\n" -"\t[-o mount-options] [-p permissions] [-s size] [-v version]\n" -"\t[-w user:group] md-device mount-point\n", name); +"\t[-m percent-free] [-O optimization] [-o mount-options]\n" +"\t[-p permissions] [-s size] [-v version] [-w user:group]\n" +"\tmd-device mount-point\n", name); fprintf(stderr, -"usage: %s -C [-lNU] [-a maxcontig] [-b block-size] [-c cylinders]\n" +"usage: %s -C [-lNnU] [-a maxcontig] [-b block-size] [-c cylinders]\n" "\t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n" -"\t[-m percent-free] [-n rotational-positions] [-O optimization]\n" -"\t[-o mount-options] [-s size] [-v version] md-device mount-point\n", name); +"\t[-m percent-free] [-O optimization] [-o mount-options] [-s size]\n" +"\t[-v version] md-device mount-point\n", name); exit(1); } --------------020706010402050204040408--