summaryrefslogtreecommitdiffstats
path: root/sbin/mdmfs
diff options
context:
space:
mode:
authorak <ak@FreeBSD.org>2016-03-11 06:07:09 +0000
committerak <ak@FreeBSD.org>2016-03-11 06:07:09 +0000
commit888ca89bc6c26e54b31a84cb42509792a76a5ae1 (patch)
tree8ab9d847ee5b5c9fdfea3776cd3bc34ec170873e /sbin/mdmfs
parent7d184288717893d0b477ef3ca74b465dc38f9203 (diff)
downloadFreeBSD-src-888ca89bc6c26e54b31a84cb42509792a76a5ae1.zip
FreeBSD-src-888ca89bc6c26e54b31a84cb42509792a76a5ae1.tar.gz
- Implement -T option to allow to specify a fs type for a vnode-backed memory disk
- Rephrase -t option description (manpage) - Split long sentences (manpage) Differential Review: https://reviews.freebsd.org/D4394 Reviewed by: mav, wblock (manpage) Approved by: mav
Diffstat (limited to 'sbin/mdmfs')
-rw-r--r--sbin/mdmfs/mdmfs.834
-rw-r--r--sbin/mdmfs/mdmfs.c5
2 files changed, 31 insertions, 8 deletions
diff --git a/sbin/mdmfs/mdmfs.8 b/sbin/mdmfs/mdmfs.8
index f38d29d..a91cab2 100644
--- a/sbin/mdmfs/mdmfs.8
+++ b/sbin/mdmfs/mdmfs.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 7, 2016
+.Dd March 9, 2016
.Dt MDMFS 8
.Os
.Sh NAME
@@ -36,7 +36,7 @@
driver
.Sh SYNOPSIS
.Nm
-.Op Fl DLlMNnPStUX
+.Op Fl DLlMNnPStTUX
.Op Fl a Ar maxcontig
.Op Fl b Ar block-size
.Op Fl c Ar blocks-per-cylinder-group
@@ -51,6 +51,7 @@ driver
.Op Fl o Ar mount-options
.Op Fl p Ar permissions
.Op Fl s Ar size
+.Op Fl T Ar fstype
.Op Fl v Ar version
.Op Fl w Ar user : Ns Ar group
.Ar md-device
@@ -228,10 +229,19 @@ backed disks
.It Fl t
Turn on the TRIM enable flag for
.Xr newfs 8 .
-The
+When used with a file system that issue BIO_DELETE bio requests,
.Xr md 4
-device supports the BIO_DELETE command, enabling the TRIM on created
-filesystem allows return of freed memory to the system pool.
+returns deleted blocks to the system memory pool.
+.It Fl T Ar fstype
+Specify a file system type for a vnode-backed memory disk.
+Any file system supported by
+.Xr mount 8
+command can be specified.
+This option only makes sense when
+.Fl F
+and
+.Fl P
+are used.
.It Fl U
Enable soft-updates on the file system.
This is the default, and is accepted only
@@ -283,8 +293,8 @@ and
.Fl n
options are passed to
.Xr newfs 8
-with the same letter;
-the
+with the same letter.
+The
.Fl O
option is passed to
.Xr newfs 8
@@ -295,6 +305,12 @@ The
option is passed to
.Xr mount 8
with the same letter.
+The
+.Fl T
+option is passed to
+.Xr mount 8
+as
+.Fl t .
See the programs that the options are passed to for more information
on their semantics.
.Sh EXAMPLES
@@ -335,6 +351,10 @@ Configure a vnode-backed file system and mount its first partition,
using automatic device numbering:
.Pp
.Dl "mdmfs -P -F foo.img mds1a /tmp/"
+.Pp
+Mount a vnode-backed cd9660 file system using automatic device numbering:
+.Pp
+.Dl "mdmfs -T cd9660 -P -F foo.iso md /tmp"
.Sh COMPATIBILITY
The
.Nm
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index 66a6911..4b3a012 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -129,7 +129,7 @@ main(int argc, char **argv)
}
while ((ch = getopt(argc, argv,
- "a:b:Cc:Dd:E:e:F:f:hi:LlMm:NnO:o:Pp:Ss:tUv:w:X")) != -1)
+ "a:b:Cc:Dd:E:e:F:f:hi:LlMm:NnO:o:Pp:Ss:tT:Uv:w:X")) != -1)
switch (ch) {
case 'a':
argappend(&newfs_arg, "-a %s", optarg);
@@ -218,6 +218,9 @@ main(int argc, char **argv)
case 't':
argappend(&newfs_arg, "-t");
break;
+ case 'T':
+ argappend(&mount_arg, "-t %s", optarg);
+ break;
case 'U':
softdep = true;
break;
OpenPOWER on IntegriCloud