From nobody Sat Jun 01 23:31:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VsGTZ2vTZz5LXp7; Sat, 01 Jun 2024 23:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VsGTZ2T71z42GF; Sat, 1 Jun 2024 23:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717284690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7hjrJsXP78Xq49Hc4B+9H6gWbtkmekhn8RzMbLnwVg=; b=k2AgIg+dd5oQzhfhXwxG6oPHfnNzKN5sCvMo4uKiK4MBtqJHcI72eOg5i7JANU5lY45bDD 7rAQb8VclRcB2g0KGsMoy2MIbD1AUIu8eQdWSvD7oEApe98ERhQzReDiZ4zuyghsZ8cOoQ PB4f2GGbSnGnXTS7rt7DKBXkLsYUCcEiFGd4Lj31tE1Uhs/GU4PaJQBL8Va7ihPwHT5KXG 5RFE9e9OogC2D8lsbzsn0awMorcQJuTy+ViqBpUc6ETPQJmW+xpadPJUFZWL9v0zsGN5uC kEOduLid5F4PQs6v1qFgwlX4JZunjuPRT1N1j2Ghm3O1WW6TOku2kXVopTHfrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717284690; a=rsa-sha256; cv=none; b=R/QTM+xGTRgQv18sjCtV6UQ+5P0uzaEQ3VBetY8XBVcJgB4bc7BtUHwixUYHA3fZZ3vm6k 2tBFQe4REYlADj9afqnFhkRvxS0rTEj4DcF2HExJwPcBYnOFR32TCaNM624NcxWuYO9V5L PS6deGlX2fANCDl9hygQQKBBI0R0ICnufcqkMS51ev81PXW5t1Fr8NnCKvHRk79gKvbfd6 GUFZJ7lDXVvSc9PVagdGc/K5scgjFBTr05ZuzHGH7flMkYaKIchcGI0BjBygElX/2Ff84L /R3VVUET4Y0ToQTodORJDCbxb490oQ27HmkWfWfvSl2pbMOYiW6PIjbB+GHAow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717284690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7hjrJsXP78Xq49Hc4B+9H6gWbtkmekhn8RzMbLnwVg=; b=n8l40PYOjFA4vNSz7hbr9oUHpR96M0NJ5Od5/BM2aZ1YneZgwTlkyN9kCVod+dmy8fMGFW pAcpnQTo+LRUvlis0z0yD1pPvh4E+ERlwKL67bbRNEW8im5hBIgnJbsSaAKMG2CBaA6SCH c+pQ7Co7ZALejZloankfBqQP+NnZQr6iSnbvxckHm8CoQlgDyj2/ItzPbEXS4jfhcNFh4F O/HqVn9chz4Fwq7D88ajotyrtXqD89k6f9vTNGYehwZ0CaPFqQk5W2QloGEl2WriK/eu7S tHGaeQODcgI+meg9wgnHtUO6cjaLgvRH5X0ntNFJojPnWddqt2asO8HLj/WgQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VsGTZ259mzS6t; Sat, 1 Jun 2024 23:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 451NVUT5003256; Sat, 1 Jun 2024 23:31:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 451NVUDj003253; Sat, 1 Jun 2024 23:31:30 GMT (envelope-from git) Date: Sat, 1 Jun 2024 23:31:30 GMT Message-Id: <202406012331.451NVUDj003253@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: e461c7bc7dde - main - mdconfig: remove the "cluster" option. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e461c7bc7dde5dc84dc9e04cb623c6f567bfe6e5 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=e461c7bc7dde5dc84dc9e04cb623c6f567bfe6e5 commit e461c7bc7dde5dc84dc9e04cb623c6f567bfe6e5 Author: Alan Somers AuthorDate: 2024-06-01 18:38:16 +0000 Commit: Alan Somers CommitDate: 2024-06-01 23:31:04 +0000 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 --- sbin/mdconfig/mdconfig.8 | 4 +--- sbin/mdconfig/mdconfig.c | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/sbin/mdconfig/mdconfig.8 b/sbin/mdconfig/mdconfig.8 index 73d4b30aac35..9a86a9c686fd 100644 --- a/sbin/mdconfig/mdconfig.8 +++ b/sbin/mdconfig/mdconfig.8 @@ -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 @@ -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 diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index abcb34c1fed1..4b03dd81e591 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -87,7 +87,7 @@ usage(void) " 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"); @@ -156,13 +156,13 @@ main(int argc, char **argv) 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; @@ -182,10 +182,15 @@ main(int argc, char **argv) mdio.md_options |= MD_CACHE; else if (!strcmp(optarg, "nocache")) mdio.md_options &= ~MD_CACHE; - else if (!strcmp(optarg, "cluster")) - mdio.md_options |= MD_CLUSTER; - else if (!strcmp(optarg, "nocluster")) - mdio.md_options &= ~MD_CLUSTER; + /* + * For backwards-compatibility, continue to recognize + * "cluster" + */ + else if (!strcmp(optarg, "cluster") || + !strcmp(optarg, "nocluster")) + { + warnx("Option cluster is ignored"); + } else if (!strcmp(optarg, "compress")) mdio.md_options |= MD_COMPRESS; else if (!strcmp(optarg, "nocompress")) @@ -282,13 +287,11 @@ main(int argc, char **argv) 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"); } @@ -434,10 +437,6 @@ print_options(const char *dev, const char *file) printf("%scache", sep); sep = ","; } - if (mdiox.md_options & MD_CLUSTER) { - printf("%scluster", sep); - sep = ","; - } if (mdiox.md_options & MD_COMPRESS) { printf("%scompress", sep); sep = ",";