From owner-svn-src-all@freebsd.org Sun Aug 25 20:01:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E48DEC07AA for ; Sun, 25 Aug 2019 20:01:56 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46GmHl6sVfz4NNB for ; Sun, 25 Aug 2019 20:01:55 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yb1-xb31.google.com with SMTP id t5so6292099ybt.4 for ; Sun, 25 Aug 2019 13:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=A/ZIZFDxyzPdJcLLyafdizM9dLw89m377HhbdlpOOr8=; b=Lp+j77NFZacX7gYgqc7kv+3zn47+VOco/OqTH3Drq37sAzuM0U4Y+U4LlHJ+czaLxt 3CpM8bEnf/vDmvyoDqvqGRN+gDa+Ul1Ma9r4vGaL1Xmb5jfJIjrOwUJim4zvZeOUbuM+ Cyho5QYh4dT+vfWLHTZfLC2NVRyiQThUrBi1Avh18YgzEwIzDSKrpba6B72QWW5m3c6I 01U0Hp0McD38GHec9zjFd+Y+/IUyioMuuPfPNorC4HTxzXLfIx/ThPSHGJtQHORzHmPZ iI7gi+Ilrxe9APbt5EkckmIoRJu/1zFbrI9RlOi98T+u5ARqZBzps1eU2VCctS7HZ2Vu /xHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A/ZIZFDxyzPdJcLLyafdizM9dLw89m377HhbdlpOOr8=; b=LkSUFBZ/OgODhW39MG0y0cgjMgh3MDKUPd9Tm6b0Ljyep3bqkDsJEkhzj1aB5iUOFP 0GxffdsOpgVsMswYNHjsvG88DP2eLdIbWYcczcw6N/GRvQR+i5qG8xGApMRYN2x2KtO9 PGxmZLkNIPYH732VToDRhnUrC9RTEz8fJH3+JpuyOl8MaEUKd4XGgfQI3VhBjulHBgxp cdrfMaYADus5zOtnCI6t7p0xkBMvlGsHf5OxJW7mWNvm8rJ2KhB9hzjbaevSCnvh7j9P KiGGW3Hjm9aofferIOCyAfvmCvPGHjczhxBOSkBpsLc0TBdfSTBpcWi2KF5sProk7qcX SDgg== X-Gm-Message-State: APjAAAVlOQojM4h9p8s3nWMQyNbVhnF0rR9VSUC6PtLpDS+knYt77Quh 9SVRNIBEkiJ9gmw+sNhCl0PTfnCBUWEF5ou/Vez1Zg== X-Google-Smtp-Source: APXvYqyBGWeOjr5PXHrCzW6oM+5lRidp/zxihx+K39CJP3TCVv6+fHZv1lIMssGFGvlX6ysgvki2i/cJM5EKk/G8M/4= X-Received: by 2002:a25:42cb:: with SMTP id p194mr9987704yba.334.1566763314795; Sun, 25 Aug 2019 13:01:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:1003:0:0:0:0:0 with HTTP; Sun, 25 Aug 2019 13:01:54 -0700 (PDT) In-Reply-To: <201908250511.x7P5BiPl016074@repo.freebsd.org> References: <201908250511.x7P5BiPl016074@repo.freebsd.org> From: Oliver Pinter Date: Sun, 25 Aug 2019 22:01:54 +0200 Message-ID: Subject: Re: svn commit: r351471 - in head/sys: kern sys To: Mateusz Guzik Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 46GmHl6sVfz4NNB X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=Lp+j77NF; dmarc=none; spf=pass (mx1.freebsd.org: domain of oliver.pinter@hardenedbsd.org designates 2607:f8b0:4864:20::b31 as permitted sender) smtp.mailfrom=oliver.pinter@hardenedbsd.org X-Spamd-Result: default: False [-5.45 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[9]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; RCVD_IN_DNSWL_NONE(0.00)[1.3.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.96)[ip: (-9.53), ipnet: 2607:f8b0::/32(-2.87), asn: 15169(-2.33), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2019 20:01:57 -0000 On Sunday, August 25, 2019, Mateusz Guzik wrote: > Author: mjg > Date: Sun Aug 25 05:11:43 2019 > New Revision: 351471 > URL: https://svnweb.freebsd.org/changeset/base/351471 > > Log: > vfs: add vholdnz (for already held vnodes) Why? (Yes, is can read the real reason in phabricator, but the phabricator didn't considered a persistent information in relation to commit message. Review helper tool just comes and goes as time goes forward, but commit messages survives the repo conversions to other VCS...) And once you have taken the time to write a correct description in phabricator, it would be really really nice and helpful if you would copy them into commit message. > > Reviewed by: kib (previous version) > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D21358 > > Modified: > head/sys/kern/vfs_subr.c > head/sys/sys/vnode.h > > Modified: head/sys/kern/vfs_subr.c > ============================================================ > ================== > --- head/sys/kern/vfs_subr.c Sun Aug 25 04:56:33 2019 (r351470) > +++ head/sys/kern/vfs_subr.c Sun Aug 25 05:11:43 2019 (r351471) > @@ -3018,6 +3018,19 @@ _vhold(struct vnode *vp, bool locked) > VI_UNLOCK(vp); > } > > +void > +vholdnz(struct vnode *vp) > +{ > + > + CTR2(KTR_VFS, "%s: vp %p", __func__, vp); > +#ifdef INVARIANTS > + int old = atomic_fetchadd_int(&vp->v_holdcnt, 1); > + VNASSERT(old > 0, vp, ("%s: wrong hold count", __func__)); > +#else > + atomic_add_int(&vp->v_holdcnt, 1); > +#endif > +} > + > /* > * Drop the hold count of the vnode. If this is the last reference to > * the vnode we place it on the free list unless it has been vgone'd > > Modified: head/sys/sys/vnode.h > ============================================================ > ================== > --- head/sys/sys/vnode.h Sun Aug 25 04:56:33 2019 (r351470) > +++ head/sys/sys/vnode.h Sun Aug 25 05:11:43 2019 (r351471) > @@ -657,6 +657,7 @@ void vgone(struct vnode *vp); > #define vhold(vp) _vhold((vp), 0) > #define vholdl(vp) _vhold((vp), 1) > void _vhold(struct vnode *, bool); > +void vholdnz(struct vnode *); > void vinactive(struct vnode *, struct thread *); > int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); > int vtruncbuf(struct vnode *vp, off_t length, int blksize); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >