mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-02 22:54:52 +00:00
mdconfig: remove the "cluster" option.
It's never had any effect. The kernel ignores it. Remove it from the documentation. But continue to parse it on the command line, for backwards-compatibility. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1271
This commit is contained in:
parent
c7c037fad1
commit
e461c7bc7d
|
@ -33,7 +33,7 @@
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\" from: src/usr.sbin/vnconfig/vnconfig.8,v 1.19 2000/12/27 15:30:29
|
.\" from: src/usr.sbin/vnconfig/vnconfig.8,v 1.19 2000/12/27 15:30:29
|
||||||
.\"
|
.\"
|
||||||
.Dd August 27, 2021
|
.Dd June 1, 2024
|
||||||
.Dt MDCONFIG 8
|
.Dt MDCONFIG 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -230,8 +230,6 @@ option tends to waste memory by giving unwanted double caching,
|
||||||
but it saves time if there is memory to spare.
|
but it saves time if there is memory to spare.
|
||||||
.It Oo Cm no Oc Ns Cm reserve
|
.It Oo Cm no Oc Ns Cm reserve
|
||||||
Allocate and reserve all needed storage from the start, rather than as needed.
|
Allocate and reserve all needed storage from the start, rather than as needed.
|
||||||
.It Oo Cm no Oc Ns Cm cluster
|
|
||||||
Enable clustering on this disk.
|
|
||||||
.It Oo Cm no Oc Ns Cm compress
|
.It Oo Cm no Oc Ns Cm compress
|
||||||
Enable/disable compression features to reduce memory usage.
|
Enable/disable compression features to reduce memory usage.
|
||||||
.It Oo Cm no Oc Ns Cm force
|
.It Oo Cm no Oc Ns Cm force
|
||||||
|
|
|
@ -87,7 +87,7 @@ usage(void)
|
||||||
" mdconfig -l [-v] [-n] [-f file] [-u unit]\n"
|
" mdconfig -l [-v] [-n] [-f file] [-u unit]\n"
|
||||||
" mdconfig file\n");
|
" mdconfig file\n");
|
||||||
fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n");
|
fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n");
|
||||||
fprintf(stderr, "\t\toption = {async, cache, cluster, compress,\n");
|
fprintf(stderr, "\t\toption = {async, cache, compress,\n");
|
||||||
fprintf(stderr, "\t\t force, mustdealloc, readonly, ro,\n");
|
fprintf(stderr, "\t\t force, mustdealloc, readonly, ro,\n");
|
||||||
fprintf(stderr, "\t\t reserve, verify}\n");
|
fprintf(stderr, "\t\t reserve, verify}\n");
|
||||||
fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
|
fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
|
||||||
|
@ -156,13 +156,13 @@ main(int argc, char **argv)
|
||||||
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
|
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
|
||||||
} else if (!strcmp(optarg, "vnode")) {
|
} else if (!strcmp(optarg, "vnode")) {
|
||||||
mdio.md_type = MD_VNODE;
|
mdio.md_type = MD_VNODE;
|
||||||
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
|
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
|
||||||
} else if (!strcmp(optarg, "swap")) {
|
} else if (!strcmp(optarg, "swap")) {
|
||||||
mdio.md_type = MD_SWAP;
|
mdio.md_type = MD_SWAP;
|
||||||
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
|
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
|
||||||
} else if (!strcmp(optarg, "null")) {
|
} else if (!strcmp(optarg, "null")) {
|
||||||
mdio.md_type = MD_NULL;
|
mdio.md_type = MD_NULL;
|
||||||
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
|
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
|
||||||
} else
|
} else
|
||||||
errx(1, "unknown type: %s", optarg);
|
errx(1, "unknown type: %s", optarg);
|
||||||
break;
|
break;
|
||||||
|
@ -182,10 +182,15 @@ main(int argc, char **argv)
|
||||||
mdio.md_options |= MD_CACHE;
|
mdio.md_options |= MD_CACHE;
|
||||||
else if (!strcmp(optarg, "nocache"))
|
else if (!strcmp(optarg, "nocache"))
|
||||||
mdio.md_options &= ~MD_CACHE;
|
mdio.md_options &= ~MD_CACHE;
|
||||||
else if (!strcmp(optarg, "cluster"))
|
/*
|
||||||
mdio.md_options |= MD_CLUSTER;
|
* For backwards-compatibility, continue to recognize
|
||||||
else if (!strcmp(optarg, "nocluster"))
|
* "cluster"
|
||||||
mdio.md_options &= ~MD_CLUSTER;
|
*/
|
||||||
|
else if (!strcmp(optarg, "cluster") ||
|
||||||
|
!strcmp(optarg, "nocluster"))
|
||||||
|
{
|
||||||
|
warnx("Option cluster is ignored");
|
||||||
|
}
|
||||||
else if (!strcmp(optarg, "compress"))
|
else if (!strcmp(optarg, "compress"))
|
||||||
mdio.md_options |= MD_COMPRESS;
|
mdio.md_options |= MD_COMPRESS;
|
||||||
else if (!strcmp(optarg, "nocompress"))
|
else if (!strcmp(optarg, "nocompress"))
|
||||||
|
@ -282,13 +287,11 @@ main(int argc, char **argv)
|
||||||
if (fflag != NULL || argc > 0) {
|
if (fflag != NULL || argc > 0) {
|
||||||
/* Imply ``-t vnode'' */
|
/* Imply ``-t vnode'' */
|
||||||
mdio.md_type = MD_VNODE;
|
mdio.md_type = MD_VNODE;
|
||||||
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT |
|
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
|
||||||
MD_COMPRESS;
|
|
||||||
} else if (sflag != NULL) {
|
} else if (sflag != NULL) {
|
||||||
/* Imply ``-t swap'' */
|
/* Imply ``-t swap'' */
|
||||||
mdio.md_type = MD_SWAP;
|
mdio.md_type = MD_SWAP;
|
||||||
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT |
|
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
|
||||||
MD_COMPRESS;
|
|
||||||
} else
|
} else
|
||||||
errx(1, "unable to determine type");
|
errx(1, "unable to determine type");
|
||||||
}
|
}
|
||||||
|
@ -434,10 +437,6 @@ print_options(const char *dev, const char *file)
|
||||||
printf("%scache", sep);
|
printf("%scache", sep);
|
||||||
sep = ",";
|
sep = ",";
|
||||||
}
|
}
|
||||||
if (mdiox.md_options & MD_CLUSTER) {
|
|
||||||
printf("%scluster", sep);
|
|
||||||
sep = ",";
|
|
||||||
}
|
|
||||||
if (mdiox.md_options & MD_COMPRESS) {
|
if (mdiox.md_options & MD_COMPRESS) {
|
||||||
printf("%scompress", sep);
|
printf("%scompress", sep);
|
||||||
sep = ",";
|
sep = ",";
|
||||||
|
|
Loading…
Reference in a new issue