From nobody Mon May 09 21:10:12 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 573E41AC0D5E; Mon, 9 May 2022 21:10: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 4Kxv2X1rgpz4v31; Mon, 9 May 2022 21:10:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652130612; 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=b+R1RpLTO8+Sc2FNze8G6+VC4ZTfAcSKPvDHWjJnS+A=; b=NAbQ00i0tjchMc2g6UkkKLAaOIboY0kaP2mAIX+zp902fQ5h8n3EADZhVpAB/tBHxjEn7M Q8ew5hp37dBTLFYXMyY3fqT1a6JwrafYvxcFJe53Q8wzt/A51LPYDj8mk1ym5dg18+1k+4 VpsvRgEz38HNkcKm+HzaoPOxU31USWamo6tVFhQN9P/xyssTmkc15bcuez3L4oj2BhWyNw QD2TE0ggzzBlGrY2DfhiMPg5pIwNpHC1z6MRENZCj/Ffgh6PU6t8vtXYr2PCmZKn8iHNGJ 2Gq44ZGSdZJvCIOu19KrkOJe4Vjg/2Tuvg9G1DpvNC+J75nwEH5aavwW2qBPvQ== 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 1FA3818452; Mon, 9 May 2022 21:10:12 +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 249LACv4028287; Mon, 9 May 2022 21:10:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 249LACVa028278; Mon, 9 May 2022 21:10:12 GMT (envelope-from git) Date: Mon, 9 May 2022 21:10:12 GMT Message-Id: <202205092110.249LACVa028278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4ac2df8f4cd9 - main - ffs_use_bwrite: make the superblock snapshot more consistent 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ac2df8f4cd91017c000543224204f823008f699 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652130612; 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=b+R1RpLTO8+Sc2FNze8G6+VC4ZTfAcSKPvDHWjJnS+A=; b=MhCmQgXJCSPEcuWaEwsOpiQi5YM92kHJkVprhK8ZleZJW1DxQrncp2zJ73hp2YUznBc8xU IhUPq3P8kBZP4ZaVj5M5amNLUtcg4ldT4Nku4L1KSnHtHExzjeu5EJujxdxbKDxlX/O9y8 7nHbIveKOTbtSaShh0/O05pI8WyzWLoqh1dqKuk5QYjtadIQDF1gGhH9fV/Tuv8hPyc8Cw cN73DwCj0/dPqbKwg6vDSMo1CyUuTx5+93DetgwxW9XaWe2rod3MXFhGVPbKeGSUYHw9Od 50bVx4UAE9W3EJdgqfagNwyDCarW1OSKRwBElO5zOSYFhSpi4d/wl1cQCZJsfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652130612; a=rsa-sha256; cv=none; b=SoGGnAHndVF9HmHSTMVNo2wMVih5qcgoqcZU0LXpnwizSkacW/AxJzGzZqFxVuylm6jbbZ DGT///88eIGuuPWG5gmkZSq3oG5P0/F1rVKSPxaik+h9n0f9wBDVB1XU8vu8Q/wRFTButx eRX1TeWc7RH0FSoatP1XVK1X0ju58qjD2d7Ezqu+n5M0Mu965Yj3ZnWxS7V4uHe1v3C6M5 UACjJLVTs1H19D+hhCEorrcqMkNScxSLJCF30Vy9zlJV6OY++yImqg7Yydq2826rBZQe83 Owymk8de1wohbXVmQAmxioSf399+34UVekf68KdLIMrjUO7SCCRAsXH612Ze6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4ac2df8f4cd91017c000543224204f823008f699 commit 4ac2df8f4cd91017c000543224204f823008f699 Author: Konstantin Belousov AuthorDate: 2022-05-08 14:00:37 +0000 Commit: Konstantin Belousov CommitDate: 2022-05-09 20:45:27 +0000 ffs_use_bwrite: make the superblock snapshot more consistent Copy in-memory struct fs to the superblock buffer under the UFS mutex. Reviewed by: chs, markj PR: 263765 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35149 --- sys/ufs/ffs/ffs_vfsops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index e9cbc962cd78..07ae69b1b798 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -2247,7 +2247,9 @@ ffs_use_bwrite(void *devfd, off_t loc, void *buf, int size) } if (MOUNTEDSOFTDEP(ump->um_mountp)) softdep_setup_sbupdate(ump, (struct fs *)bp->b_data, bp); + UFS_LOCK(ump); bcopy((caddr_t)fs, bp->b_data, (u_int)fs->fs_sbsize); + UFS_UNLOCK(ump); fs = (struct fs *)bp->b_data; ffs_oldfscompat_write(fs, ump); fs->fs_si = NULL;