Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdconfig: remove the "cluster" option. #1271

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions sbin/mdconfig/mdconfig.8
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\" 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
.Os
.Sh NAME
Expand Down Expand Up @@ -230,8 +230,6 @@ option tends to waste memory by giving unwanted double caching,
but it saves time if there is memory to spare.
.It Oo Cm no Oc Ns Cm reserve
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
Enable/disable compression features to reduce memory usage.
.It Oo Cm no Oc Ns Cm force
Expand Down
22 changes: 10 additions & 12 deletions sbin/mdconfig/mdconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
" mdconfig -l [-v] [-n] [-f file] [-u unit]\n"
" mdconfig file\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 reserve, verify}\n");
fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
Expand Down Expand Up @@ -156,13 +156,13 @@
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
} else if (!strcmp(optarg, "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")) {
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")) {
mdio.md_type = MD_NULL;
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
} else
errx(1, "unknown type: %s", optarg);
break;
Expand All @@ -182,6 +182,10 @@
mdio.md_options |= MD_CACHE;
else if (!strcmp(optarg, "nocache"))
mdio.md_options &= ~MD_CACHE;
/*

Check failure on line 185 in sbin/mdconfig/mdconfig.c

View workflow job for this annotation

GitHub Actions / Style Checker

trailing whitespace
* For backwards-compatibility, continue to recognize
* "cluster"
*/
else if (!strcmp(optarg, "cluster"))
mdio.md_options |= MD_CLUSTER;
else if (!strcmp(optarg, "nocluster"))
Expand Down Expand Up @@ -282,13 +286,11 @@
if (fflag != NULL || argc > 0) {
/* Imply ``-t vnode'' */
mdio.md_type = MD_VNODE;
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT |
MD_COMPRESS;
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
} else if (sflag != NULL) {
/* Imply ``-t swap'' */
mdio.md_type = MD_SWAP;
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT |
MD_COMPRESS;
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
} else
errx(1, "unable to determine type");
}
Expand Down Expand Up @@ -434,13 +436,9 @@
printf("%scache", sep);
sep = ",";
}
if (mdiox.md_options & MD_CLUSTER) {
printf("%scluster", sep);
sep = ",";
}
if (mdiox.md_options & MD_COMPRESS) {
printf("%scompress", sep);
sep = ",";

Check warning on line 441 in sbin/mdconfig/mdconfig.c

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line
}
if (mdiox.md_options & MD_FORCE) {
printf("%sforce", sep);
Expand Down
Loading