History log of /freebsd-10.1-release/sbin/mdmfs/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


233648 29-Mar-2012 eadler

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


229778 07-Jan-2012 uqs

Spelling fixes for sbin/


225534 13-Sep-2011 kib

Do not try to change the mode or ownership of the root of the mountpoint
when newly established mdmfs mount is readonly.

PR: bin/128427
Tested and reviewed by: jchandra
MFC after: 1 week
Approved by: re (bz)


225416 06-Sep-2011 kib

dd -t switch for mdmfs to enable TRIM on the configured filesystem.
While there, fix minor style issues.

Submitted by: Alex Kozlov <spam rm-rf kiev ua>
MFC after: 1 week
Approved by: re (bz)


198236 19-Oct-2009 ru

Switch the default WARNS level for sbin/ to 6.

Submitted by: Ulrich Spörlein


169560 14-May-2007 remko

-n is used by newfs to tell "do not generate a .snap directory" instead of
specifying rotational-positions, reflect that in the command arguments.

PR: bin/110178
Submitted by: Alex Kozlov <spam at rm-rf dot kiev dot ua>
Approved by: imp (mentor)


169129 30-Apr-2007 yar

Fix a typo: argv -> argvp

Rationale:
We are interested in the current (last) element of the argv array
there, not in its first element. The if construct is there because
we want to avoid adding empty (zero-length) arguments to argv, so
we just don't advance argvp if the current argument is empty, and
it gets overwritten at the next iteration. Note that strsep(3)
doesn't treat consecutive delim characters as a single separator,
it returns empty fields between such characters, and it's up to the
caller to handle them this or that way.

Also add a comment that the argv array ends up null-terminated in
any case (it's due to the design of the for loop) as an answer to
a possible question why the whole argv isn't zero-filled.

Submitted by: yongari
Tested by: yongari
MFC after: 3 days


167286 07-Mar-2007 yar

Don't leave a NULL value in mdsuffix when a particular md
unit w/o suffix is specified. It had better be an empty
string as it will be passed to a printf-like function that
builds the command line to run.

PR: kern/109863
MFC after: 1 week


166772 15-Feb-2007 ceri

Grammar nits.


166765 15-Feb-2007 matteo

Add examples for configuring and mounting geom_uzip(4) based disks'
image and sliced/partitioned memory disks.
MFC after: 1 week


166752 15-Feb-2007 matteo

Correct -c and -d description.

Other requests made in the PR were already solved in the past.

PR: bin/66763
MFC after: 1 week


166749 15-Feb-2007 matteo

Enhances mdmfs(8) to mount md-based device such as uzip.
Examples of use can be found in the PR text.

PR: 103501
MFC after: 1 week


163952 03-Nov-2006 ru

Remove the -C option as it does more harm than good. To be fully
compatible, it would have to (at least):

- support the "compat-compat" -T option,
- *not* support the -l, -O, and -v options,
- default to soft updates being disabled.

Worse, the compatibility mode makes it impossible to mount_mfs(8)
a file system from fstab(5) with soft updates disabled (-S). [1]

Now, the only difference when called as "mount_mfs" or "mfs" (as
opposed to "mdmfs") is that the file mode of the mount point is
set by default to 01777. All options available to mdmfs(8) are
also available to mount_mfs(8); the -C option is still recognized
but ignored for backward compatibility.

PR: bin/98860 [1]
MFC after: 2 weeks


163576 21-Oct-2006 ru

Fix .Dd arguments.


162921 01-Oct-2006 matteo

The UFS filesystem get created only if -P was not specified.
Specify this on the description

MFC after: 3 days


162395 18-Sep-2006 ru

Markup fixes.


155769 16-Feb-2006 sobomax

Add new -E option, which allows to specify location of the mdconfig(8)
utility instead of using default _PATH_MDCONFIG (/sbin/mdconfig).

MFC after: 1 week


153961 02-Jan-2006 dd

Add a -P option to allow skipping newfs when using a vnode-backed
disk. Apparently some people want to use mdmfs as mount_* as a
shortcut for mounting existing file-based file systems.

Note that unlike in the patches from the submitters, this option is
not available in compat mode. Compat mode was supposed to support only
things that mount_mfs used to support. To use this option from fstab,
mdmfs should be called mount_md, not mount_mfs. This distinction has
not always upkept for new options, and those can't be fixed now
without breaking people's systems, but new options should not usually
be allowed in compat mode. (Not sure why -F is allowed there at all.)

PR: 57641
Submitted by: Ruben de Groot
Submitted independently by: Wojciech A. Koszek, for Urzad Miasta Czestochowa


153637 22-Dec-2005 dd

If we're operating without running external programs (-N) and
autonumbering is requested, set the unit to 0 instead of -1. This
option is just for output, and "/dev/md-1" looks disconcerting.

Submitted by: Wojciech A. Koszek


151315 14-Oct-2005 rse

Fix parsing of mdmfs(8) option "-w <user>:<group>" in case <user> or
<group> is a numeric user/group ID instead of a user/group name (as
explicitly intended to be allowed by both the manual page and the
implementation).

Before this fix, mdmfs(8) aborted:

| # mdmfs -s 32m -w 0:0 md /var/tmp/foo
| Assertion failed: (mip->mi_have_uid), function extract_ugid, file /usr/src/sbin/mdmfs/mdmfs.c, line 555.
| Abort trap (core dumped)

The "mi_have_[ug]id" fields were only set in case a name lookup was
successful. Instead they also have to be set in case the string to
integer conversion was successful.

Additionally, as a result of this fix, two assertions at the end of
the function are now always true and hence can be just be removed. It
is guarrantied that both the UID and the GID are set when the function
returns regularily, else it would have been already bailed out with
usage()/exit(3) or errx(3) before.

Spotted by: Christoph Schug <chris@schug.net>
MFC after: 3 days


141611 10-Feb-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


141082 31-Jan-2005 ssouhlal

Remove unsigned casts.

Discussed with: delphij, stefanf
Approved by: grehan (mentor)


140815 25-Jan-2005 ssouhlal

- Make WARNS?= 6 clean
- Add WARNS?= 6

Approved by: stefanf, grehan (mentor)


129327 17-May-2004 ru

Assorted markup, grammar, and spelling fixes.


129322 17-May-2004 ru

Added -l to usage().


126255 26-Feb-2004 rwatson

Add a "-l" parameter to mdmfs so that memory file systems can be
created with the multilabel flag from inception. This simply
passes the "-l" flag on to newfs(8).

Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research


124830 22-Jan-2004 grehan

Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe


118500 05-Aug-2003 yar

Don't reinvent the wheel: Use setmode(3) to interpret
a file mode specification from the command line. This
approach is more flexible and less error-prone than using
a mere strtoul(3).


117430 11-Jul-2003 kan

Do not compare unsigned int values with ULONG_MAX. The comparison is
always false on 64bit platforms and GCC 3.3.1 issues warning there.


117037 29-Jun-2003 gordon

Remove pathnames.h.

Pointed out by: Mathieu Arnold <mat@mat.cc>


117033 29-Jun-2003 gordon

Move path definitions to include/paths.h. This makes it easier to override
these definitions in the /rescue case.

Submitted by: Tim Kientzle <kientzle@acm.org>


115115 17-May-2003 ru

mdoc(7) fix: Add the forgotten paragraph command.

Approved by: re (blanket)


114765 05-May-2003 dougb

Add an example of how to create an fstab entry.


114589 03-May-2003 obrien

Use __FBSDID() to quiet GCC 3.3 warnings.


114097 27-Apr-2003 dougb

Also MLINK the man page for mount_mfs.


114095 27-Apr-2003 dougb

Install a mount_mfs symlink so that you can specify something like this
in /etc/fstab to get a memory disk:

md /tmp mfs rw,-s8m,noatime 2 2

Back when mdmfs was created, there was vague discussion about doing this, but
it never materialized.

Reminded by: Ralf S. Engelschall <rse@engelschall.com>


108317 27-Dec-2002 schweikh

english(4) police.


107475 01-Dec-2002 rwatson

Teach mdmfs how to pass UFS version numbers through to newfs. Because
of an argument name collision with -O, use -v, and default to whatever
the newfs default is for the platform (generally, UFS1). This is
required to support diskless workstations that use UFS2 for their
mdmfs file systems.

Reviewed by: dd, bmah
Approved by: re (bmah)
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories


103798 22-Sep-2002 phk

Don't disklabel(8) the md(4) device, it is not needed, and we don't want
to propagete BSD disklabels to architectures not already so polluted.

Sponsored by: DARPA & NAI Labs.


102231 21-Aug-2002 trhodes

s/filesystem/file system/g as discussed on -developers


99501 06-Jul-2002 charnier

The .Nm utility


95258 22-Apr-2002 des

Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.


87325 04-Dec-2001 obrien

Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by: mike


84167 30-Sep-2001 iedowse

Enable bug-for-bug compatibility with mount_mfs when the program
name is "mount_mfs" or "mfs". Previously, the condition was that
the program name must start with "mount_", but this both missed
the case where mount(8) invokes mdmfs with argv[0] = "mfs", and it
included cases such as "mount_md" where compatibility is not
required.

Reviewed by: dd


81752 16-Aug-2001 ru

mdoc(7) police: Section cross-references are marked with .Sx.
-compat is not a valid keyword.


81742 16-Aug-2001 dd

Implement a better compatibility mode with mount_mfs. It is the
default if the executable is named (called as) "mount_*", or can be
enabled with the -C option. This allows users to leave their old
fstab entires unchanged (modulo symlink'ing mdmfs to mount(md|mfs))
and have things behave the way they should (by emulating mount_mfs
silliness), while still allowing mdmfs to be used as a generic
make-an-md-and-mount-it type thing.

Right now, the only effects of this option is to set the mount-point
mode to 01777 as if "-p 1777" was given, and to complain about getting
command-line options that mount_mfs didn't take (e.g., -X, -L, et al).
The latter is mostly to try to catch operator errors.

Also implement -U, which turns on soft-updates. It's redundant (since
softdep is the default), but implement it anyway for compatibility.


81628 14-Aug-2001 obrien

style(9) tweak

Approved by: dd


80608 30-Jul-2001 dd

Document -X.

Submitted by: kris


80607 30-Jul-2001 dd

Nuke my e-mail address since it seems out of place here.


79052 01-Jul-2001 kris

Add __printflike() to those static functions which need it.


78711 24-Jun-2001 dd

Use strdup(3) instead of reimplementing it inline.


78569 21-Jun-2001 mjacob

Fix compilation error on alpha.


78518 20-Jun-2001 dd

Add a missing word.

Submitted by: Alexander Leidinger <Alexander@Leidinger.net>


78480 20-Jun-2001 dd

Add a SEE ALSO section.


78479 20-Jun-2001 dd

Miscellaneous mdoc(7) fixes; also expand contractions.

Submitted by: ru


78447 18-Jun-2001 dd

Introduce mdmfs(8), a wrapper around mdconfig(8), disklabel(8),
newfs(8), and mount(8) that mimics the command line option set of the
deprecated mount_mfs(8).

Approved by: jkh, phk, -hackers