From lxv@omut.org  Mon May 17 10:06:55 2004
Return-Path: <lxv@omut.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8B8D816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 May 2004 10:06:55 -0700 (PDT)
Received: from mail.omut.org (mail.omut.org [216.218.215.140])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 727E543D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 May 2004 10:06:53 -0700 (PDT)
	(envelope-from lxv@omut.org)
Received: from tadpole.intranet (mix-anchor.intranet [10.10.10.251])
	by mail.omut.org (8.12.11/8.12.11) with ESMTP id i4HH6jj5035953
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 May 2004 10:06:45 -0700 (PDT)
	(envelope-from lxv@omut.org)
Received: from tadpole.intranet (localhost [127.0.0.1])
	by tadpole.intranet (8.12.11/8.12.11) with ESMTP id i4HH6iLO007975
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 May 2004 13:06:44 -0400 (EDT)
	(envelope-from lxv@tadpole.intranet)
Received: (from lxv@localhost)
	by tadpole.intranet (8.12.11/8.12.11/Submit) id i4HH6irJ007974;
	Mon, 17 May 2004 13:06:44 -0400 (EDT)
	(envelope-from lxv)
Message-Id: <200405171706.i4HH6irJ007974@tadpole.intranet>
Date: Mon, 17 May 2004 13:06:44 -0400 (EDT)
From: Alex Vasylenko <lxv@omut.org>
Reply-To: Alex Vasylenko <lxv@omut.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: mdmfs: sync arguments with those of newfs, disallow '-l' in compatibility mode
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66763
>Category:       bin
>Synopsis:       mdmfs: sync arguments with those of newfs, disallow '-l' in compatibility mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    matteo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 17 10:10:15 PDT 2004
>Closed-Date:    Sun Mar 11 18:26:15 GMT 2007
>Last-Modified:  Sun Mar 11 18:30:04 GMT 2007
>Originator:     Alex Vasylenko
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 5.2-CURRENT #6: Sat May 15 14:17:15 EDT 2004


>Description:
	1. The '-n' flag to mdmfs(8) currently gets passed to newfs(8).
	However, this flag is no longer supported by newfs(8), so the command
	is going to fail. Make mdmfs(8) ignore the flag in compatibility mode;
	remove the support for this flag when in normal mode.

	2. The new '-l' flag is permitted when mdmfs(8) is run in compatibility
	mode (either 'mdmfs -C' or 'mount_mfs'), but it should not be. 

	NOTE: Do we still need the compatibility mode? (would be a nice if it's
	gone, as some useful options can't be used with mdmfs from fstab(5)).

	3. Synchronize parameter names with those of newfs(8) for arguments
	passed to newfs(8):
	-c: cylinders -> blocks-per-cylinder-group
	-d: rotdelay -> max-extent-size

	4. Note in the man page that '-l' is passed to newfs(8)

>How-To-Repeat:
	mdmfs -n 32 -s 32m md /mnt
	mdmfs -C -l -s 32m md /mnt

>Fix:

Index: mdmfs.c
===================================================================
RCS file: /home/ncvs/src/sbin/mdmfs/mdmfs.c,v
retrieving revision 1.20
diff -u -p -r1.20 mdmfs.c
--- mdmfs.c	17 May 2004 07:07:20 -0000	1.20
+++ mdmfs.c	17 May 2004 15:59:53 -0000
@@ -168,6 +168,8 @@ main(int argc, char **argv)
 			loudsubs = true;
 			break;
 		case 'l':
+			if (compat)
+				usage();
 			argappend(&newfs_arg, "-l");
 			break;
 		case 'M':
@@ -185,7 +187,8 @@ main(int argc, char **argv)
 			norun = true;
 			break;
 		case 'n':
-			argappend(&newfs_arg, "-n %s", optarg);
+			if (!compat)
+				usage();
 			break;
 		case 'O':
 			argappend(&newfs_arg, "-o %s", optarg);
@@ -665,14 +668,14 @@ usage(void)
 		name = "mdmfs";
 	if (!compat)
 		fprintf(stderr,
-"usage: %s [-DLlMNSUX] [-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"
+"usage: %s [-DLlMNSUX] [-a maxcontig [-b block-size] [-c blocks-per-cylinder-group]\n"
+"\t[-d max-extent-size] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n"
+"\t[-m percent-free] [-O optimization]\n"
 "\t[-o mount-options] [-p permissions] [-s size] [-w user:group]\n"
 "\tmd-device mount-point\n", name);
 	fprintf(stderr,
-"usage: %s -C [-lNU] [-a maxcontig] [-b block-size] [-c cylinders]\n"
-"\t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n"
+"usage: %s -C [-NU] [-a maxcontig] [-b block-size] [-c blocks-per-cylinder-group]\n"
+"\t[-d max-extent-size] [-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] md-device mount-point\n", name);
 	exit(1);


Index: mdmfs.8
===================================================================
RCS file: /home/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	17 May 2004 16:04:20 -0000
@@ -39,14 +39,13 @@
 .Op Fl DLlMNSUX
 .Op Fl a Ar maxcontig
 .Op Fl b Ar block-size
-.Op Fl c Ar cylinders
-.Op Fl d Ar rotdelay
+.Op Fl c Ar blocks-per-cylinder-group
+.Op Fl d Ar max-extent-size
 .Op Fl e Ar maxbpg
 .Op Fl F Ar file
 .Op Fl f Ar frag-size
 .Op Fl i Ar bytes
 .Op Fl m Ar percent-free
-.Op Fl n Ar rotational-positions
 .Op Fl O Ar optimization
 .Op Fl o Ar mount-options
 .Op Fl p Ar permissions
@@ -60,8 +59,8 @@
 .Op Fl lNU
 .Op Fl a Ar maxcontig
 .Op Fl b Ar block-size
-.Op Fl c Ar cylinders
-.Op Fl d Ar rotdelay
+.Op Fl c Ar blocks-per-cylinder-group
+.Op Fl d Ar max-extent-size
 .Op Fl e Ar maxbpg
 .Op Fl F Ar file
 .Op Fl f Ar frag-size
@@ -130,25 +129,30 @@
 option).
 .It Fl b Ar block-size
 The block size of the file system, in bytes.
+See
+.Xr newfs 8
+for details.
 .It Fl C
 Enable full compatibility mode with
 .Xr mount_mfs 8 .
 See the
 .Sx COMPATIBILITY
 section for more information.
-.It Fl c Ar cylinders
-The number of cylinders per cylinder group in the file system.
+.It Fl c Ar blocks-per-cylinder-group
+The number of blocks per cylinder group in a file system.
+See
+.Xr newfs 8
+for details.
 .It Fl D
 If not using auto-unit,
 do not run
 .Xr mdconfig 8
 to try to detach the unit before attaching it.
-.It Fl d Ar rotdelay
-Specify the minimum time in milliseconds required to initiate another
-disk transfer on the same cylinder.
-Modern disks with read/write-behind achieve higher performance without
-this feature,
-so it is best to leave it at 0 milliseconds.
+.It Fl d Ar max-extent-size
+The file system may choose to store large files using extents.
+This parameter specifies the largest extent size that may be used.
+It is presently limited to its default value which is 16 times
+the file system blocksize.
 .It Fl e Ar maxbpg
 Indicate the maximum number of blocks any single file can allocate
 out of a cylinder group before it is forced to begin allocating
@@ -182,7 +186,7 @@
 This is most useful in conjunction with
 .Fl X .
 .It Fl n Ar rotational-positions
-The default number of rotational positions to distinguish.
+This option is obsolete and is supported for compatibility only.
 .It Fl O Ar optimization
 Select the optimization preference;
 valid choices are
@@ -277,9 +281,9 @@
 .Fl s ,
 respectively.
 The
-.Fl a , b , c , d , e , f , i , m
+.Fl a , b , c , d , e , f , i , l
 and
-.Fl n
+.Fl m
 options are passed to
 .Xr newfs 8
 with the same letter;
@@ -288,7 +292,13 @@
 option is passed to
 .Xr newfs 8
 as
-.Fl o .
+.Fl o ;
+the
+.Fl v
+option is passed to
+.Xr newfs 8
+as
+.Fl O .
 The
 .Fl o
 option is passed to
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->matteo 
Responsible-Changed-By: matteo 
Responsible-Changed-When: Sun Nov 12 11:06:38 UTC 2006 
Responsible-Changed-Why:  
Take this as I'm interested in md(4)'s use in fstab 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66763 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/66763: commit references a PR
Date: Thu, 15 Feb 2007 14:46:11 +0000 (UTC)

 matteo      2007-02-15 14:46:05 UTC
 
   FreeBSD src repository
 
   Modified files:
     sbin/mdmfs           mdmfs.8 mdmfs.c 
   Log:
   Correct -c and -d description.
   
   Other requests made in the PR were already solved in the past.
   
   PR:             bin/66763
   MFC after:      1 week
   
   Revision  Changes    Path
   1.27      +10 -11    src/sbin/mdmfs/mdmfs.8
   1.30      +6 -5      src/sbin/mdmfs/mdmfs.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: matteo 
State-Changed-When: Thu Feb 15 14:53:03 UTC 2007 
State-Changed-Why:  
Patched. I'll MFC it next week 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66763 
State-Changed-From-To: patched->closed 
State-Changed-By: matteo 
State-Changed-When: Sun Mar 11 18:25:50 UTC 2007 
State-Changed-Why:  
MFC'ed to RELENG_6 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66763 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/66763: commit references a PR
Date: Sun, 11 Mar 2007 18:24:30 +0000 (UTC)

 matteo      2007-03-11 18:24:23 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sbin/mdmfs           mdmfs.8 mdmfs.c 
   Log:
   mdmfs.c: MFC revs 1.29-1.31
   mdmfs.8: MFC revs 1.27-1.29
   
   PR:             bin/66763 103501 kern/109863
   
   Revision  Changes    Path
   1.20.8.2  +48 -13    src/sbin/mdmfs/mdmfs.8
   1.23.2.3  +32 -16    src/sbin/mdmfs/mdmfs.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
