Re: svn commit: r351471 - in head/sys: kern sys
On August 30, 2019 3:09:06 PM PDT, Ian Lepore wrote: >On Sat, 2019-08-31 at 00:03 +0200, Mateusz Guzik wrote: >> On 8/25/19, Oliver Pinter wrote: >> > 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. >> > >> >> I think it's a fair point that if I included this info in the review >> it >> should make it's way into the commit message. >> > >When I open a new phab review, I specifically write the one-line >summary and text that follows with the idea that I'm going to cut and >paste that exact text as the commit message (mostly because it's easier >to just write all that stuff once). If there are things I want to say >there that don't make sense for the commit I typically add them as a >separate comment right after I open the initial review. > >-- Ian I like to start out with a one line summary if possible, subsequently providing more detail. The first paragraph or two of a phab review could/should be written to simply cut and paste that into the commit message. I try to aim for this. I suppose when a person has been working on some code for a while what appears obvious may not be so obvious to others at first. It's an easy trap to fall into. Something I catch myself at times. -- Pardon the typos and autocorrect, small keyboard in use. Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351471 - in head/sys: kern sys
On Sat, 2019-08-31 at 00:03 +0200, Mateusz Guzik wrote: > On 8/25/19, Oliver Pinter wrote: > > 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. > > > > I think it's a fair point that if I included this info in the review > it > should make it's way into the commit message. > When I open a new phab review, I specifically write the one-line summary and text that follows with the idea that I'm going to cut and paste that exact text as the commit message (mostly because it's easier to just write all that stuff once). If there are things I want to say there that don't make sense for the commit I typically add them as a separate comment right after I open the initial review. -- Ian ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351471 - in head/sys: kern sys
On 8/25/19, Oliver Pinter wrote: > 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. > I think it's a fair point that if I included this info in the review it should make it's way into the commit message. -- Mateusz Guzik ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351471 - in head/sys: kern sys
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.cSun Aug 25 04:56:33 2019(r351470) > +++ head/sys/kern/vfs_subr.cSun 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(>v_holdcnt, 1); > + VNASSERT(old > 0, vp, ("%s: wrong hold count", __func__)); > +#else > + atomic_add_int(>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.hSun Aug 25 04:56:33 2019(r351470) > +++ head/sys/sys/vnode.hSun Aug 25 05:11:43 2019(r351471) > @@ -657,6 +657,7 @@ voidvgone(struct vnode *vp); > #definevhold(vp) _vhold((vp), 0) > #definevholdl(vp) _vhold((vp), 1) > void _vhold(struct vnode *, bool); > +void vholdnz(struct vnode *); > void vinactive(struct vnode *, struct thread *); > intvinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); > intvtruncbuf(struct vnode *vp, off_t length, int blksize); > ___ > svn-src-h...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351471 - in head/sys: kern sys
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) 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.cSun Aug 25 04:56:33 2019(r351470) +++ head/sys/kern/vfs_subr.cSun 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(>v_holdcnt, 1); + VNASSERT(old > 0, vp, ("%s: wrong hold count", __func__)); +#else + atomic_add_int(>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.hSun Aug 25 04:56:33 2019(r351470) +++ head/sys/sys/vnode.hSun Aug 25 05:11:43 2019(r351471) @@ -657,6 +657,7 @@ voidvgone(struct vnode *vp); #definevhold(vp) _vhold((vp), 0) #definevholdl(vp) _vhold((vp), 1) void _vhold(struct vnode *, bool); +void vholdnz(struct vnode *); void vinactive(struct vnode *, struct thread *); intvinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); intvtruncbuf(struct vnode *vp, off_t length, int blksize); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"