From nobody Mon Feb 07 09:50:55 2022 X-Original-To: dev-commits-src-branches@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 BB2C819C14C8; Mon, 7 Feb 2022 09:51:00 +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 4JshGn2Hk2z3sVs; Mon, 7 Feb 2022 09:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644227458; 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=eOK7BXTjFhTMUKYZzTAtyH0hc8kOtQO28t/sk/MIpRE=; b=K756IVFyRrnp6OHqk68kyAQxtQVqq2qJry3MhsfHfEacNGx4WT0KvGqB+utXgZKtwBOCZN xBSH1zVM0NRfmu1neYztmsOH6d9v+/WgfM6JfKVHLHrgSncR2l06FPpH3Q2Q2GQFN+E6hq AmPizEC6JjhNJXSanuni8deCQwtU33nHo66KkZ/tvv+m5iKTzl/KIxpPFnv94siiKL6KHX VpmpHxZJuvahY1H14Iq61FkVrAzrpuVA3qK1V47iTm22gHRaEFGllEvrb3oa51GEeujEBy DlxhgJQvj5VQw0nAIgEqLHZSDaxTjFjdm6g3nxF3JJnuoh0JD5RFzhgbRwV9GA== 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 C49012392B; Mon, 7 Feb 2022 09:50:55 +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 2179otRq059086; Mon, 7 Feb 2022 09:50:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2179otBU059085; Mon, 7 Feb 2022 09:50:55 GMT (envelope-from git) Date: Mon, 7 Feb 2022 09:50:55 GMT Message-Id: <202202070950.2179otBU059085@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: 7c2d965ca8e7 - stable/13 - ufs: be more persistent with finishing some operations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 7c2d965ca8e7736689755fea521313610aeef4c3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644227460; 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=eOK7BXTjFhTMUKYZzTAtyH0hc8kOtQO28t/sk/MIpRE=; b=qCHtx6a1sO1neolUIC6pK1p4d/uWKrX1Ccs50DOzH4oryxPFNBV4oTCHKfWS+L6l1I//a3 ZWdX3sRnW+Pt7SssXZCJmBXpL8AMYRLuea2K86RnBJvAFafu4x4a4sJzlda3hyNl5SAtom pxBnf0tuNkjzOecDXIJT285IjRJtuCRYGDBZq5vAUh09EIvMmJwgsXb5gbBOZ1Y6SMSLTM Vp6WTk+neTX3j97FxPx7GlsaQREF2NBo15k3kkmVDky+dRemV2BaFY5tmdVhVtVOus+Gib L1/4yfBJIIFKO/rSPZbS/Gf3Fx+z7oPXpkTE0zLQFE6q08dt8jPL/cslqDS7RA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644227460; a=rsa-sha256; cv=none; b=QX5tmbNgDQctWlwU/GNGNzzUJbLSIiq6tJor1EIMOP7BnaYRbGjIp/4TuqIq1nNGm6OLIc j1kQFqvKTAL6izuezSK1O/j7QO7Fo6XAACP9uql+36gr02l3oaj4oSFVydoHq6jRMnvo/B YJ8zh9pPEy3rbPCkHRKw+2+TnRqIlnAuYfSO38UDiGYsuEOCSQA+jQQZrnOssT3qMuBLVi oSQVaYiIonpdXmCINSYqqh7ZX2ffLRHumeAbAXOg9m7v9UnI/5ioIKCk7dXAuKPbWcLXkZ GUWYUfRmfEyUNKnDOZrokW1AaesRvaLtwxinH9moUuG9jGs9Se/+4hnCs2M5Gg== 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=7c2d965ca8e7736689755fea521313610aeef4c3 commit 7c2d965ca8e7736689755fea521313610aeef4c3 Author: Konstantin Belousov AuthorDate: 2022-01-18 01:49:36 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-07 09:38:50 +0000 ufs: be more persistent with finishing some operations (cherry picked from commit 8d8589b385c901581ee71d09d86d044a6f42dfef) --- sys/ufs/ffs/ffs_inode.c | 2 +- sys/ufs/ffs/ffs_softdep.c | 2 +- sys/ufs/ffs/ffs_vnops.c | 2 +- sys/ufs/ufs/inode.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 4b2b2989fb81..3c1903fcbae6 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -179,7 +179,7 @@ loop: pause("ffsupd", 1); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vrele(vp); - if (VN_IS_DOOMED(vp)) + if (!IS_UFS(vp)) return (ENOENT); /* diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 8bc5e409cf04..37709b605fbd 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -13774,7 +13774,7 @@ softdep_request_cleanup_inactivate(struct mount *mp) vholdl(vp); vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY); VI_LOCK(vp); - if (vp->v_data != NULL && vp->v_usecount == 0) { + if (IS_UFS(vp) && vp->v_usecount == 0) { while ((vp->v_iflag & VI_OWEINACT) != 0) { error = vinactive(vp); if (error != 0 && error != ERELOOKUP) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index ceea2237c94e..a33699515bc2 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -2066,7 +2066,7 @@ ffs_vput_pair(struct vop_vput_pair_args *ap) * and respond to dead vnodes by returning ESTALE. */ VOP_LOCK(vp, vp_locked | LK_RETRY); - if (!VN_IS_DOOMED(vp)) + if (IS_UFS(vp)) return (0); /* diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index 2ff619b4eac0..3e555dc52a32 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -245,6 +245,7 @@ I_IS_UFS2(const struct inode *ip) #define SHORTLINK(ip) (I_IS_UFS1(ip) ? \ (caddr_t)(ip)->i_din1->di_db : (caddr_t)(ip)->i_din2->di_db) #define IS_SNAPSHOT(ip) ((ip)->i_flags & SF_SNAPSHOT) +#define IS_UFS(vp) ((vp)->v_data != NULL) /* * Structure used to pass around logical block paths generated by