From nobody Thu Nov 17 01:03:32 2022 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 4NCM9d1Nvjz4hdGl; Thu, 17 Nov 2022 01:03:33 +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 4NCM9d0cSpz4QFB; Thu, 17 Nov 2022 01:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668647013; 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=KxfyeYB4Q35nJ8OSU2ZHzwqDpjhHJlUAFotNa0L/0zA=; b=enk176wxayS8w0yZEyM5EJF4yYiNsdcCkZb86b2Ad6uGg2OLztr70wgu8YguwNbhtfPqqU 2vpo+obRs28z4AQeHpaX7p0v/WJ/DMABuipocWE0LWX6NmQb8OHHcNYAkwRk/A+55AFd9L 54/NnzFA66lrIJsXlC3Evdw4XKxTAK+6g5rAW/q3MuKrrrGe0waMi/IswiDTpjUL9ab0M0 /gXG/BHGC48Tvnk6+toXnpzaIKS4bdAFukqWKkT67DVgTmddo8TatMEqezDWB9DLRJ13k8 6uLciHxyJvXutn60gTDtr341YcGeRAj52oz8qeGEqpoRaM/Qn5AaST8q5mohZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668647013; 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=KxfyeYB4Q35nJ8OSU2ZHzwqDpjhHJlUAFotNa0L/0zA=; b=awAX89BqoPp4WHAAku1rWXDdXltv6MLoBQQeEQzRBubBYzqM9tIrofTnjPBm2f3xw571db ZpaZzOz4pZMr+eYCk426qCM7fLr0ENdY6moUlMlTBThwHvyt+RYRwPdxBKS5D6/YcbwXrO foflRhmx/ZT6kWUchYykQ7OcLlaJEQxy5aMTmGFnMTjjav0F51xweqVIBwcO2zLfwH8Gbg JiHgqr7Xr0sI2c9V1TzIFJfYpr3c2+68aNuHeVW26+LoT6I5P5PfXGb9nLqk9EhX+RiE+p 2tZHf7lsNLasQSLT+OHXJhhCLt9BsZz1A/txiy2tXh9+yQgSjEqkTWWv4Qmj6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668647013; a=rsa-sha256; cv=none; b=pjnMeqxcdfSyB5NI1cMi+nJFn19m4Hllm5KLbOpEPMI+KAwcMInd/CwxnmMNrlRi1Ly+F1 /8b+cIOxY7O17VaQznjLKDcohC5xSKkFdJg6SUUI3nvBDRVvBg9nZAZ2UQQb7kDWea/W8Z SktMQ+07e6/55rO/CoLzdfziD/Ta83Ap3UnIHeCVyQ+2rD5dC3b7NZ4tz+4sLW8dkHX9t2 nv54WMk+rGIAVPA2KY2HArB4x72/OEIk3sltxwkpvC5ArJYziafplSFwHv2BMPiceQyFsW 4zRjrk5CTGBGL8JTmSqLR9ZGXiDvQ4PhQZkaUnOxJwCivWBmW5l7aLw+rDEW5A== 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 4NCM9c6lgwzNQn; Thu, 17 Nov 2022 01:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AH13W7a005875; Thu, 17 Nov 2022 01:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AH13Wcr005874; Thu, 17 Nov 2022 01:03:32 GMT (envelope-from git) Date: Thu, 17 Nov 2022 01:03:32 GMT Message-Id: <202211170103.2AH13Wcr005874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 5d42ef55dec1 - main - zfs: workaround panic on rootfs mount 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d42ef55dec1a8bef758b84905a9b953f86efd8d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=5d42ef55dec1a8bef758b84905a9b953f86efd8d commit 5d42ef55dec1a8bef758b84905a9b953f86efd8d Author: Martin Matuska AuthorDate: 2022-11-17 01:00:05 +0000 Commit: Martin Matuska CommitDate: 2022-11-17 01:01:47 +0000 zfs: workaround panic on rootfs mount The import of OpenZFS PR 13758 causes a panic in zfsctl_is_node() if ZFS is mounting as root filesystem. This implements a workaround until the issue is resolved by authors. --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c index b4c122bdf4c8..b0f4759eea4d 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -1328,7 +1328,15 @@ zfs_mount(vfs_t *vfsp) } fetch_osname_options(osname, &checkpointrewind); - isctlsnap = (zfsctl_is_node(mvp) && strchr(osname, '@') != NULL); + + /* + * TBD: Mounting ZFS as root causes a panic in zfsctl_is_node() + * add temporary workaround until issue is resolved + */ + if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 && + (vfsp->vfs_flag & MNT_UPDATE) == 0) { + isctlsnap = (zfsctl_is_node(mvp) && strchr(osname, '@') != NULL); + } /* * Check for mount privilege?