From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 15 02:50:09 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4F7A16A41F for ; Thu, 15 Dec 2005 02:50:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C13E43D79 for ; Thu, 15 Dec 2005 02:50:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id jBF2o6BW013239 for ; Thu, 15 Dec 2005 02:50:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id jBF2o6Cv013238; Thu, 15 Dec 2005 02:50:06 GMT (envelope-from gnats) Resent-Date: Thu, 15 Dec 2005 02:50:06 GMT Resent-Message-Id: <200512150250.jBF2o6Cv013238@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lanny Jason Godsey Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81C0D16A41F for ; Thu, 15 Dec 2005 02:45:11 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 217ED43D5C for ; Thu, 15 Dec 2005 02:45:11 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id jBF2jAdu006145 for ; Thu, 15 Dec 2005 02:45:11 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id jBF2jASe006144; Thu, 15 Dec 2005 02:45:10 GMT (envelope-from nobody) Message-Id: <200512150245.jBF2jASe006144@www.freebsd.org> Date: Thu, 15 Dec 2005 02:45:10 GMT From: Lanny Jason Godsey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: misc/90415: Add -Z (no newfs) to sbin/mount_mfs. Use with existing vnode backed devices between reboots. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2005 02:50:10 -0000 >Number: 90415 >Category: misc >Synopsis: Add -Z (no newfs) to sbin/mount_mfs. Use with existing vnode backed devices between reboots. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Dec 15 02:50:05 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Lanny Jason Godsey >Release: RELENG_6_0 >Organization: >Environment: FreeBSD ne1.yournix.com 6.0-RELEASE FreeBSD 6.0-RELEASE #6: Mon Dec 5 11:48:50 EST 2005 root@ne1.yournix.com:/usr/obj/usr/src/sys/YOURNIX i386 >Description: Add -Z (no newfs) to sbin/mount_mfs. Use with existing vnode backed devices between reboots. ne1# cat /etc/fstab md /fs mfs rw,noatime,-Z,-F=/home/fs.img 0 0 ne1# df /dev/md2 495726 6 456062 0% /fs ne1# mdconfig -l -u md2 md2 vnode 500M /local/fs.img >How-To-Repeat: >Fix: Index: mdmfs.8 =================================================================== RCS file: /usr/ncvs/src/sbin/mdmfs/mdmfs.8,v retrieving revision 1.20 diff -u -r1.20 mdmfs.8 --- mdmfs.8 17 May 2004 08:35:41 -0000 1.20 +++ mdmfs.8 15 Dec 2005 02:43:26 -0000 @@ -263,6 +263,9 @@ .It Fl X Print what command will be run before running it, and other assorted debugging information. +.It Fl Z +Skip newfs(8) command. Use with existing vnode backed +devices between boots. .El .Pp The Index: mdmfs.c =================================================================== RCS file: /usr/ncvs/src/sbin/mdmfs/mdmfs.c,v retrieving revision 1.23 diff -u -r1.23 mdmfs.c --- mdmfs.c 10 Feb 2005 09:19:30 -0000 1.23 +++ mdmfs.c 15 Dec 2005 02:43:26 -0000 @@ -90,6 +90,7 @@ enum md_types mdtype; /* The type of our memory disk. */ bool have_mdtype; bool detach, softdep, autounit; + bool no_newfs; char *mtpoint, *unitstr; char *p; int ch; @@ -98,6 +99,7 @@ /* Misc. initialization. */ (void)memset(&mi, '\0', sizeof(mi)); + no_newfs = false; detach = true; softdep = true; autounit = false; @@ -121,7 +123,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:Nn:O:o:p:Ss:t:Uv:w:XZ")) != -1) switch (ch) { case 'a': argappend(&newfs_arg, "-a %s", optarg); @@ -228,6 +230,9 @@ usage(); debug = true; break; + case 'Z': + no_newfs = true; + break; default: usage(); } @@ -271,7 +276,8 @@ do_mdconfig_attach_au(mdconfig_arg, mdtype); else do_mdconfig_attach(mdconfig_arg, mdtype); - do_newfs(newfs_arg); + if (!no_newfs) + do_newfs(newfs_arg); do_mount(mount_arg, mtpoint); do_mtptsetup(mtpoint, &mi); @@ -670,13 +676,13 @@ name = "mdmfs"; if (!compat) fprintf(stderr, -"usage: %s [-DLlMNSUX] [-a maxcontig] [-b block-size] [-c cylinders]\n" +"usage: %s [-DLlMNSUXZ] [-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); fprintf(stderr, -"usage: %s -C [-lNU] [-a maxcontig] [-b block-size] [-c cylinders]\n" +"usage: %s -C [-lNUZ] [-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); >Release-Note: >Audit-Trail: >Unformatted: