From nobody Mon Dec 06 00:30:10 2021 X-Original-To: dev-commits-src-all@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 BE06B18C2B0A; Mon, 6 Dec 2021 00:30:12 +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 4J6kpq30tKz4ZPg; Mon, 6 Dec 2021 00:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DE6E621B4D; Mon, 6 Dec 2021 00:30:10 +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 1B60UAmr088749; Mon, 6 Dec 2021 00:30:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B60UAeu088747; Mon, 6 Dec 2021 00:30:10 GMT (envelope-from git) Date: Mon, 6 Dec 2021 00:30:10 GMT Message-Id: <202112060030.1B60UAeu088747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: aebdfa9515d4 - stable/13 - Expand comment explaining reasons for automatic swapoff on shutdown List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aebdfa9515d4a81c791a5342e5c3b898fb79cfec Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638750611; 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=o+5C0r5Jw1gS0c0swzcO9Ri0ecGxRtif/aOuGxHd1Ss=; b=sEQtOGN1sWFWJQAHUVi9PSYGqIE4de0UsKwikS17gDvIHHqtJ2yYtlaPBP/621jwXqg57j 4Hma4afZsTjGFIE+o1K25Tt+z8zTg2XcmntiXBJMKCWV9iqIGKCvRh5yTS42F7/mqlY7h5 B5Jgpglg8HnKOc8GpVMIxmDjy94balm1ZKvRNqTcfoNqvAAQyLBcah3neLyz9nTyZiawxl bJsvUK5gQpsjt+YVyPH/RF0p3dIxHg+ZLgA+zHr6kZUWfKRUd5n73LHpK9XEGclCMXlB+z IE72/PPPHIGEmH0chhKTFi/HXbTYTme6xiAmNnAJaLupjk0/TTX404S+doLnxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638750611; a=rsa-sha256; cv=none; b=W8UgGxBofJ1afD8peouBeKp4GMEToiiyQ6I+JI2ZHLI2nwGt5dqWDhjT7vGDVddGjKi6B+ 3rNPDL19LHxfgqwqZh9pDVLetrCyiVYF/zCOsCH2KOPZkIuVmEUpiSigdmtMcSn5eJKswe D+w81eEFWX3RNwRh/+zgBmRwUdBepr9IG2zlIkuTasC7BgRQNZb1O2uaIoMUQQCkFGOfd5 jlUhQ0roCxpqDfptJPOASEClhQbxRqZxbqMR25Y0cdGXMfPr2e4iixKBk6m45t9kzw7C6Q Aqq/MbPW88XhV7afLpko6aTXujFiz/9pOGr7/fgmXg/ac4dl1DX6Phma1T32bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=aebdfa9515d4a81c791a5342e5c3b898fb79cfec commit aebdfa9515d4a81c791a5342e5c3b898fb79cfec Author: Konstantin Belousov AuthorDate: 2021-11-29 19:11:33 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-06 00:29:43 +0000 Expand comment explaining reasons for automatic swapoff on shutdown (cherry picked from commit a5c2d59ed3d6365c26322f3e100467454774b501) --- sys/kern/vfs_bio.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 511bcb746a00..d32cad8a7fd5 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1449,9 +1449,16 @@ bufshutdown(int show_busybufs) printf("Final sync complete\n"); /* - * Unmount filesystems. Swapoff before unmount, - * because file-backed swap is non-operational after unmount - * of the underlying filesystem. + * Unmount filesystems and perform swapoff, to quiesce + * the system as much as possible. In particular, no + * I/O should be initiated from top levels since it + * might be abruptly terminated by reset, or otherwise + * erronously handled because other parts of the + * system are disabled. + * + * Swapoff before unmount, because file-backed swap is + * non-operational after unmount of the underlying + * filesystem. */ if (!KERNEL_PANICKED()) { swapoff_all();