Re: svn commit: r351622 - head/sys/kern
On Fri, Aug 30, 2019 at 12:45:54AM +, Mateusz Guzik wrote: > Author: mjg > Date: Fri Aug 30 00:45:53 2019 > New Revision: 351622 > URL: https://svnweb.freebsd.org/changeset/base/351622 > > Log: > vfs: tidy up assertions in vfs_subr > > - assert unlocked vnode interlock in vref > - assert right counts in vputx > - print debug info for panic in vdrop > > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/kern/vfs_subr.c > > Modified: head/sys/kern/vfs_subr.c > == > --- head/sys/kern/vfs_subr.c Fri Aug 30 00:40:08 2019(r351621) > +++ head/sys/kern/vfs_subr.c Fri Aug 30 00:45:53 2019(r351622) > @@ -2778,6 +2778,7 @@ void > vref(struct vnode *vp) > { > > + ASSERT_VI_UNLOCKED(vp, __func__); > CTR2(KTR_VFS, "%s: vp %p", __func__, vp); > _vhold(vp, false); > v_incr_usecount(vp); > @@ -2853,6 +2854,9 @@ vputx(struct vnode *vp, int func) > else > KASSERT(func == VPUTX_VRELE, ("vputx: wrong func")); > ASSERT_VI_UNLOCKED(vp, __func__); > + VNASSERT(vp->v_holdcnt > 0 && vp->v_usecount > 0, vp, A more precise assert condition would also include vp->v_holdcont >= vp->v_usecount > + ("%s: wrong ref counts", __func__)); > + > CTR2(KTR_VFS, "%s: vp %p", __func__, vp); > > if (vp->v_type != VCHR && > @@ -3069,8 +3073,10 @@ _vdrop(struct vnode *vp, bool locked) > else > ASSERT_VI_UNLOCKED(vp, __func__); > CTR2(KTR_VFS, "%s: vp %p", __func__, vp); > - if ((int)vp->v_holdcnt <= 0) > - panic("vdrop: holdcnt %d", vp->v_holdcnt); > + if (__predict_false((int)vp->v_holdcnt <= 0)) { > + vn_printf(vp, "vdrop: holdcnt %d", vp->v_holdcnt); > + panic("vdrop: wrong holdcnt"); > + } > if (!locked) { > if (refcount_release_if_not_last(&vp->v_holdcnt)) > return; ___ 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-unsubscr...@freebsd.org"
svn commit: r351624 - head/sys/dev/sound/midi
Author: markj Date: Fri Aug 30 15:40:31 2019 New Revision: 351624 URL: https://svnweb.freebsd.org/changeset/base/351624 Log: Properly check for an interrupted cv_wait_sig(). The returned error number may be EINTR or ERESTART depending on whether or not the signal is supposed to interrupt the system call. Reported and tested by: pho MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/sound/midi/sequencer.c Modified: head/sys/dev/sound/midi/sequencer.c == --- head/sys/dev/sound/midi/sequencer.c Fri Aug 30 06:06:12 2019 (r351623) +++ head/sys/dev/sound/midi/sequencer.c Fri Aug 30 15:40:31 2019 (r351624) @@ -912,7 +912,7 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int iof goto err1; retval = cv_wait_sig(&scp->in_cv, &scp->seq_lock); - if (retval == EINTR) + if (retval != 0) goto err1; } @@ -977,7 +977,7 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io * We slept, maybe things have changed since last * dying check */ - if (retval == EINTR) + if (retval != 0) goto err0; #if 0 /* ___ 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-unsubscr...@freebsd.org"
svn commit: r351625 - head
Author: jhb Date: Fri Aug 30 16:30:09 2019 New Revision: 351625 URL: https://svnweb.freebsd.org/changeset/base/351625 Log: Add entries for unmapped mbufs and KTLS. Modified: head/RELNOTES Modified: head/RELNOTES == --- head/RELNOTES Fri Aug 30 15:40:31 2019(r351624) +++ head/RELNOTES Fri Aug 30 16:30:09 2019(r351625) @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r351522: + Add kernel-side support for in-kernel Transport Layer Security + (KTLS). KTLS permits using sendfile(2) over sockets using + TLS. + r351361: Add probes for lockmgr(9) to the lockstat DTrace provider, add corresponding lockstat(1) events, and document the new probes in @@ -64,6 +69,9 @@ r350315, r350316: r350307: libcap_random(3) has been removed. Applications can use native APIs to get random data in capability mode. + +r349529,r349530: + Add support for using unmapped mbufs with sendfile(2). r349352: nand(4) and related components have been removed. ___ 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-unsubscr...@freebsd.org"
svn commit: r351626 - head/sys/netgraph/bluetooth/socket
Author: emax Date: Fri Aug 30 16:35:31 2019 New Revision: 351626 URL: https://svnweb.freebsd.org/changeset/base/351626 Log: avoid holding PCB mutex during copyin/copyout() Reported by: imp, mms dot vanbreukelingen at gmail dot com Reviewed by: imp Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c == --- head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.cFri Aug 30 16:30:09 2019(r351625) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.cFri Aug 30 16:35:31 2019(r351626) @@ -1156,15 +1156,15 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long if (p->num_entries <= 0 || p->num_entries > NG_HCI_MAX_NEIGHBOR_NUM || p->entries == NULL) { - error = EINVAL; - break; + mtx_unlock(&pcb->pcb_mtx); + return (EINVAL); } NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_NODE_GET_NEIGHBOR_CACHE, 0, M_NOWAIT); if (msg == NULL) { - error = ENOMEM; - break; + mtx_unlock(&pcb->pcb_mtx); + return (ENOMEM); } ng_btsocket_hci_raw_get_token(&msg->header.token); pcb->token = msg->header.token; @@ -1173,7 +1173,8 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, 0); if (error != 0) { pcb->token = 0; - break; + mtx_unlock(&pcb->pcb_mtx); + return (error); } error = msleep(&pcb->msg, &pcb->pcb_mtx, @@ -1181,16 +1182,21 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long ng_btsocket_hci_raw_ioctl_timeout * hz); pcb->token = 0; - if (error != 0) - break; + if (error != 0) { + mtx_unlock(&pcb->pcb_mtx); + return (error); + } - if (pcb->msg != NULL && - pcb->msg->header.cmd == NGM_HCI_NODE_GET_NEIGHBOR_CACHE) { + msg = pcb->msg; + pcb->msg = NULL; + + mtx_unlock(&pcb->pcb_mtx); + + if (msg != NULL && + msg->header.cmd == NGM_HCI_NODE_GET_NEIGHBOR_CACHE) { /* Return data back to user space */ - p1 = (ng_hci_node_get_neighbor_cache_ep *) - (pcb->msg->data); - p2 = (ng_hci_node_neighbor_cache_entry_ep *) - (p1 + 1); + p1 = (ng_hci_node_get_neighbor_cache_ep *)(msg->data); + p2 = (ng_hci_node_neighbor_cache_entry_ep *)(p1 + 1); p->num_entries = min(p->num_entries, p1->num_entries); if (p->num_entries > 0) @@ -1200,8 +1206,9 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long } else error = EINVAL; - NG_FREE_MSG(pcb->msg); /* checks for != NULL */ - }break; + NG_FREE_MSG(msg); /* checks for != NULL */ + return (error); + } /* NOTREACHED */ case SIOC_HCI_RAW_NODE_GET_CON_LIST: { struct ng_btsocket_hci_raw_con_list *p = @@ -1212,15 +1219,15 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long if (p->num_connections == 0 || p->num_connections > NG_HCI_MAX_CON_NUM || p->connections == NULL) { - error = EINVAL; - break; + mtx_unlock(&pcb->pcb_mtx); + return (EINVAL); } NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_NODE_GET_CON_LIST, 0, M_NOWAIT); if (msg == NULL) { - error = ENOMEM; - break; + mtx_unlock(&pcb->pcb_mtx); + return (ENOMEM); } ng_btsocket_hci_raw_get_token(&msg->header.token); pcb->token = msg->header.token; @@ -1229,7 +1236,8 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, 0); if (error != 0) { pcb->token = 0; - break; + mtx_unlock
svn commit: r351628 - head/share/man/man9
Author: markj Date: Fri Aug 30 19:35:44 2019 New Revision: 351628 URL: https://svnweb.freebsd.org/changeset/base/351628 Log: Update and clean up the UMA man page. - Fix warnings from igor and mandoc. - Provide a brief description of the separation between zones and their backend slab allocators. - Document cache zones and secondary zones. - Document the kernel config options added in r350659. - Document the uma_zalloc_pcpu() and uma_zfree_pcpu() wrappers. - Document uma_zone_reserve(), uma_zone_reserve_kva() and uma_zone_prealloc(). - Document uma_zone_alloc() and uma_zone_freef(). - Add some missing MLINKs and Xrefs. MFC after:2 weeks Modified: head/share/man/man9/Makefile head/share/man/man9/zone.9 Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileFri Aug 30 17:36:45 2019 (r351627) +++ head/share/man/man9/MakefileFri Aug 30 19:35:44 2019 (r351628) @@ -2223,7 +2223,9 @@ MLINKS+=vm_map_lookup.9 vm_map_lookup_done.9 MLINKS+=vm_map_max.9 vm_map_min.9 \ vm_map_max.9 vm_map_pmap.9 MLINKS+=vm_map_stack.9 vm_map_growstack.9 -MLINKS+=vm_map_wire.9 vm_map_unwire.9 +MLINKS+=vm_map_wire.9 vm_map_wire_mapped.9 \ + vm_page_wire.9 vm_page_unwire.9 \ + vm_page_wire.9 vm_page_unwire_noq.9 MLINKS+=vm_page_bits.9 vm_page_clear_dirty.9 \ vm_page_bits.9 vm_page_dirty.9 \ vm_page_bits.9 vm_page_is_valid.9 \ @@ -2282,15 +2284,27 @@ MLINKS+=zone.9 uma.9 \ zone.9 uma_zalloc.9 \ zone.9 uma_zalloc_arg.9 \ zone.9 uma_zalloc_domain.9 \ + zone.9 uma_zalloc_pcpu.9 \ + zone.9 uma_zalloc_pcpu_arg.9 \ + zone.9 uma_zcache_create.9 \ zone.9 uma_zcreate.9 \ zone.9 uma_zdestroy.9 \ zone.9 uma_zfree.9 \ zone.9 uma_zfree_arg.9 \ zone.9 uma_zfree_domain.9 \ + zone.9 uma_zfree_pcpu.9 \ + zone.9 uma_zfree_pcpu_arg.9 \ zone.9 uma_zone_get_cur.9 \ zone.9 uma_zone_get_max.9 \ + zone.9 uma_zone_prealloc.9 \ + zone.9 uma_zone_reserve.9 \ + zone.9 uma_zone_reserve_kva.9 \ + zone.9 uma_zone_set_allocf.9 \ + zone.9 uma_zone_set_freef.9 \ zone.9 uma_zone_set_max.9 \ + zone.9 uma_zone_set_maxaction.9 \ + zone.9 uma_zone_set_maxcache.9 \ zone.9 uma_zone_set_warning.9 \ - zone.9 uma_zone_set_maxaction.9 + zone.9 uma_zsecond_create.9 .include Modified: head/share/man/man9/zone.9 == --- head/share/man/man9/zone.9 Fri Aug 30 17:36:45 2019(r351627) +++ head/share/man/man9/zone.9 Fri Aug 30 19:35:44 2019(r351628) @@ -25,40 +25,62 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2018 -.Dt ZONE 9 +.Dd August 30, 2019 +.Dt UMA 9 .Os .Sh NAME -.Nm uma_zcreate , -.Nm uma_zalloc , -.Nm uma_zalloc_arg , -.Nm uma_zalloc_domain , -.Nm uma_zfree , -.Nm uma_zfree_arg , -.Nm uma_zfree_domain , -.Nm uma_zdestroy , -.Nm uma_zone_set_max , -.Nm uma_zone_get_max , -.Nm uma_zone_get_cur , -.Nm uma_zone_set_warning , -.Nm uma_zone_set_maxaction -.Nd zone allocator +.Nm UMA +.Nd general-purpose kernel object allocator .Sh SYNOPSIS .In sys/param.h .In sys/queue.h .In vm/uma.h +.Cd "options UMA_FIRSTTOUCH" +.Cd "options UMA_XDOMAIN" +.Bd -literal +typedef int (*uma_ctor)(void *mem, int size, void *arg, int flags); +typedef void (*uma_dtor)(void *mem, int size, void *arg); +typedef int (*uma_init)(void *mem, int size, int flags); +typedef void (*uma_fini)(void *mem, int size); +typedef int (*uma_import)(void *arg, void **store, int count, int domain, +int flags); +typedef void (*uma_release)(void *arg, void **store, int count); +typedef void *(*uma_alloc)(uma_zone_t zone, vm_size_t size, int domain, +uint8_t *pflag, int wait); +typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); + +.Ed .Ft uma_zone_t .Fo uma_zcreate .Fa "char *name" "int size" -.Fa "uma_ctor ctor" "uma_dtor dtor" "uma_init uminit" "uma_fini fini" +.Fa "uma_ctor ctor" "uma_dtor dtor" "uma_init zinit" "uma_fini zfini" .Fa "int align" "uint16_t flags" .Fc +.Ft uma_zone_t +.Fo uma_zcache_create +.Fa "char *name" "int size" +.Fa "uma_ctor ctor" "uma_dtor dtor" "uma_init zinit" "uma_fini zfini" +.Fa "uma_import zimport" "uma_release zrelease" +.Fa "void *arg" "int flags" +.Fc +.Ft uma_zone_t +.Fo uma_zsecond_create +.Fa "char *name" +.Fa "uma_ctor ctor" "uma_dtor dtor" "uma_init zinit" "uma_fini zfini" +.Fa "uma_zone_t master" +.Fc +.Ft void +.Fn uma_zdestroy "uma_zone_t zone" .Ft "void *" .Fn uma_zalloc "uma_zone_t zone" "int flags" .Ft "void *" .Fn uma_zalloc_arg "uma_zone_t zone" "void *arg" "int flags" .Ft "void *" .Fn uma_zalloc_domain "uma_zone_t zone" "void *arg" "int domain" "int flags" +.Ft "void *" +.Fn uma_zalloc_pcpu "uma_zone_t zone" "int flags" +.Ft "void *" +.Fn uma_zalloc_pcpu_arg "uma_zo
svn commit: r351629 - head/sys/net
Author: mjoras Date: Fri Aug 30 20:19:43 2019 New Revision: 351629 URL: https://svnweb.freebsd.org/changeset/base/351629 Log: Wrap a vlan's parent's if_output in a separate function. When a vlan interface is created, its if_output is set directly to the parent interface's if_output. This is fine in the normal case but has an unfortunate consequence if you end up with a certain combination of vlan and lagg interfaces. Consider you have a lagg interface with a single laggport member. When an interface is added to a lagg its if_output is set to lagg_port_output, which blackholes traffic from the normal networking stack but not certain frames from BPF (pseudo_AF_HDRCMPLT). If you now create a vlan with the laggport member (not the lagg interface) as its parent, its if_output is set to lagg_port_output as well. While this is confusing conceptually and likely represents a misconfigured system, it is not itself a problem. The problem arises when you then remove the lagg interface. Doing this resets the if_output of the laggport member back to its original state, but the vlan's if_output is left pointing to lagg_port_output. This gives rise to the possibility that the system will panic when e.g. bpf is used to send any frames on the vlan interface. Fix this by creating a new function, vlan_output, which simply wraps the parent's current if_output. That way when the parent's if_output is restored there is no stale usage of lagg_port_output. Reviewed by: rstone Differential Revision:D21209 Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c == --- head/sys/net/if_vlan.c Fri Aug 30 19:35:44 2019(r351628) +++ head/sys/net/if_vlan.c Fri Aug 30 20:19:43 2019(r351629) @@ -294,6 +294,8 @@ static int vlan_setflag(struct ifnet *ifp, int flag, i static int vlan_setflags(struct ifnet *ifp, int status); static int vlan_setmulti(struct ifnet *ifp); static int vlan_transmit(struct ifnet *ifp, struct mbuf *m); +static int vlan_output(struct ifnet *ifp, struct mbuf *m, +const struct sockaddr *dst, struct route *ro); static void vlan_unconfig(struct ifnet *ifp); static void vlan_unconfig_locked(struct ifnet *ifp, int departing); static int vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t tag); @@ -1209,6 +1211,27 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m) return (error); } +static int +vlan_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, +struct route *ro) +{ + struct epoch_tracker et; + struct ifvlan *ifv; + struct ifnet *p; + + NET_EPOCH_ENTER(et); + ifv = ifp->if_softc; + if (TRUNK(ifv) == NULL) { + NET_EPOCH_EXIT(et); + m_freem(m); + return (ENETDOWN); + } + p = PARENT(ifv); + NET_EPOCH_EXIT(et); + return p->if_output(ifp, m, dst, ro); +} + + /* * The ifp->if_qflush entry point for vlan(4) is a no-op. */ @@ -1424,12 +1447,17 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 */ ifp->if_mtu = p->if_mtu - ifv->ifv_mtufudge; ifp->if_baudrate = p->if_baudrate; - ifp->if_output = p->if_output; ifp->if_input = p->if_input; ifp->if_resolvemulti = p->if_resolvemulti; ifp->if_addrlen = p->if_addrlen; ifp->if_broadcastaddr = p->if_broadcastaddr; ifp->if_pcp = ifv->ifv_pcp; + + /* +* We wrap the parent's if_output using vlan_output to ensure that it +* can't become stale. +*/ + ifp->if_output = vlan_output; /* * Copy only a selected subset of flags from the parent. ___ 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-unsubscr...@freebsd.org"
svn commit: r351630 - head/stand/efi/libefi
Author: tsoome Date: Fri Aug 30 20:54:30 2019 New Revision: 351630 URL: https://svnweb.freebsd.org/changeset/base/351630 Log: qemu-system-aarch64 does list block device with very large block size Also insert Vendor device as "parent" disk (found in qemu-system-aarch64 -cpu cortex-a57). This does fix lsdev in loader.efi on this platform. Modified: head/stand/efi/libefi/efipart.c Modified: head/stand/efi/libefi/efipart.c == --- head/stand/efi/libefi/efipart.c Fri Aug 30 20:19:43 2019 (r351629) +++ head/stand/efi/libefi/efipart.c Fri Aug 30 20:54:30 2019 (r351630) @@ -255,10 +255,12 @@ efipart_inithandles(void) /* * We assume the block size 512 or greater power of 2. +* Also skip devices with block size > 32k. * iPXE is known to insert stub BLOCK IO device with * BlockSize 1. */ if (blkio->Media->BlockSize < 512 || + blkio->Media->BlockSize > (1 << 15) || !powerof2(blkio->Media->BlockSize)) { continue; } @@ -603,7 +605,8 @@ restart: continue; if (DevicePathType(node) == HARDWARE_DEVICE_PATH && - DevicePathSubType(node) == HW_PCI_DP) { + (DevicePathSubType(node) == HW_PCI_DP || +DevicePathSubType(node) == HW_VENDOR_DP)) { STAILQ_REMOVE(&pdinfo, hd, pdinfo, pd_link); efipart_hdinfo_add(hd, NULL); goto restart; ___ 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-unsubscr...@freebsd.org"
svn commit: r351631 - head/share/man/man4
Author: sevan (doc committer) Date: Fri Aug 30 21:49:00 2019 New Revision: 351631 URL: https://svnweb.freebsd.org/changeset/base/351631 Log: Earliest reference to /dev/null I can find is in v4 sh(1) and nulldev in nsys/ken/subr.c via TUHS archive https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4 MFC after:5 days Modified: head/share/man/man4/null.4 Modified: head/share/man/man4/null.4 == --- head/share/man/man4/null.4 Fri Aug 30 20:54:30 2019(r351630) +++ head/share/man/man4/null.4 Fri Aug 30 21:49:00 2019(r351631) @@ -28,7 +28,7 @@ .\"@(#)null.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd August 30, 2019 .Dt NULL 4 .Os .Sh NAME @@ -54,4 +54,4 @@ device is always zero. A .Nm device appeared in -.At v7 . +.At v4 . ___ 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-unsubscr...@freebsd.org"
svn commit: r351632 - head/sys/kern
Author: mjg Date: Fri Aug 30 21:54:45 2019 New Revision: 351632 URL: https://svnweb.freebsd.org/changeset/base/351632 Log: vfs: add a missing VNODE_REFCOUNT_FENCE_REL to v_incr_usecount_locked Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cFri Aug 30 21:49:00 2019(r351631) +++ head/sys/kern/vfs_subr.cFri Aug 30 21:54:45 2019(r351632) @@ -2641,6 +2641,7 @@ v_incr_usecount_locked(struct vnode *vp) VNASSERT(vp->v_usecount == 0, vp, ("vnode with usecount and VI_OWEINACT set")); vp->v_iflag &= ~VI_OWEINACT; + VNODE_REFCOUNT_FENCE_REL(); } refcount_acquire(&vp->v_usecount); v_incr_devcount(vp); ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r351622 - head/sys/kern
On 8/30/19, Konstantin Belousov wrote: > On Fri, Aug 30, 2019 at 12:45:54AM +, Mateusz Guzik wrote: >> +VNASSERT(vp->v_holdcnt > 0 && vp->v_usecount > 0, vp, > A more precise assert condition would also include > vp->v_holdcont >= vp->v_usecount > I agree, but that would be problematic to test for due to other threads playing with these counters. Note this commit was just diff reduction for "usecount implies holdcnt" ( https://reviews.freebsd.org/D21471 ) after which the stronger assertion would not hold. -- Mateusz Guzik ___ 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-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-head@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"
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-head@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"
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-head@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 commit: r351637 - head/stand/efi/libefi
Author: tsoome Date: Sat Aug 31 06:24:09 2019 New Revision: 351637 URL: https://svnweb.freebsd.org/changeset/base/351637 Log: loader.efi: use shift 16 in efipart as it is max ashift supported by zfs Modified: head/stand/efi/libefi/efipart.c Modified: head/stand/efi/libefi/efipart.c == --- head/stand/efi/libefi/efipart.c Sat Aug 31 04:28:22 2019 (r351636) +++ head/stand/efi/libefi/efipart.c Sat Aug 31 06:24:09 2019 (r351637) @@ -255,12 +255,13 @@ efipart_inithandles(void) /* * We assume the block size 512 or greater power of 2. -* Also skip devices with block size > 32k. +* Also skip devices with block size > 64k (16 is max +* ashift supported by zfs). * iPXE is known to insert stub BLOCK IO device with * BlockSize 1. */ if (blkio->Media->BlockSize < 512 || - blkio->Media->BlockSize > (1 << 15) || + blkio->Media->BlockSize > (1 << 16) || !powerof2(blkio->Media->BlockSize)) { continue; } ___ 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-unsubscr...@freebsd.org"