From nobody Mon Jul 21 14:58:18 2025 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 4bm3Rw2Tz1z62lLw; Mon, 21 Jul 2025 14:58:20 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rt56Hfz3P7y; Mon, 21 Jul 2025 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109898; 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=tsbVISnpn6fkj+zpeT45s2eVWxOJJDPjTzOCpgamTj4=; b=oXuR+kALtvFYz/NQjVHX6aYwBXR8tA+bb47z/mQ/dePjGYR5HB7t104031T7KktHQjSNQa bc463pcrLFLP+VmZ65/CtOXEbCCOjuBKWGRZKMlr4zRfkRRnpn0xrP/RgRuYXjyfkGWcpS YG3aIqQcLkkXxOQsBE4k1Pl94EEDqvPQ76WPbkOShD+LJXYwTD6kcNAYdRMVeCOn2MkLh5 JhI0tdKkNaUgbhse64xURNr0p51aU8o672HPsicNqIn5Qp3Mtaj95Si1jkvvTYJ/7eRVqA Qng0oZH0/LnLMahe82wQ/Vm6NGMLmu+dfQcp1gS5uFSzqsGVMZG0swVNbrM4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109898; 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=tsbVISnpn6fkj+zpeT45s2eVWxOJJDPjTzOCpgamTj4=; b=TQRXgZUFjs9XyyJbClFmDZjusbiU5tFhV8CldE3NcO1zTt0tsBPG017XyN1wgkIkZ4tbZZ iefF25eObabTQCHZDPFacliJla/Yb8pKZJRVtp4aReeaSnOhjdCq8cpe7idBRLOY144fUF knjueTuLWcdbd+QdGjAU817/toXfEFgnvK1ZqnexFwXrTXOaAV672gNh12Z10/Th/PPeR9 LlZzb/uvG4AYV0XWUdix8QDA6c4B19EDtRj/77M9mRSc49R0OIgH1+Lc/3pRkSP2vQZwFI 4ngcUIRPX+EgoLEXH8SCv+mKOo7+wWldV2Y9bzHA+LnmIlnbVL90z8ItVz4ZUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109898; a=rsa-sha256; cv=none; b=PPVxWdciZ9SgqL2UajeV1nkjrHns86aiSLw3zXo48FJzsglZiQjp2mv4XyhVALpkb2xu2H z3jjmE7E7N8qvXtM+TbdKVE0z9c4f9+g2nmePcg4Fu8fmuSdS9e4aST86+HMJZjLsHMDFd aSLDSwltQcCQk5zDXRcZHuWxtqlqdqJW1hcjvFLSAFvLULp2EjNO+kZBQtogD9zTFYuUaP dyDYd4mjqzIcLVQl9tKv7Bbn1QAam3G0Oc7Jr+hqVfkxl9Yxbn3k/hVUydWlWQrPBpc9AR fRF5MGwSRoD+RNH3w9keOyUAIBdvHUJ3gJ/BQi8hOuwOSQIbF54HlXp8oKNHqg== 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 4bm3Rt3Ckbz11yF; Mon, 21 Jul 2025 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwIwi053925; Mon, 21 Jul 2025 14:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwIhF053922; Mon, 21 Jul 2025 14:58:18 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:18 GMT Message-Id: <202507211458.56LEwIhF053922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cd4b9dac1a0d - main - makefs/zfs: Allow the user to specify the pool GUID 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd4b9dac1a0dc6b868aa4376ac355aaf25430a77 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd4b9dac1a0dc6b868aa4376ac355aaf25430a77 commit cd4b9dac1a0dc6b868aa4376ac355aaf25430a77 Author: Mark Johnston AuthorDate: 2025-07-21 13:41:40 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:58 +0000 makefs/zfs: Allow the user to specify the pool GUID This will be used by the test suite to enable running makefs/zfs tests in parallel. MFC after: 1 month --- usr.sbin/makefs/makefs.8 | 6 ++++++ usr.sbin/makefs/zfs.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index c46f283f90a8..d20f69d87559 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -550,6 +550,12 @@ This option allows the default heuristic to be overridden. .It verify-txgs Prompt OpenZFS to verify pool metadata during import. This is disabled by default as it may significantly increase import times. +.It poolguid +Use the specified 64-bit integer as the pool GUID. +If this option is not specified, the pool GUID will be random but fixed +across multiple identical invocations of +.Nm . +This option is useful for testing but not required for reproducibility. .It poolname The name of the ZFS pool. This option must be specified. diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index 66e7f8dafc9c..8d50c450541b 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -85,6 +86,8 @@ zfs_prep_opts(fsinfo_t *fsopts) 0, 0, "Bootable dataset" }, { '\0', "mssize", &zfs->mssize, OPT_INT64, MINMSSIZE, MAXMSSIZE, "Metaslab size" }, + { '\0', "poolguid", &zfs->poolguid, OPT_INT64, + 0, INT64_MAX, "ZFS pool GUID" }, { '\0', "poolname", &zfs->poolname, OPT_STRPTR, 0, 0, "ZFS pool name" }, { '\0', "rootpath", &zfs->rootpath, OPT_STRPTR, @@ -547,7 +550,8 @@ pool_init(zfs_opt_t *zfs) { uint64_t dnid; - zfs->poolguid = randomguid(); + if (zfs->poolguid == 0) + zfs->poolguid = randomguid(); zfs->vdevguid = randomguid(); zfs->mos = objset_alloc(zfs, DMU_OST_META);