From owner-svn-src-stable@freebsd.org Sun Jul 10 04:33:17 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ADCAB84328; Sun, 10 Jul 2016 04:33:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2DE13D7; Sun, 10 Jul 2016 04:33:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6A4XGqS068622; Sun, 10 Jul 2016 04:33:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6A4XGiT068621; Sun, 10 Jul 2016 04:33:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607100433.u6A4XGiT068621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 Jul 2016 04:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302513 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2016 04:33:17 -0000 Author: kib Date: Sun Jul 10 04:33:16 2016 New Revision: 302513 URL: https://svnweb.freebsd.org/changeset/base/302513 Log: MFC r302236: Handle the vm_fault() handler race with the vm_object_collapse() sleepable scan. MFC r302317: Change type of the 'dead' variable to boolean. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Sun Jul 10 03:49:38 2016 (r302512) +++ stable/10/sys/vm/vm_fault.c Sun Jul 10 04:33:16 2016 (r302513) @@ -286,7 +286,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t vm_prot_t prot; long ahead, behind; int alloc_req, era, faultcount, nera, reqpage, result; - boolean_t growstack, is_first_object_locked, wired; + boolean_t dead, growstack, is_first_object_locked, wired; int map_generation; vm_object_t next_object; vm_page_t marray[VM_FAULT_READ_MAX]; @@ -423,11 +423,18 @@ fast_failed: fs.pindex = fs.first_pindex; while (TRUE) { /* - * If the object is dead, we stop here + * If the object is marked for imminent termination, + * we retry here, since the collapse pass has raced + * with us. Otherwise, if we see terminally dead + * object, return fail. */ - if (fs.object->flags & OBJ_DEAD) { + if ((fs.object->flags & OBJ_DEAD) != 0) { + dead = fs.object->type == OBJT_DEAD; unlock_and_deallocate(&fs); - return (KERN_PROTECTION_FAILURE); + if (dead) + return (KERN_PROTECTION_FAILURE); + pause("vmf_de", 1); + goto RetryFault; } /* From owner-svn-src-stable@freebsd.org Sun Jul 10 17:16:57 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DDD1B854A0; Sun, 10 Jul 2016 17:16:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 405E712F8; Sun, 10 Jul 2016 17:16:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6AHGuF3051020; Sun, 10 Jul 2016 17:16:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6AHGu32051019; Sun, 10 Jul 2016 17:16:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607101716.u6AHGu32051019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 10 Jul 2016 17:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302527 - stable/11/sys/powerpc/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2016 17:16:57 -0000 Author: gjb Date: Sun Jul 10 17:16:56 2016 New Revision: 302527 URL: https://svnweb.freebsd.org/changeset/base/302527 Log: Turn off WITNESS, INVARIANTS, etc., in the powerpc GENERIC64 kernel configuration, missed after the stable/11 branch. Approved by: re (kib) PR: 210974 Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/powerpc/conf/GENERIC64 Modified: stable/11/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/11/sys/powerpc/conf/GENERIC64 Sun Jul 10 14:17:36 2016 (r302526) +++ stable/11/sys/powerpc/conf/GENERIC64 Sun Jul 10 17:16:56 2016 (r302527) @@ -82,14 +82,6 @@ options INCLUDE_CONFIG_FILE # Inclu # Debugging support. Always need this: options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use (turn off in stable branch): -options DDB #Support DDB -#options DEADLKRES #Enable the deadlock resolver -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS #Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel From owner-svn-src-stable@freebsd.org Mon Jul 11 04:11:34 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DA4EB90B82; Mon, 11 Jul 2016 04:11:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FB291EE3; Mon, 11 Jul 2016 04:11:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6B4BXXo093661; Mon, 11 Jul 2016 04:11:33 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6B4BXsh093660; Mon, 11 Jul 2016 04:11:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607110411.u6B4BXsh093660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Jul 2016 04:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302536 - stable/10/usr.sbin/freebsd-update X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 04:11:34 -0000 Author: delphij Date: Mon Jul 11 04:11:33 2016 New Revision: 302536 URL: https://svnweb.freebsd.org/changeset/base/302536 Log: MFC r302534: Allow - in distribution names. This is needed for freebsd-update to work with 11.0+, where the debugging symbols use a new naming scheme for release distribution files. Errata candidate. Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 11 03:34:32 2016 (r302535) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 11 04:11:33 2016 (r302536) @@ -1250,7 +1250,7 @@ fetch_metadata_sanity () { # Check that the first four fields make sense. if gunzip -c < files/$1.gz | - grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then + grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then fetch_metadata_bogus "" return 1 fi From owner-svn-src-stable@freebsd.org Mon Jul 11 04:12:17 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 002FDB90D48; Mon, 11 Jul 2016 04:12:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C592B1215; Mon, 11 Jul 2016 04:12:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6B4CGSc095723; Mon, 11 Jul 2016 04:12:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6B4CGaP095722; Mon, 11 Jul 2016 04:12:16 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607110412.u6B4CGaP095722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Jul 2016 04:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302537 - stable/9/usr.sbin/freebsd-update X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 04:12:17 -0000 Author: delphij Date: Mon Jul 11 04:12:15 2016 New Revision: 302537 URL: https://svnweb.freebsd.org/changeset/base/302537 Log: MFC r302534: Allow - in distribution names. This is needed for freebsd-update to work with 11.0+, where the debugging symbols use a new naming scheme for release distribution files. Errata candidate. Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/9/usr.sbin/freebsd-update/ (props changed) Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 11 04:11:33 2016 (r302536) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 11 04:12:15 2016 (r302537) @@ -1229,7 +1229,7 @@ fetch_metadata_sanity () { # Check that the first four fields make sense. if gunzip -c < files/$1.gz | - grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then + grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then fetch_metadata_bogus "" return 1 fi From owner-svn-src-stable@freebsd.org Mon Jul 11 04:50:33 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59959B91586; Mon, 11 Jul 2016 04:50:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B3161287; Mon, 11 Jul 2016 04:50:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6B4oWuW007512; Mon, 11 Jul 2016 04:50:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6B4oWse007511; Mon, 11 Jul 2016 04:50:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607110450.u6B4oWse007511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Jul 2016 04:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302539 - stable/11/usr.sbin/freebsd-update X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 04:50:33 -0000 Author: delphij Date: Mon Jul 11 04:50:32 2016 New Revision: 302539 URL: https://svnweb.freebsd.org/changeset/base/302539 Log: MFC r302534: Allow - in distribution names. This is needed for freebsd-update to work with 11.0+, where the debugging symbols use a new naming scheme for release distribution files. Errata candidate. Approved by: re (gjb) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 11 04:21:38 2016 (r302538) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 11 04:50:32 2016 (r302539) @@ -1250,7 +1250,7 @@ fetch_metadata_sanity () { # Check that the first four fields make sense. if gunzip -c < files/$1.gz | - grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then + grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then fetch_metadata_bogus "" return 1 fi From owner-svn-src-stable@freebsd.org Mon Jul 11 07:36:01 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06442B902AF; Mon, 11 Jul 2016 07:36:01 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4624176A; Mon, 11 Jul 2016 07:36:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6B7a0eF070199; Mon, 11 Jul 2016 07:36:00 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6B7ZwNn070181; Mon, 11 Jul 2016 07:35:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607110735.u6B7ZwNn070181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Jul 2016 07:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302555 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 07:36:01 -0000 Author: delphij Date: Mon Jul 11 07:35:58 2016 New Revision: 302555 URL: https://svnweb.freebsd.org/changeset/base/302555 Log: MFC r302221,302222: MFV r302218: file 5.28. Relnotes: yes Added: stable/10/contrib/file/magic/Magdir/ber - copied unchanged from r302221, head/contrib/file/magic/Magdir/ber stable/10/contrib/file/magic/Magdir/coverage - copied unchanged from r302221, head/contrib/file/magic/Magdir/coverage stable/10/contrib/file/magic/Magdir/pc88 - copied unchanged from r302221, head/contrib/file/magic/Magdir/pc88 stable/10/contrib/file/magic/Magdir/pc98 - copied unchanged from r302221, head/contrib/file/magic/Magdir/pc98 stable/10/contrib/file/magic/Magdir/x68000 - copied unchanged from r302221, head/contrib/file/magic/Magdir/x68000 Deleted: stable/10/contrib/file/src/magic.h Modified: stable/10/contrib/file/ChangeLog stable/10/contrib/file/config.h.in stable/10/contrib/file/configure stable/10/contrib/file/configure.ac stable/10/contrib/file/doc/file.man stable/10/contrib/file/magic/Magdir/c-lang stable/10/contrib/file/magic/Magdir/console stable/10/contrib/file/magic/Magdir/database stable/10/contrib/file/magic/Magdir/elf stable/10/contrib/file/magic/Magdir/msdos stable/10/contrib/file/magic/Magdir/msx stable/10/contrib/file/magic/Magdir/perl stable/10/contrib/file/magic/Makefile.am stable/10/contrib/file/magic/Makefile.in stable/10/contrib/file/src/Makefile.am stable/10/contrib/file/src/Makefile.in stable/10/contrib/file/src/apprentice.c stable/10/contrib/file/src/cdf.c stable/10/contrib/file/src/compress.c stable/10/contrib/file/src/der.c stable/10/contrib/file/src/file.c stable/10/contrib/file/src/softmagic.c stable/10/lib/libmagic/Makefile stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/file/ChangeLog ============================================================================== --- stable/10/contrib/file/ChangeLog Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/ChangeLog Mon Jul 11 07:35:58 2016 (r302555) @@ -1,3 +1,15 @@ +2016-06-13 19:40 Christos Zoulas + + * release 5.28 + * fix leak on allocation failure + +2016-06-01 1:20 Christos Zoulas + + * PR/555: Avoid overflow for offset > nbytes + * PR/550: Segv on DER parsing: + - use the correct variable for length + - set offset to 0 on failure. + 2016-05-13 12:00 Christos Zoulas * release 5.27 Modified: stable/10/contrib/file/config.h.in ============================================================================== --- stable/10/contrib/file/config.h.in Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/config.h.in Mon Jul 11 07:35:58 2016 (r302555) @@ -328,6 +328,9 @@ # endif #endif +/* Enable zlib compression support */ +#undef ZLIBSUPPORT + /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 Modified: stable/10/contrib/file/configure ============================================================================== --- stable/10/contrib/file/configure Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/configure Mon Jul 11 07:35:58 2016 (r302555) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.27. +# Generated by GNU Autoconf 2.69 for file 5.28. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.27' -PACKAGE_STRING='file 5.27' +PACKAGE_VERSION='5.28' +PACKAGE_STRING='file 5.28' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -766,6 +766,7 @@ enable_option_checking enable_silent_rules enable_elf enable_elf_core +enable_zlib enable_fsect_man5 enable_dependency_tracking enable_static @@ -1327,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.27 to adapt to many kinds of systems. +\`configure' configures file 5.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.27:";; + short | recursive ) echo "Configuration of file 5.28:";; esac cat <<\_ACEOF @@ -1409,6 +1410,7 @@ Optional Features: --disable-silent-rules verbose build output (undo: "make V=0") --disable-elf disable builtin ELF support --disable-elf-core disable ELF core file support + --disable-zlib disable zlib compression support [default=auto] --enable-fsect-man5 enable file formats in man section 5 --enable-dependency-tracking do not reject slow dependency extractors @@ -1507,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.27 +file configure 5.28 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2163,7 +2165,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.27, which was +It was created by file $as_me 5.28, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3029,7 +3031,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.27' + VERSION='5.28' cat >>confdefs.h <<_ACEOF @@ -3218,6 +3220,16 @@ $as_echo "#define ELFCORE 1" >>confdefs. fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib support" >&5 +$as_echo_n "checking for zlib support... " >&6; } +# Check whether --enable-zlib was given. +if test "${enable_zlib+set}" = set; then : + enableval=$enable_zlib; +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_zlib" >&5 +$as_echo "$enable_zlib" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file formats in man section 5" >&5 $as_echo_n "checking for file formats in man section 5... " >&6; } # Check whether --enable-fsect-man5 was given. @@ -12812,7 +12824,8 @@ fi done -for ac_header in zlib.h +if test "$enable_zlib" != "no"; then + for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : @@ -12824,6 +12837,7 @@ fi done +fi ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" " #ifdef HAVE_SIGNAL_H #include @@ -14400,7 +14414,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 +if test "$enable_zlib" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 $as_echo_n "checking for gzopen in -lz... " >&6; } if ${ac_cv_lib_z_gzopen+:} false; then : $as_echo_n "(cached) " >&6 @@ -14445,6 +14460,7 @@ _ACEOF fi +fi if test "$MINGW" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regexec in -lgnurx" >&5 $as_echo_n "checking for regexec in -lgnurx... " >&6; } @@ -14504,6 +14520,16 @@ else fi +if test "$enable_zlib" = "yes"; then + if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then + as_fn_error $? "zlib support requested but not found" "$LINENO" 5 + fi +elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then + +$as_echo "#define ZLIBSUPPORT 1" >>confdefs.h + +fi + ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile" cat >confcache <<\_ACEOF @@ -15049,7 +15075,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.27, which was +This file was extended by file $as_me 5.28, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15115,7 +15141,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.27 +file config.status 5.28 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/10/contrib/file/configure.ac ============================================================================== --- stable/10/contrib/file/configure.ac Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/configure.ac Mon Jul 11 07:35:58 2016 (r302555) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.27],[christos@astron.com]) +AC_INIT([file],[5.28],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -34,6 +34,11 @@ fi], [ AC_DEFINE([ELFCORE], 1, [Define for ELF core file support]) ]) +AC_MSG_CHECKING(for zlib support) +AC_ARG_ENABLE(zlib, +[AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])]) +AC_MSG_RESULT($enable_zlib) + AC_MSG_CHECKING(for file formats in man section 5) AC_ARG_ENABLE(fsect-man5, [ --enable-fsect-man5 enable file formats in man section 5], @@ -84,7 +89,9 @@ AC_CHECK_HEADERS(stdint.h fcntl.h locale AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h) AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) -AC_CHECK_HEADERS(zlib.h) +if test "$enable_zlib" != "no"; then + AC_CHECK_HEADERS(zlib.h) +fi AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[ #ifdef HAVE_SIGNAL_H #include @@ -148,7 +155,9 @@ dnl Provide implementation of some requi AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf) dnl Checks for libraries -AC_CHECK_LIB(z,gzopen) +if test "$enable_zlib" != "no"; then + AC_CHECK_LIB(z, gzopen) +fi if test "$MINGW" = 1; then AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW])) fi @@ -156,5 +165,14 @@ fi dnl See if we are cross-compiling AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes) +dnl Final sanity checks +if test "$enable_zlib" = "yes"; then + if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then + AC_MSG_ERROR([zlib support requested but not found]) + fi +elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then + AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support]) +fi + AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) AC_OUTPUT Modified: stable/10/contrib/file/doc/file.man ============================================================================== --- stable/10/contrib/file/doc/file.man Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/doc/file.man Mon Jul 11 07:35:58 2016 (r302555) @@ -1,4 +1,4 @@ -.\" $File: file.man,v 1.120 2016/03/31 17:51:12 christos Exp $ +.\" $File: file.man,v 1.121 2016/06/07 22:09:20 rrt Exp $ .Dd March 13, 2016 .Dt FILE __CSECTION__ .Os @@ -213,6 +213,9 @@ Prints ELF file details. Consults magic files. .It tar Examines tar files. +.It text +A synonym for +.Sq ascii . .El .It Fl Fl extension Print a slash-separated list of valid extensions for the file type found. Copied: stable/10/contrib/file/magic/Magdir/ber (from r302221, head/contrib/file/magic/Magdir/ber) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/file/magic/Magdir/ber Mon Jul 11 07:35:58 2016 (r302555, copy of r302221, head/contrib/file/magic/Magdir/ber) @@ -0,0 +1,65 @@ + +#------------------------------------------------------------------------------ +# $File: ber,v 1.1 2016/06/05 00:21:30 christos Exp $ +# ber: file(1) magic for several BER formats used in the mobile +# telecommunications industry (Georg Sauthoff) + +# The file formats are standardized by the GSMA (GSM association). +# They are specified via ASN.1 schemas and some prose. Basic encoding +# rules (BER) is the used encoding. The formats are used for exchanging +# call data records (CDRs) between mobile operators and associated +# parties for roaming clearing purposes and fraud detection. + +# The magic file covers: + +# - TAP files (TD.57) - CDR batches and notifications +# - RAP files (TD.32) - return batches and acknowledgements +# - NRT files (TD.35) - CDR batches for 'near real time' processing + +# +# TAP 3 Files +# TAP -> Transferred Account Procedure +# cf. http://www.gsma.com/newsroom/wp-content/uploads/TD.57-v32.31.pdf +# TransferBatch short tag +0 byte 0x61 +# BatchControlInfo short tag +>&1 search/b5 \x64 +# Sender long tag #TAP 3.x (BER encoded) +>>&1 search/b8 \x5f\x81\x44 +# 3 block +>>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01 +>>>>&0 byte x TAP 3.%d Batch (TD.57, Transferred Account) + +# Notification short tag +0 byte 0x62 +# Sender long tag +>2 search/b8 \x5f\x81\x44 +# 3 block +>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01 +>>>&0 byte x TAP 3.%d Notification (TD.57, Transferred Account) + + +# NRT Files +# NRT a.k.a. NRTRDE +0 byte 0x61 +# 2 block +>&1 search/b8 \x5f\x29\x01\x02\x5f\x25\x01 +>>&0 byte x NRT 2.%d (TD.35, Near Real Time Roaming Data Exchange) + +# RAP Files +# cf. http://www.gsma.com/newsroom/wp-content/uploads/TD.32-v6.11.pdf +# Long ReturnBatch tag +0 string \x7f\x84\x16 +# Long RapBatchControlInfo tag +>&1 search/b8 \x7f\x84\x19 +# 3 block +>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01 +# 1 block +>>>&1 string/b \x5f\x84\x20\x01\x01\x5f\x84\x1f\x01 +>>>>&0 byte x RAP 1.%d Batch (TD.32, Returned Account Procedure), +>>>&0 byte x TAP 3.%d + +# Long Acknowledgement tag +0 string \x7f\x84\x17 +# Long Sender tag +>&1 search/b5 \x5f\x81\x44 RAP Acknowledgement (TD.32, Returned Account Procedure) Modified: stable/10/contrib/file/magic/Magdir/c-lang ============================================================================== --- stable/10/contrib/file/magic/Magdir/c-lang Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/magic/Magdir/c-lang Mon Jul 11 07:35:58 2016 (r302555) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: c-lang,v 1.22 2015/10/29 18:49:11 christos Exp $ +# $File: c-lang,v 1.23 2016/05/21 14:28:27 christos Exp $ # c-lang: file(1) magic for C and related languages programs # # The strength is to beat standard HTML @@ -38,7 +38,8 @@ !:strength + 30 !:mime text/x-c++ 0 regex \^class[\ \t\n]+ C++ source text -!:strength + 30 +# But class is reduced to avoid beating php (Jens Schleusener) +!:strength + 13 !:mime text/x-c++ 0 regex \^public: C++ source text !:strength + 30 Modified: stable/10/contrib/file/magic/Magdir/console ============================================================================== --- stable/10/contrib/file/magic/Magdir/console Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/magic/Magdir/console Mon Jul 11 07:35:58 2016 (r302555) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: console,v 1.25 2016/04/18 20:22:10 christos Exp $ +# $File: console,v 1.26 2016/06/12 15:20:37 christos Exp $ # Console game magic # Toby Deshane @@ -56,6 +56,32 @@ >4 lelong <16 UNIF v%d format NES ROM image #------------------------------------------------------------------------------ +# fds: file(1) magic for Famciom Disk System disk images +# Reference: http://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System#.FDS_format +# From: David Korth +# TODO: Check "Disk info block" and get info from that in addition to the optional header. + +# Disk info block. (block 1) +0 name nintendo-fds-disk-info-block +>1 string *NINTENDO-HVC* Famicom Disk System disk image: +>23 byte !1 FMC- +>23 byte 1 FSC- +>16 string x \b%.3s +>15 byte x \b, mfr 0x%02X +>20 byte x (Rev.%02u) + +# Headered version. +0 string FDS\x1A +>0x11 string *NINTENDO-HVC* +>>0x10 use nintendo-fds-disk-info-block +>4 byte 1 (%u side) +>4 byte !1 (%u sides) + +# Unheadered version. +1 string *NINTENDO-HVC* +>0 use nintendo-fds-disk-info-block + +#------------------------------------------------------------------------------ # gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format # Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header # @@ -569,6 +595,15 @@ 0x1C belong 0xC2339F3D Nintendo GameCube disc image: >0 use nintendo-gcn-disc-common +# Type: Nintendo GameCube embedded disc image +# Commonly found on demo discs. +# From: David Korth +# Reference: http://hitmen.c02.at/files/yagcd/yagcd/index.html#idx14.8 +0 belong 0xAE0F38A2 +>0x0C belong 0x00100000 +>>(8.L+0x1C) belong 0xC2339F3D Nintendo GameCube embedded disc image: +>>>(8.L) use nintendo-gcn-disc-common + # Type: Nintendo Wii disc image # From: David Korth # Reference: http://wiibrew.org/wiki/Wii_Disc @@ -586,22 +621,15 @@ # Nintendo 3DS file formats. # -# Type: Nintendo 3DS "NCCH" header. -# Contained within either a CXI executable or an NCSD image. -# From: David Korth -# Reference: https://www.3dbrew.org/wiki/NCCH -0 name nintendo-3ds-NCCH ->0x100 string NCCH ->>0x150 string >\0 \b: "%.16s" ->>0x112 leshort x (v%u) ->>0x18C byte 2 (New3DS only) - # Type: Nintendo 3DS "NCSD" image. (game cards and eMMC) # From: David Korth # Reference: https://www.3dbrew.org/wiki/NCSD 0x100 string NCSD >0x118 lequad 0 Nintendo 3DS Game Card image ->>0x1000 use nintendo-3ds-NCCH +# NCCH header for partition 0. (game data) +>>0x1150 string >\0 \b: "%.16s" +>>0x312 byte x (Rev.%02u) +>>0x118C byte 2 (New3DS only) >>0x18D byte 0 (inner device) >>0x18D byte 1 (Card1) >>0x18D byte 2 (Card2) @@ -609,12 +637,74 @@ >0x118 bequad 0x0102020202000000 Nintendo 3DS eMMC dump (Old3DS) >0x118 bequad 0x0102020203000000 Nintendo 3DS eMMC dump (New3DS) +# Nintendo 3DS version code. +# Reference: https://www.3dbrew.org/wiki/Titles +# Format: leshort containing three fields: +# - 6-bit: Major +# - 6-bit: Minor +# - 4-bit: Revision +# NOTE: Only supporting major/minor versions from 0-15 right now. +# NOTE: Should be prefixed with "v". +0 name nintendo-3ds-version-code +# Raw version. +>0 leshort x \b%u, +# Major version. +>0 leshort&0xFC00 0x0000 0 +>0 leshort&0xFC00 0x0400 1 +>0 leshort&0xFC00 0x0800 2 +>0 leshort&0xFC00 0x0C00 3 +>0 leshort&0xFC00 0x1000 4 +>0 leshort&0xFC00 0x1400 5 +>0 leshort&0xFC00 0x1800 6 +>0 leshort&0xFC00 0x1C00 7 +>0 leshort&0xFC00 0x2000 8 +>0 leshort&0xFC00 0x2400 9 +>0 leshort&0xFC00 0x2800 10 +>0 leshort&0xFC00 0x2C00 11 +>0 leshort&0xFC00 0x3000 12 +>0 leshort&0xFC00 0x3400 13 +>0 leshort&0xFC00 0x3800 14 +>0 leshort&0xFC00 0x3C00 15 +# Minor version. +>0 leshort&0x03F0 0x0000 \b.0 +>0 leshort&0x03F0 0x0010 \b.1 +>0 leshort&0x03F0 0x0020 \b.2 +>0 leshort&0x03F0 0x0030 \b.3 +>0 leshort&0x03F0 0x0040 \b.4 +>0 leshort&0x03F0 0x0050 \b.5 +>0 leshort&0x03F0 0x0060 \b.6 +>0 leshort&0x03F0 0x0070 \b.7 +>0 leshort&0x03F0 0x0080 \b.8 +>0 leshort&0x03F0 0x0090 \b.9 +>0 leshort&0x03F0 0x00A0 \b.10 +>0 leshort&0x03F0 0x00B0 \b.11 +>0 leshort&0x03F0 0x00C0 \b.12 +>0 leshort&0x03F0 0x00D0 \b.13 +>0 leshort&0x03F0 0x00E0 \b.14 +>0 leshort&0x03F0 0x00F0 \b.15 +# Revision. +>0 leshort&0x000F x \b.%u + # Type: Nintendo 3DS "NCCH" container. # https://www.3dbrew.org/wiki/NCCH -0x100 string NCCH Nintendo 3DS ->0x18D byte&2 0 File Archive (CFA) ->0x18D byte&2 2 Executable Image (CXI) ->0 use nintendo-3ds-NCCH +0x100 string NCCH Nintendo 3DS +>0x18D byte&2 0 File Archive (CFA) +>0x18D byte&2 2 Executable Image (CXI) +>0x150 string >\0 \b: "%.16s" +>0x18D byte 0x05 +>>0x10E leshort x (Old3DS System Update v +>>0x10E use nintendo-3ds-version-code +>>0x10E leshort x \b) +>0x18D byte 0x15 +>>0x10E leshort x (New3DS System Update v +>>0x10E use nintendo-3ds-version-code +>>0x10E leshort x \b) +>0x18D byte !0x05 +>>0x18D byte !0x15 +>>>0x112 byte x (v +>>>0x112 use nintendo-3ds-version-code +>>>0x112 byte x \b) +>0x18C byte 2 (New3DS only) # Type: Nintendo 3DS "SMDH" file. (application description) # From: David Korth Copied: stable/10/contrib/file/magic/Magdir/coverage (from r302221, head/contrib/file/magic/Magdir/coverage) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/file/magic/Magdir/coverage Mon Jul 11 07:35:58 2016 (r302555, copy of r302221, head/contrib/file/magic/Magdir/coverage) @@ -0,0 +1,91 @@ + +#------------------------------------------------------------------------------ +# $File: coverage,v 1.1 2016/06/05 00:26:32 christos Exp $ +# xoverage: file(1) magic for test coverage data + +# File formats used to store test coverage data +# 2016-05-21, Georg Sauthoff + + +# - GCC gcno - written by GCC at compile time when compiling with +# gcc -ftest-coverage +# - GCC gcda - written by a program that was compiled with +# gcc -fprofile-arcs +# - LLVM raw profiles - generated by a program compiled with +# clang -fprofile-instr-generate -fcoverage-mapping ... +# - LLVM indexed profiles - generated by +# llvm-profdata +# - GCOV reports, i.e. the annotated source code +# - LCOV trace files, i.e. aggregated GCC profiles +# +# GCC coverage tracefiles +# .gcno file are created during compile time, +# while data collected during runtime is stored in .gcda files +# cf. gcov-io.h +# https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Gcov-Data-Files.html +# Examples: +# Fedora 23/x86-64/gcc-5.3.1: 6f 6e 63 67 52 33 30 35 +# Debian 8 PPC64/gcc-4.9.2 : 67 63 6e 6f 34 30 39 2a +0 lelong 0x67636e6f GCC gcno coverage (-ftest-coverage), +>&3 byte x version %c. +>&1 byte x \b%c + +# big endian +0 belong 0x67636e6f GCC gcno coverage (-ftest-coverage), +>&0 byte x version %c. +>&2 byte x \b%c (big-endian) + +# Examples: +# Fedora 23/x86-64/gcc-5.3.1: 61 64 63 67 52 33 30 35 +# Debian 8 PPC64/gcc-4.9.2 : 67 63 64 61 34 30 39 2a +0 lelong 0x67636461 GCC gcda coverage (-fprofile-arcs), +>&3 byte x version %c. +>&1 byte x \b%c + +# big endian +0 belong 0x67636461 GCC gcda coverage (-fprofile-arcs), +>&0 byte x version %c. +>&2 byte x \b%c (big-endian) + + +# LCOV tracefiles +# cf. http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php +0 string TN: +>&0 search/64 \nSF:/ LCOV coverage tracefile + + +# Coverage reports generated by gcov +# i.e. source code annoted with coverage information +0 string \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Source: +>&0 search/128 \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Graph: +>>&0 search/128 \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Data: GCOV coverage report + + +# LLVM coverage files + +# raw data after running a program compiled with: +# `clang -fprofile-instr-generate -fcoverage-mapping ...` +# default name: default.profraw +# magic is: \xFF lprofr \x81 +# cf. http://llvm.org/docs/doxygen/html/InstrProfData_8inc_source.html +0 lequad 0xff6c70726f667281 LLVM raw profile data, +>&0 byte x version %d + +# big endian +0 bequad 0xff6c70726f667281 LLVM raw profile data, +>&7 byte x version %d (big-endian) + + +# LLVM indexed instruction profile (as generated by llvm-profdata) +# magic is: reverse(\xFF lprofi \x81) +# cf. http://llvm.org/docs/CoverageMappingFormat.html +# http://llvm.org/docs/doxygen/html/namespacellvm_1_1IndexedInstrProf.html +# http://llvm.org/docs/CommandGuide/llvm-cov.html +# http://llvm.org/docs/CommandGuide/llvm-profdata.html +0 lequad 0x8169666f72706cff LLVM indexed profile data, +>&0 byte x version %d + +# big endian +0 bequad 0x8169666f72706cff LLVM indexed profile data, +>&7 byte x version %d (big-endian) + Modified: stable/10/contrib/file/magic/Magdir/database ============================================================================== --- stable/10/contrib/file/magic/Magdir/database Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/magic/Magdir/database Mon Jul 11 07:35:58 2016 (r302555) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: database,v 1.48 2016/04/14 20:34:28 christos Exp $ +# $File: database,v 1.49 2016/06/11 17:01:51 christos Exp $ # database: file(1) magic for various databases # # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) @@ -611,3 +611,14 @@ !:ext pan # database name >>>5 pstring x \b, "%s" + +# +# +# askSam Database by Stefan A. Haubenthal +0 string askw40\0 askSam DB + +# +# +# MUIbase Database Tool by Stefan A. Haubenthal +0 string MBSTV\040 MUIbase DB +>6 string x version %s Modified: stable/10/contrib/file/magic/Magdir/elf ============================================================================== --- stable/10/contrib/file/magic/Magdir/elf Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/magic/Magdir/elf Mon Jul 11 07:35:58 2016 (r302555) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: elf,v 1.69 2015/06/16 17:23:08 christos Exp $ +# $File: elf,v 1.70 2016/06/02 12:36:30 christos Exp $ # elf: file(1) magic for ELF executables # # We have to check the byte order flag to see what byte order all the @@ -301,25 +301,23 @@ >>0 use elf-le >5 byte 2 MSB >>0 use \^elf-le -# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed -# like proper ELF, but extracting the string had bad results. ->4 byte <0x80 ->>8 string >\0 (%s) ->8 string \0 ->>7 byte 0 (SYSV) ->>7 byte 1 (HP-UX) ->>7 byte 2 (NetBSD) ->>7 byte 3 (GNU/Linux) ->>7 byte 4 (GNU/Hurd) ->>7 byte 5 (86Open) ->>7 byte 6 (Solaris) ->>7 byte 7 (Monterey) ->>7 byte 8 (IRIX) ->>7 byte 9 (FreeBSD) ->>7 byte 10 (Tru64) ->>7 byte 11 (Novell Modesto) ->>7 byte 12 (OpenBSD) ->8 string \2 ->>7 byte 13 (OpenVMS) ->>7 byte 97 (ARM) ->>7 byte 255 (embedded) +>7 byte 0 (SYSV) +>7 byte 1 (HP-UX) +>7 byte 2 (NetBSD) +>7 byte 3 (GNU/Linux) +>7 byte 4 (GNU/Hurd) +>7 byte 5 (86Open) +>7 byte 6 (Solaris) +>7 byte 7 (Monterey) +>7 byte 8 (IRIX) +>7 byte 9 (FreeBSD) +>7 byte 10 (Tru64) +>7 byte 11 (Novell Modesto) +>7 byte 12 (OpenBSD) +>7 byte 13 (OpenVMS) +>7 byte 14 (HP NonStop Kernel) +>7 byte 15 (AROS Research Operating System) +>7 byte 16 (FenixOS) +>7 byte 17 (Nuxi CloudABI) +>7 byte 97 (ARM) +>7 byte 255 (embedded) Modified: stable/10/contrib/file/magic/Magdir/msdos ============================================================================== --- stable/10/contrib/file/magic/Magdir/msdos Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/magic/Magdir/msdos Mon Jul 11 07:35:58 2016 (r302555) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: msdos,v 1.105 2016/03/03 18:58:14 christos Exp $ +# $File: msdos,v 1.106 2016/06/11 00:52:14 christos Exp $ # msdos: file(1) magic for MS-DOS files # @@ -633,47 +633,86 @@ 0 string/b \102\101\050\000\000\000\056\000\000\000\000\000\000\000 Icon for MS Windows # Windows icons -0 name ico-dir -# not entirely accurate, the number of icons is part of the header ->0 byte 1 - 1 icon ->0 ubyte >1 - %d icons ->2 byte 0 \b, 256x ->2 byte !0 \b, %dx ->3 byte 0 \b256 ->3 byte !0 \b%d ->4 ubyte !0 \b, %d colors - +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/CUR_(file_format) +# Note: similiar to Windows CURsor. container for BMP (only DIB part) or PNG 0 belong 0x00000100 >9 byte 0 ->>0 byte x MS Windows icon resource -!:mime image/x-icon ->>4 use ico-dir +>>0 byte x +>>0 use cur-ico-dir >9 ubyte 0xff ->>0 byte x MS Windows icon resource -!:mime image/x-icon ->>4 use ico-dir +>>0 byte x +>>0 use cur-ico-dir +# displays number of icons and information for icon or cursor +0 name cur-ico-dir +# skip some Lotus 1-2-3 worksheets, CYCLE.PIC and keep Windows cursors with +# 1st data offset = dir header size + n * dir entry size = 6 + n * 10h = ?6h +>18 ulelong &0x00000006 +# skip remaining worksheets, because valid only for DIB image (40) or PNG image (\x89PNG) +>>(18.l) ulelong x MS Windows +>>>0 ubelong 0x00000100 icon resource +#!:mime image/vnd.microsoft.icon +!:mime image/x-icon +!:ext ico +>>>>4 uleshort x - %d icon +# plural s +>>>>4 uleshort >1 \bs +# 1st icon +>>>>0x06 use ico-entry +# 2nd icon +>>>>4 uleshort >1 +>>>>>0x16 use ico-entry +>>>0 ubelong 0x00000200 cursor resource +#!:mime image/x-cur +!:mime image/x-win-bitmap +!:ext cur +>>>>4 uleshort x - %d icon +>>>>4 uleshort >1 \bs +# 1st cursor +>>>>0x06 use cur-entry +#>>>>0x16 use cur-entry +# display information of one cursor entry +0 name cur-entry +>0 use cur-ico-entry +>4 uleshort x \b, hotspot @%dx +>6 uleshort x \b%d +# display information of one icon entry +0 name ico-entry +>0 use cur-ico-entry +# normally 0 1 but also found 14 +>4 uleshort >1 \b, %d planes +# normally 0 1 but also found some 3, 4, some 6, 8, 24, many 32, two 256 +>6 uleshort >1 \b, %d bits/pixel +# display shared information of cursor or icon entry +0 name cur-ico-entry +>0 byte =0 \b, 256x +>0 byte !0 \b, %dx +>1 byte =0 \b256 +>1 byte !0 \b%d +# number of colors in palette +>2 ubyte !0 \b, %d colors +# reserved 0 FFh +#>3 ubyte x \b, reserved %x +#>8 ulelong x \b, image size %d +# offset of PNG or DIB image +#>12 ulelong x \b, offset 0x%x +# PNG header (\x89PNG) +>(12.l) ubelong =0x89504e47 +>>&-4 indirect x \b with +# DIB image +>(12.l) ubelong !0x89504e47 +#>>&-4 use dib-image # Windows non-animated cursors -0 name cur-dir -# not entirely accurate, the number of icons is part of the header ->0 byte 1 - 1 icon ->0 ubyte >1 - %d icons ->2 byte 0 \b, 256x ->2 byte !0 \b, %dx ->3 byte 0 \b256 ->3 byte !0 \b%d ->6 uleshort x \b, hotspot @%dx ->8 uleshort x \b%d - +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/CUR_(file_format) +# Note: similiar to Windows ICOn. container for BMP ( only DIB part) +# GRR: line below is too general as it catches also Lotus 1-2-3 files 0 belong 0x00000200 >9 byte 0 ->>0 byte x MS Windows cursor resource -!:mime image/x-cur ->>4 use cur-dir +>>0 use cur-ico-dir >9 ubyte 0xff ->>0 byte x MS Windows cursor resource -!:mime image/x-cur ->>4 use cur-dir +>>0 use cur-ico-dir # .chr files 0 string/b PK\010\010BGI Borland font Modified: stable/10/contrib/file/magic/Magdir/msx ============================================================================== --- stable/10/contrib/file/magic/Magdir/msx Mon Jul 11 07:28:15 2016 (r302554) +++ stable/10/contrib/file/magic/Magdir/msx Mon Jul 11 07:35:58 2016 (r302555) @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------ # msx: file(1) magic for the MSX Home Computer -# v1.1 +# v1.3 # Fabio R. Schmidlin ############## MSX Music file formats ############## @@ -99,34 +99,6 @@ >>5 uleshort 0 >>>3 uleshort >0x013D MSX Graph Saurus compressed image -# Maki-chan Graphic format -0 string/b MAKI02\ \ Maki-chan image, ->8 byte x system ID: %c ->9 byte x \b%c ->10 byte x \b%c ->11 byte x \b%c, ->13 search/0x200 \x1A -# >>&3 ubyte 0 , video mode: PC-98 400 lines, 16 analog colors -# >>&3 ubyte 1 , video mode: MSX SC7, 16 analog colors -# >>&3 ubyte 2 , video mode: VM-98 400 lines, 8 analog colors -# >>&3 ubyte 3 , video mode: PC-88 analog, 200 lines, 8 analog colors -# >>&3 ubyte 4 , video mode: 400 lines, 16 digital colors -# >>&3 ubyte 5 , video mode: 200 lines, 16 digital colors -# >>&3 ubyte 6 , video mode: old PC-98 digital 400 lines, 8 colors -# >>&3 ubyte 7 , video mode: PC-88 400 lines, 8 digital colors ->>&8 uleshort+1 x %dx ->>&10 uleshort+1 x \b%d, ->>&3 ubyte&0x82 0x80 256 colors ->>&3 ubyte&0x82 0x00 16 colors ->>&3 ubyte&0x82 0x01 8 colors ->>&3 ubyte&0x04 4 digital ->>&3 ubyte&0x04 0 analog ->>&3 ubyte&0x01 1 \b, 2:1 dot aspect ratio - -# Japanese PIC file -0 string/b PIC\x1A ->4 lelong 0 Japanese PIC image file - # MSX G9B image file 0 string/b G9B >1 uleshort 11 @@ -146,70 +118,152 @@ ############## Other MSX file formats ############## -# MSX ROMs +# MSX internal ROMs +0 ubeshort 0xF3C3 +>2 uleshort <0x4000 +>>8 ubyte 0xC3 +>>>9 uleshort <0x4000 +>>>>0x0B ubeshort 0x00C3 +>>>>>0x0D uleshort <0x4000 +>>>>>>0x0F ubeshort 0x00C3 +>>>>>>>0x11 uleshort <0x4000 +>>>>>>>>0x13 ubeshort 0x00C3 +>>>>>>>>>0x15 uleshort <0x4000 +>>>>>>>>>>0x50 ubyte 0xC3 +>>>>>>>>>>>0x51 uleshort <0x4000 +>>>>>>>>>>>>(9.s) ubyte 0xC3 +>>>>>>>>>>>>>&0 uleshort >0x4000 +>>>>>>>>>>>>>>&0 ubyte 0xC3 MSX BIOS+BASIC +>>>>>>>>>>>>>>>0x002D ubyte+1 <3 \b. version=MSX%d +>>>>>>>>>>>>>>>0x002D ubyte 2 \b, version=MSX2+ +>>>>>>>>>>>>>>>0x002D ubyte 3 \b, version=MSX Turbo-R +>>>>>>>>>>>>>>>0x002D ubyte >3 \b, version=Unknown MSX %d version +>>>>>>>>>>>>>>>0x0006 ubyte x \b, VDP.DR=0x%2x +>>>>>>>>>>>>>>>0x0007 ubyte x \b, VDP.DW=0x%2x +>>>>>>>>>>>>>>>0x002B ubyte&0xF 0 \b, charset=Japanese +>>>>>>>>>>>>>>>0x002B ubyte&0xF 1 \b, charset=International +>>>>>>>>>>>>>>>0x002B ubyte&0xF 2 \b, charset=Korean +>>>>>>>>>>>>>>>0x002B ubyte&0xF >2 \b, charset=Unknown id:%d +>>>>>>>>>>>>>>>0x002B ubyte&0x70 0x00 \b, date format=Y-M-D +>>>>>>>>>>>>>>>0x002B ubyte&0x70 0x10 \b, date format=M-D-Y +>>>>>>>>>>>>>>>0x002B ubyte&0x70 0x20 \b, date format=D-M-Y +>>>>>>>>>>>>>>>0x002B ubyte&0x80 0x00 \b, vfreq=60Hz +>>>>>>>>>>>>>>>0x002B ubyte&0x80 0x80 \b, vfreq=50Hz +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 0 \b, keyboard=Japanese +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 1 \b, keyboard=International +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 2 \b, keyboard=French +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 3 \b, keyboard=UK +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 4 \b, keyboard=German +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 5 \b, keyboard=Unknown id:%d +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 6 \b, keyboard=Spanish +>>>>>>>>>>>>>>>0x002C ubyte&0x0F >6 \b, keyboard=Unknown id:%d +>>>>>>>>>>>>>>>0x002C ubyte&0xF0 0x00 \b, basic=Japanese +>>>>>>>>>>>>>>>0x002C ubyte&0xF0 0x10 \b, basic=International +>>>>>>>>>>>>>>>0x002C ubyte&0xF0 >0x10 \b, basic=Unknown id:%d +>>>>>>>>>>>>>>>0x002E ubyte&1 1 \b, built-in MIDI + + +0 string/b CD +>2 uleshort >0x10 +>>2 uleshort <0x4000 +>>>4 uleshort <0x4000 +>>>>6 uleshort <0x4000 +>>>>>8 ubyte 0xC3 +>>>>>>9 uleshort <0x4000 +>>>>>>>0x10 ubyte 0xC3 +>>>>>>>>0x11 uleshort <0x4000 +>>>>>>>>>0x14 ubyte 0xC3 +>>>>>>>>>>0x15 uleshort <0x4000 MSX2/2+/TR SubROM + +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 +>0x5F0 ubequad 0x8282828244380000 +>>0x150 ubyte 0x38 +>>>0x170 string \20\20\20 +>>>>0x1E32 string ()) +>>>>>0x2130 ubequad 0xA5A5594924231807 +>>>>>0x2138 ubequad 0x4A4A3424488830C0 MSX Kanji Font + + + +# MSX extension ROMs 0 string/b AB >2 uleshort 0x0010 MSX ROM >>2 uleshort x \b, init=0x%4x ->>4 uleshort >0 \b, stat=0x%4x ->>6 uleshort >0 \b, dev=0x%4x +>>4 uleshort >0 \b, stahdl=0x%4x +>>6 uleshort >0 \b, devhdl=0x%4x >>8 uleshort >0 \b, bas=0x%4x >2 uleshort 0x4010 MSX ROM >>2 uleshort x \b, init=0x%04x ->>4 uleshort >0 \b, stat=0x%04x ->>6 uleshort >0 \b, dev=0x%04x +>>4 uleshort >0 \b, stahdl=0x%04x +>>6 uleshort >0 \b, devhdl=0x%04x >>8 uleshort >0 \b, bas=0x%04x >2 uleshort 0x8010 MSX ROM >>2 uleshort x \b, init=0x%04x ->>4 uleshort >0 \b, stat=0x%04x ->>6 uleshort >0 \b, dev=0x%04x +>>4 uleshort >0 \b, stahdl=0x%04x +>>6 uleshort >0 \b, devhdl=0x%04x >>8 uleshort >0 \b, bas=0x%04x +0 string/b AB\0\0 +>6 uleshort 0 +>>4 uleshort >0x400F MSX-BASIC extension ROM +>>>4 uleshort >0 \b, stahdl=0x%04x +>>>6 uleshort >0 \b, devhdl=0x%04x +>>>0x1C string OPLL \b, MSX-Music +>>>>0x18 string PAC2 \b (external) +>>>>0x18 string APRL \b (internal) + +0 string/b AB\0\0\0\0 +>6 uleshort >0x400F MSX device BIOS +>>6 uleshort >0 \b, devhdl=0x%04x + 0 string/b AB #>2 string 5JSuperLAYDOCK MSX Super Laydock ROM #>3 string @HYDLIDE3MSX MSX Hydlide-3 ROM #>3 string @3\x80IA862 Golvellius MSX1 ROM ->2 uleshort >10 ->>10 string \0\0\0\0\0\0 MSX ROM ->>>0x10 string YZ\0\0\0\0 Konami Game Master 2 MSX ROM ->>>0x10 string CD \b, Konami RC- ->>>>0x12 ubyte x \b%d ->>>>0x13 ubyte/16 x \b%d ->>>>0x13 ubyte&0xF x \b%d ->>>0x10 string EF \b, Konami RC- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Jul 11 12:59:24 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ACE7B832E8; Mon, 11 Jul 2016 12:59:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26EE919D3; Mon, 11 Jul 2016 12:59:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6BCxN7K091598; Mon, 11 Jul 2016 12:59:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6BCxNNE091597; Mon, 11 Jul 2016 12:59:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201607111259.u6BCxNNE091597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 11 Jul 2016 12:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302562 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 12:59:24 -0000 Author: hselasky Date: Mon Jul 11 12:59:23 2016 New Revision: 302562 URL: https://svnweb.freebsd.org/changeset/base/302562 Log: MFC r302306: Fix detection of USB device disconnects in USB host mode when the USB device is connected directly to the USB port of the DWC OTG, in this case a RPI-zero. PR: 210695 Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Mon Jul 11 12:44:58 2016 (r302561) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Mon Jul 11 12:59:23 2016 (r302562) @@ -2981,7 +2981,8 @@ dwc_otg_interrupt(void *arg) else sc->sc_flags.status_bus_reset = 0; - if (hprt & HPRT_PRTENCHNG) + if ((hprt & HPRT_PRTENCHNG) && + (hprt & HPRT_PRTENA) == 0) sc->sc_flags.change_enabled = 1; if (hprt & HPRT_PRTENA) @@ -4741,6 +4742,8 @@ tr_handle_get_port_status: value = 0; + if (sc->sc_flags.change_enabled) + value |= UPS_C_PORT_ENABLED; if (sc->sc_flags.change_connect) value |= UPS_C_CONNECT_STATUS; if (sc->sc_flags.change_suspend) From owner-svn-src-stable@freebsd.org Mon Jul 11 13:01:44 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39684B833F9; Mon, 11 Jul 2016 13:01:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBC111D1C; Mon, 11 Jul 2016 13:01:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6BD1hmo093759; Mon, 11 Jul 2016 13:01:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6BD1hCZ093758; Mon, 11 Jul 2016 13:01:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201607111301.u6BD1hCZ093758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 11 Jul 2016 13:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302563 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 13:01:44 -0000 Author: hselasky Date: Mon Jul 11 13:01:42 2016 New Revision: 302563 URL: https://svnweb.freebsd.org/changeset/base/302563 Log: MFC r302336: Fix interrupt loop when switching from USB device to USB host mode by clearing all endpoint interrupt bits. PR: 210736 Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Mon Jul 11 12:59:23 2016 (r302562) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Mon Jul 11 13:01:42 2016 (r302563) @@ -93,17 +93,6 @@ #define DWC_OTG_PC2UDEV(pc) \ (USB_DMATAG_TO_XROOT((pc)->tag_parent)->udev) -#define DWC_OTG_MSK_GINT_ENABLED \ - (GINTMSK_ENUMDONEMSK | \ - GINTMSK_USBRSTMSK | \ - GINTMSK_USBSUSPMSK | \ - GINTMSK_IEPINTMSK | \ - GINTMSK_SESSREQINTMSK | \ - GINTMSK_RXFLVLMSK | \ - GINTMSK_HCHINTMSK | \ - GINTMSK_OTGINTMSK | \ - GINTMSK_PRTINTMSK) - #define DWC_OTG_MSK_GINT_THREAD_IRQ \ (GINTSTS_USBRST | GINTSTS_ENUMDONE | GINTSTS_PRTINT | \ GINTSTS_WKUPINT | GINTSTS_USBSUSP | GINTMSK_OTGINTMSK | \ @@ -377,6 +366,11 @@ dwc_otg_init_fifo(struct dwc_otg_softc * /* enable all host channel interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, (1U << sc->sc_host_ch_max) - 1U); + + /* enable proper host channel interrupts */ + sc->sc_irq_mask |= GINTMSK_HCHINTMSK; + sc->sc_irq_mask &= ~GINTMSK_IEPINTMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); } if (mode == DWC_MODE_DEVICE) { @@ -437,6 +431,11 @@ dwc_otg_init_fifo(struct dwc_otg_softc * pf->usb.max_in_frame_size, pf->usb.max_out_frame_size); } + + /* enable proper device channel interrupts */ + sc->sc_irq_mask &= ~GINTMSK_HCHINTMSK; + sc->sc_irq_mask |= GINTMSK_IEPINTMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); } /* reset RX FIFO */ @@ -2866,10 +2865,13 @@ dwc_otg_filter_interrupt(void *arg) for (x = 0; x != sc->sc_dev_in_ep_max; x++) { temp = DWC_OTG_READ_4(sc, DOTG_DIEPINT(x)); - if (temp & DIEPMSK_XFERCOMPLMSK) { - DWC_OTG_WRITE_4(sc, DOTG_DIEPINT(x), - DIEPMSK_XFERCOMPLMSK); - } + /* + * NOTE: Need to clear all interrupt bits, + * because some appears to be unmaskable and + * can cause an interrupt loop: + */ + if (temp != 0) + DWC_OTG_WRITE_4(sc, DOTG_DIEPINT(x), temp); } } @@ -3976,7 +3978,7 @@ dwc_otg_init(struct dwc_otg_softc *sc) } /* enable interrupts */ - sc->sc_irq_mask = DWC_OTG_MSK_GINT_ENABLED; + sc->sc_irq_mask |= DWC_OTG_MSK_GINT_THREAD_IRQ; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); if (sc->sc_mode == DWC_MODE_OTG || sc->sc_mode == DWC_MODE_DEVICE) { From owner-svn-src-stable@freebsd.org Mon Jul 11 14:24:51 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 746ACB8F0BB; Mon, 11 Jul 2016 14:24:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 373991D45; Mon, 11 Jul 2016 14:24:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6BEOo9a025870; Mon, 11 Jul 2016 14:24:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6BEOojA025869; Mon, 11 Jul 2016 14:24:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607111424.u6BEOojA025869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 11 Jul 2016 14:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302568 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 14:24:51 -0000 Author: gjb Date: Mon Jul 11 14:24:50 2016 New Revision: 302568 URL: https://svnweb.freebsd.org/changeset/base/302568 Log: Fix the branch name in the release notes. Approved by: re (implicit, relnotes) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/release.ent Modified: stable/11/release/doc/share/xml/release.ent ============================================================================== --- stable/11/release/doc/share/xml/release.ent Mon Jul 11 14:19:09 2016 (r302567) +++ stable/11/release/doc/share/xml/release.ent Mon Jul 11 14:24:50 2016 (r302568) @@ -22,7 +22,7 @@ - + From owner-svn-src-stable@freebsd.org Mon Jul 11 17:30:21 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D46BB92098; Mon, 11 Jul 2016 17:30:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F83B189D; Mon, 11 Jul 2016 17:30:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6BHUKVS093446; Mon, 11 Jul 2016 17:30:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6BHUKb0093445; Mon, 11 Jul 2016 17:30:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607111730.u6BHUKb0093445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 11 Jul 2016 17:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302582 - stable/10/usr.bin/lastcomm/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 17:30:21 -0000 Author: ngie Date: Mon Jul 11 17:30:20 2016 New Revision: 302582 URL: https://svnweb.freebsd.org/changeset/base/302582 Log: MFC r302326: Output the diffs to standard error when comparing the expected vs the obtained output from lastcomm instead of just printing out a summary, e.g. "they differed". This will make failures with results more apparent when running kyua debug, kyua report-html, etc. Modified: stable/10/usr.bin/lastcomm/tests/legacy_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/lastcomm/tests/legacy_test.sh ============================================================================== --- stable/10/usr.bin/lastcomm/tests/legacy_test.sh Mon Jul 11 17:11:18 2016 (r302581) +++ stable/10/usr.bin/lastcomm/tests/legacy_test.sh Mon Jul 11 17:30:20 2016 (r302582) @@ -14,7 +14,7 @@ check() shift # Remove tty field, which varies between systems. awk '{$4 = ""; print}' | - if diff -q - $1 + if diff -a - $1 >&2 then echo "ok $NUM" else From owner-svn-src-stable@freebsd.org Mon Jul 11 17:31:31 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 422D9B921C2; Mon, 11 Jul 2016 17:31:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F3F81C3C; Mon, 11 Jul 2016 17:31:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6BHVUkl094884; Mon, 11 Jul 2016 17:31:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6BHVUQt094882; Mon, 11 Jul 2016 17:31:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607111731.u6BHVUQt094882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 11 Jul 2016 17:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302583 - stable/10/usr.bin/lastcomm/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 17:31:31 -0000 Author: ngie Date: Mon Jul 11 17:31:30 2016 New Revision: 302583 URL: https://svnweb.freebsd.org/changeset/base/302583 Log: MFC r302327: Fix .../usr.bin/lastcomm/legacy_test:main on i386 The time in the output files was ahead by 3 hours on i386. Fix the incorrect offset. PR: 210329 Modified: stable/10/usr.bin/lastcomm/tests/v1-i386.out stable/10/usr.bin/lastcomm/tests/v2-i386.out Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/lastcomm/tests/v1-i386.out ============================================================================== --- stable/10/usr.bin/lastcomm/tests/v1-i386.out Mon Jul 11 17:30:20 2016 (r302582) +++ stable/10/usr.bin/lastcomm/tests/v1-i386.out Mon Jul 11 17:31:30 2016 (r302583) @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 11:34 -core -DX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 11:34 -cc - root 0.000 secs 0.000 us 0.000 sy 0.469 es Fri May 18 11:34 -ld - root 0.000 secs 0.000 us 0.000 sy 0.109 es Fri May 18 11:34 -as - root 0.000 secs 0.000 us 0.000 sy 0.047 es Fri May 18 11:34 -cc1 - root 0.016 secs 0.016 us 0.000 sy 0.203 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -123456789012345 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.359 es Fri May 18 11:34 -diff - root 0.312 secs 0.297 us 0.016 sy 0.359 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 11:34 -dd - root 0.016 secs 0.000 us 0.016 sy 0.031 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 11:34 -sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 3.406 es Fri May 18 11:34 -find - root 0.266 secs 0.062 us 0.203 sy 3.406 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 5.047 es Fri May 18 11:33 -egrep - root 4.984 secs 4.984 us 0.000 sy 5.047 es Fri May 18 11:33 -time - root 0.000 secs 0.000 us 0.000 sy 0.484 es Fri May 18 11:33 -awk - root 0.453 secs 0.453 us 0.000 sy 0.453 es Fri May 18 11:33 -accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:33 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 +core -DX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 +cc - root 0.000 secs 0.000 us 0.000 sy 0.469 es Fri May 18 08:34 +ld - root 0.000 secs 0.000 us 0.000 sy 0.109 es Fri May 18 08:34 +as - root 0.000 secs 0.000 us 0.000 sy 0.047 es Fri May 18 08:34 +cc1 - root 0.016 secs 0.016 us 0.000 sy 0.203 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +123456789012345 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.359 es Fri May 18 08:34 +diff - root 0.312 secs 0.297 us 0.016 sy 0.359 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 +dd - root 0.016 secs 0.000 us 0.016 sy 0.031 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34 +sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 3.406 es Fri May 18 08:34 +find - root 0.266 secs 0.062 us 0.203 sy 3.406 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 5.047 es Fri May 18 08:33 +egrep - root 4.984 secs 4.984 us 0.000 sy 5.047 es Fri May 18 08:33 +time - root 0.000 secs 0.000 us 0.000 sy 0.484 es Fri May 18 08:33 +awk - root 0.453 secs 0.453 us 0.000 sy 0.453 es Fri May 18 08:33 +accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:33 Modified: stable/10/usr.bin/lastcomm/tests/v2-i386.out ============================================================================== --- stable/10/usr.bin/lastcomm/tests/v2-i386.out Mon Jul 11 17:30:20 2016 (r302582) +++ stable/10/usr.bin/lastcomm/tests/v2-i386.out Mon Jul 11 17:31:30 2016 (r302583) @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.005 es Fri May 18 15:13 -core -DX root 0.002 secs 0.000 us 0.002 sy 0.005 es Fri May 18 15:13 -cc - root 0.002 secs 0.000 us 0.002 sy 0.048 es Fri May 18 15:13 -ld - root 0.028 secs 0.019 us 0.009 sy 0.028 es Fri May 18 15:13 -as - root 0.002 secs 0.002 us 0.000 sy 0.002 es Fri May 18 15:13 -cc1 - root 0.016 secs 0.016 us 0.000 sy 0.016 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 15:13 -1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -time - root 0.001 secs 0.001 us 0.000 sy 0.002 es Fri May 18 15:13 -1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 15:13 -123456789012345 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.425 es Fri May 18 15:13 -diff - root 0.423 secs 0.392 us 0.031 sy 0.424 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.028 es Fri May 18 15:13 -dd - root 0.025 secs 0.000 us 0.025 sy 0.026 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 3.002 es Fri May 18 15:13 -sleep - root 0.001 secs 0.000 us 0.001 sy 3.001 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.250 es Fri May 18 15:13 -find - root 0.248 secs 0.078 us 0.171 sy 0.249 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 6.724 es Fri May 18 15:12 -egrep - root 6.680 secs 6.680 us 0.000 sy 6.722 es Fri May 18 15:12 -time - root 0.001 secs 0.000 us 0.001 sy 0.450 es Fri May 18 15:12 -awk - root 0.448 secs 0.448 us 0.000 sy 0.449 es Fri May 18 15:12 -accton - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:12 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.005 es Fri May 18 12:13 +core -DX root 0.002 secs 0.000 us 0.002 sy 0.005 es Fri May 18 12:13 +cc - root 0.002 secs 0.000 us 0.002 sy 0.048 es Fri May 18 12:13 +ld - root 0.028 secs 0.019 us 0.009 sy 0.028 es Fri May 18 12:13 +as - root 0.002 secs 0.002 us 0.000 sy 0.002 es Fri May 18 12:13 +cc1 - root 0.016 secs 0.016 us 0.000 sy 0.016 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13 +1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +time - root 0.001 secs 0.001 us 0.000 sy 0.002 es Fri May 18 12:13 +1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13 +123456789012345 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.425 es Fri May 18 12:13 +diff - root 0.423 secs 0.392 us 0.031 sy 0.424 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.028 es Fri May 18 12:13 +dd - root 0.025 secs 0.000 us 0.025 sy 0.026 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 3.002 es Fri May 18 12:13 +sleep - root 0.001 secs 0.000 us 0.001 sy 3.001 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.250 es Fri May 18 12:13 +find - root 0.248 secs 0.078 us 0.171 sy 0.249 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 6.724 es Fri May 18 12:12 +egrep - root 6.680 secs 6.680 us 0.000 sy 6.722 es Fri May 18 12:12 +time - root 0.001 secs 0.000 us 0.001 sy 0.450 es Fri May 18 12:12 +awk - root 0.448 secs 0.448 us 0.000 sy 0.449 es Fri May 18 12:12 +accton - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:12 From owner-svn-src-stable@freebsd.org Mon Jul 11 23:15:55 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3525B9293B; Mon, 11 Jul 2016 23:15:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFC61C09; Mon, 11 Jul 2016 23:15:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6BNFspK025132; Mon, 11 Jul 2016 23:15:54 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6BNFs6H025129; Mon, 11 Jul 2016 23:15:54 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607112315.u6BNFs6H025129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Jul 2016 23:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302600 - in stable/10: etc/defaults usr.sbin/periodic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 23:15:55 -0000 Author: asomers Date: Mon Jul 11 23:15:54 2016 New Revision: 302600 URL: https://svnweb.freebsd.org/changeset/base/302600 Log: MFC r300356 Better document security_show_{success,info,badconfig} in /etc/periodic.conf periodic(8) already handles the security_show_{success,info,badconfig} variables correctly. However, those variables aren't explicitly set in /etc/defaults/periodic.conf or anywhere else, which suggests to the user that they shouldn't be used. etc/defaults/periodic.conf Explicitly set defaults for security_show_{success,info,badconfig} usr.sbin/periodic/periodic.sh Update usage string usr.sbin/periodic/periodic.8 Minor man page updates One thing I'm _not_ doing is recommending setting security_output to /var/log/security.log or adding that file to /etc/newsyslog.conf, because periodic(8) would create it with default permissions, usually 644, and that's probably a bad idea. Modified: stable/10/etc/defaults/periodic.conf stable/10/usr.sbin/periodic/periodic.8 stable/10/usr.sbin/periodic/periodic.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/periodic.conf ============================================================================== --- stable/10/etc/defaults/periodic.conf Mon Jul 11 23:06:11 2016 (r302599) +++ stable/10/etc/defaults/periodic.conf Mon Jul 11 23:15:54 2016 (r302600) @@ -225,6 +225,10 @@ monthly_local="/etc/monthly.local" # L # Security options +security_show_success="YES" # scripts returning 0 +security_show_info="YES" # scripts returning 1 +security_show_badconfig="NO" # scripts returning 2 + # These options are used by the security periodic(8) scripts spawned in # daily and weekly 450.status-security. security_status_logdir="/var/log" # Directory for logs Modified: stable/10/usr.sbin/periodic/periodic.8 ============================================================================== --- stable/10/usr.sbin/periodic/periodic.8 Mon Jul 11 23:06:11 2016 (r302599) +++ stable/10/usr.sbin/periodic/periodic.8 Mon Jul 11 23:15:54 2016 (r302600) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2007 +.Dd May 20, 2016 .Dt PERIODIC 8 .Os .Sh NAME @@ -166,8 +166,9 @@ table the top level directory containing .Pa daily , .Pa weekly , +.Pa monthly , and -.Pa monthly +.Pa security subdirectories which contain standard system periodic executables .It Pa /etc/defaults/periodic.conf the @@ -175,9 +176,9 @@ the system registry contains variables that control the behaviour of .Nm and the standard -.Pa daily , weekly , +.Pa daily , weekly , monthly , and -.Pa monthly +.Pa security scripts .It Pa /etc/periodic.conf this file contains local overrides for the default Modified: stable/10/usr.sbin/periodic/periodic.sh ============================================================================== --- stable/10/usr.sbin/periodic/periodic.sh Mon Jul 11 23:06:11 2016 (r302599) +++ stable/10/usr.sbin/periodic/periodic.sh Mon Jul 11 23:15:54 2016 (r302600) @@ -4,13 +4,13 @@ # # Run nightly periodic scripts # -# usage: periodic { daily | weekly | monthly } - run standard periodic scripts +# usage: periodic { daily | weekly | monthly | security } - run standard scripts # periodic /absolute/path/to/directory - run periodic scripts in dir # usage () { echo "usage: $0 " 1>&2 - echo "or $0 { daily | weekly | monthly }" 1>&2 + echo "or $0 { daily | weekly | monthly | security }" 1>&2 exit 1 } From owner-svn-src-stable@freebsd.org Tue Jul 12 08:07:28 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF62AB93656; Tue, 12 Jul 2016 08:07:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [96.47.72.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C0941685; Tue, 12 Jul 2016 08:06:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6C66BSj076433; Tue, 12 Jul 2016 06:06:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6C66B5g076432; Tue, 12 Jul 2016 06:06:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607120606.u6C66B5g076432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 12 Jul 2016 06:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302625 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 08:07:29 -0000 Author: ngie Date: Tue Jul 12 06:06:10 2016 New Revision: 302625 URL: https://svnweb.freebsd.org/changeset/base/302625 Log: MFC r302532: Correct OLD_LIBS change done in r298840 libkvm.so lives in /lib, not /usr/lib Approved by: re (gjb) Modified: stable/11/ObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Tue Jul 12 06:00:57 2016 (r302624) +++ stable/11/ObsoleteFiles.inc Tue Jul 12 06:06:10 2016 (r302625) @@ -203,7 +203,7 @@ OLD_FILES+=usr/share/man/man9/rman_await # 20160517: ReiserFS removed OLD_FILES+=usr/share/man/man5/reiserfs.5.gz # 20160430: kvm_getfiles(3) removed from kvm(3) -OLD_LIBS+=usr/lib/libkvm.so.6 +OLD_LIBS+=lib/libkvm.so.6 OLD_FILES+=usr/share/man/man3/kvm_getfiles.3.gz # 20160423: remove mroute6d OLD_FILES+=etc/rc.d/mroute6d From owner-svn-src-stable@freebsd.org Tue Jul 12 08:07:28 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFE9BB93657; Tue, 12 Jul 2016 08:07:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [96.47.72.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 107F5168F; Tue, 12 Jul 2016 08:06:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6C6PSOL083401; Tue, 12 Jul 2016 06:25:28 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6C6PSrx083399; Tue, 12 Jul 2016 06:25:28 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607120625.u6C6PSrx083399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 12 Jul 2016 06:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302627 - in stable/11/sys: amd64/cloudabi64 arm64/cloudabi64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 08:07:29 -0000 Author: ed Date: Tue Jul 12 06:25:28 2016 New Revision: 302627 URL: https://svnweb.freebsd.org/changeset/base/302627 Log: MFC r302448: Don't forget to set sa->narg for CloudABI system calls. It turns out that this value is not used within the system call code under normal conditions, except when using tracing tools like ktrace. If we forget to set this value, it is set to random garbage. This may cause ktrace to hang indefinitely, making it impossible to kill. Approved by: re@ Reported by: Michael Plass PR: 210800 Modified: stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:12:58 2016 (r302626) +++ stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:25:28 2016 (r302627) @@ -96,6 +96,7 @@ cloudabi64_fetch_syscall_args(struct thr if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) return (ENOSYS); sa->callp = &cloudabi64_sysent[sa->code]; + sa->narg = sa->callp->sy_narg; /* Fetch system call arguments. */ sa->args[0] = frame->tf_rdi; Modified: stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:12:58 2016 (r302626) +++ stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:25:28 2016 (r302627) @@ -77,6 +77,7 @@ cloudabi64_fetch_syscall_args(struct thr if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) return (ENOSYS); sa->callp = &cloudabi64_sysent[sa->code]; + sa->narg = sa->callp->sy_narg; /* Fetch system call arguments. */ for (i = 0; i < MAXARGS; i++) From owner-svn-src-stable@freebsd.org Tue Jul 12 13:12:03 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23BF4B93159; Tue, 12 Jul 2016 13:12:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8A91165C; Tue, 12 Jul 2016 13:12:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6CDC2UK033005; Tue, 12 Jul 2016 13:12:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CDC2Zr033004; Tue, 12 Jul 2016 13:12:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607121312.u6CDC2Zr033004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 12 Jul 2016 13:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302663 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 13:12:03 -0000 Author: trasz Date: Tue Jul 12 13:12:01 2016 New Revision: 302663 URL: https://svnweb.freebsd.org/changeset/base/302663 Log: MFC r302503: Fix ctld(8) to not exit when reloading configuration with invalid initiator-portal clause. Approved by: re (gjb) Modified: stable/11/usr.sbin/ctld/ctld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/ctld.c ============================================================================== --- stable/11/usr.sbin/ctld/ctld.c Tue Jul 12 12:05:58 2016 (r302662) +++ stable/11/usr.sbin/ctld/ctld.c Tue Jul 12 13:12:01 2016 (r302663) @@ -402,7 +402,7 @@ auth_portal_new(struct auth_group *ag, c error: free(ap); - log_errx(1, "Incorrect initiator portal '%s'", portal); + log_warnx("incorrect initiator portal \"%s\"", portal); return (NULL); } From owner-svn-src-stable@freebsd.org Tue Jul 12 17:22:14 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78311B8447A; Tue, 12 Jul 2016 17:22:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 443341551; Tue, 12 Jul 2016 17:22:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6CHMDil026801; Tue, 12 Jul 2016 17:22:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CHMDxH026800; Tue, 12 Jul 2016 17:22:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607121722.u6CHMDxH026800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 12 Jul 2016 17:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302665 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 17:22:14 -0000 Author: bdrewery Date: Tue Jul 12 17:22:13 2016 New Revision: 302665 URL: https://svnweb.freebsd.org/changeset/base/302665 Log: MFC r302439: iflib: Fix typo in 'iflib_rx_miss_bufs' sysctl name Approved by: re (gjb) Modified: stable/11/sys/net/iflib.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/iflib.c ============================================================================== --- stable/11/sys/net/iflib.c Tue Jul 12 15:46:53 2016 (r302664) +++ stable/11/sys/net/iflib.c Tue Jul 12 17:22:13 2016 (r302665) @@ -626,12 +626,12 @@ MODULE_DEPEND(iflib, netmap, 1, 1, 1); /* * device-specific sysctl variables: * - * ixl_crcstrip: 0: keep CRC in rx frames (default), 1: strip it. + * iflib_crcstrip: 0: keep CRC in rx frames (default), 1: strip it. * During regular operations the CRC is stripped, but on some * hardware reception of frames not multiple of 64 is slower, * so using crcstrip=0 helps in benchmarks. * - * ixl_rx_miss, ixl_rx_miss_bufs: + * iflib_rx_miss, iflib_rx_miss_bufs: * count packets that might be missed due to lost interrupts. */ SYSCTL_DECL(_dev_netmap); @@ -646,7 +646,7 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, iflib_ int iflib_rx_miss, iflib_rx_miss_bufs; SYSCTL_INT(_dev_netmap, OID_AUTO, iflib_rx_miss, CTLFLAG_RW, &iflib_rx_miss, 0, "potentially missed rx intr"); -SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_rx_miss_bufs, +SYSCTL_INT(_dev_netmap, OID_AUTO, iflib_rx_miss_bufs, CTLFLAG_RW, &iflib_rx_miss_bufs, 0, "potentially missed rx intr bufs"); /* From owner-svn-src-stable@freebsd.org Tue Jul 12 21:41:28 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76898B92F3E; Tue, 12 Jul 2016 21:41:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3373711DF; Tue, 12 Jul 2016 21:41:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6CLfRgm021589; Tue, 12 Jul 2016 21:41:27 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CLfRqL021588; Tue, 12 Jul 2016 21:41:27 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607122141.u6CLfRqL021588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 12 Jul 2016 21:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302675 - stable/10/usr.sbin/extattr/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 21:41:28 -0000 Author: asomers Date: Tue Jul 12 21:41:27 2016 New Revision: 302675 URL: https://svnweb.freebsd.org/changeset/base/302675 Log: MFC r301874 Fix usr.sbin/extattr testcases on tmpfs Skip the usr.sbin/extattr testscases if $TMPDIR is tmpfs, which doesn't support extended attributes Modified: stable/10/usr.sbin/extattr/tests/extattr_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/extattr/tests/extattr_test.sh ============================================================================== --- stable/10/usr.sbin/extattr/tests/extattr_test.sh Tue Jul 12 19:47:01 2016 (r302674) +++ stable/10/usr.sbin/extattr/tests/extattr_test.sh Tue Jul 12 21:41:27 2016 (r302675) @@ -30,6 +30,7 @@ bad_namespace_head() { atf_set "descr" "Can't set attributes for nonexistent namespaces" } bad_namespace_body() { + check_fs touch foo atf_check -s not-exit:0 -e match:"Invalid argument" \ setextattr badnamespace myattr X foo @@ -42,6 +43,7 @@ hex_head() { atf_set "descr" "Set and get attribute values in hexadecimal" } hex_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr XYZ foo atf_check -s exit:0 -o inline:"58 59 5a\n" \ @@ -53,6 +55,7 @@ hex_nonascii_head() { atf_set "descr" "Get binary attribute values in hexadecimal" } hex_nonascii_body() { + check_fs touch foo BINSTUFF=`echo $'\x20\x30\x40\x55\x66\x70\x81\xa2\xb3\xee\xff'` atf_check -s exit:0 -o empty setextattr user myattr "$BINSTUFF" foo @@ -66,6 +69,7 @@ long_name_head() { atf_set "descr" "A maximum length attribute name" } long_name_body() { + check_fs # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208965 atf_expect_fail "BUG 208965 extattr(2) doesn't allow maxlen attr names" @@ -84,6 +88,7 @@ loud_head() { atf_set "descr" "Loud (non -q) output for each command" } loud_body() { + check_fs touch foo # setextattr(8) and friends print hard tabs. Use printf to convert # them to spaces before checking the output. @@ -101,6 +106,7 @@ noattrs_head() { atf_set "descr" "A file with no extended attributes" } noattrs_body() { + check_fs touch foo atf_check -s exit:0 -o empty lsextattr -q user foo } @@ -110,6 +116,7 @@ nonexistent_file_head() { atf_set "descr" "A file that does not exist" } nonexistent_file_body() { + check_fs atf_check -s exit:1 -e match:"No such file or directory" \ lsextattr user foo atf_check -s exit:1 -e match:"No such file or directory" \ @@ -125,6 +132,7 @@ null_head() { atf_set "descr" "NUL-terminate an attribute value" } null_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr -n user myattr myvalue foo atf_check -s exit:0 -o inline:"myvalue\0\n" getextattr -q user myattr foo @@ -135,6 +143,7 @@ one_user_attr_head() { atf_set "descr" "A file with one extended attribute" } one_user_attr_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr myvalue foo atf_check -s exit:0 -o inline:"myattr\n" lsextattr -q user foo @@ -149,6 +158,7 @@ one_system_attr_head() { atf_set "require.user" "root" } one_system_attr_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr system myattr myvalue foo atf_check -s exit:0 -o inline:"myattr\n" lsextattr -q system foo @@ -162,6 +172,7 @@ stdin_head() { atf_set "descr" "Set attribute value from stdin" } stdin_body() { + check_fs dd if=/dev/random of=infile bs=1k count=8 touch foo setextattr -i user myattr foo < infile || atf_fail "setextattr failed" @@ -175,6 +186,7 @@ stringify_head() { atf_set "descr" "Stringify the output of getextattr" } stringify_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr "my value" foo atf_check -s exit:0 -o inline:"\"my\\\040value\"\n" \ @@ -186,6 +198,7 @@ symlink_head() { atf_set "descr" "A symlink to an ordinary file" } symlink_body() { + check_fs touch foo ln -s foo foolink atf_check -s exit:0 -o empty setextattr user myattr myvalue foolink @@ -199,6 +212,7 @@ symlink_nofollow_head() { atf_set "descr" "Operating directly on a symlink" } symlink_nofollow_body() { + check_fs touch foo ln -s foo foolink # Check that with -h we can operate directly on the link @@ -221,6 +235,7 @@ system_and_user_attrs_head() { atf_set "require.user" "root" } system_and_user_attrs_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user userattr userval foo atf_check -s exit:0 -o empty setextattr system sysattr sysval foo @@ -240,6 +255,7 @@ two_files_head() { atf_set "descr" "Manipulate two files" } two_files_body() { + check_fs touch foo bar atf_check -s exit:0 -o empty setextattr user myattr myvalue foo bar atf_check -s exit:0 -o inline:"foo\tmyattr\nbar\tmyattr\n" \ @@ -256,6 +272,7 @@ two_files_force_head() { atf_set "descr" "Manipulate two files. The first does not exist" } two_files_force_body() { + check_fs touch bar atf_check -s exit:1 -e match:"No such file or directory" \ setextattr user myattr myvalue foo bar @@ -281,6 +298,7 @@ two_user_attrs_head() { atf_set "descr" "A file with two extended attributes" } two_user_attrs_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr1 myvalue1 foo atf_check -s exit:0 -o empty setextattr user myattr2 myvalue2 foo @@ -305,6 +323,7 @@ unprivileged_user_cannot_set_system_attr atf_set "require.user" "unprivileged" } unprivileged_user_cannot_set_system_attr_body() { + check_fs touch foo atf_check -s exit:1 -e match:"Operation not permitted" \ setextattr system myattr myvalue foo @@ -333,3 +352,11 @@ atf_init_test_cases() { atf_add_test_case two_user_attrs atf_add_test_case unprivileged_user_cannot_set_system_attr } + +check_fs() { + case `df -T . | tail -n 1 | cut -wf 2` in + "ufs") ;; # UFS is fine + "zfs") ;; # ZFS is fine + "tmpfs") atf_skip "tmpfs does not support extended attributes";; + esac +} From owner-svn-src-stable@freebsd.org Tue Jul 12 21:49:09 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB675B93106; Tue, 12 Jul 2016 21:49:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B5A216E0; Tue, 12 Jul 2016 21:49:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6CLn8fQ025112; Tue, 12 Jul 2016 21:49:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CLn8iD025111; Tue, 12 Jul 2016 21:49:08 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607122149.u6CLn8iD025111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 12 Jul 2016 21:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302676 - stable/10/usr.sbin/rpcbind/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 21:49:09 -0000 Author: asomers Date: Tue Jul 12 21:49:08 2016 New Revision: 302676 URL: https://svnweb.freebsd.org/changeset/base/302676 Log: MFC r301967 Fix usr.sbin/rpcbind ATF tests on 32-bit platforms usr.sbin/rpcbind/tests/addrmerge_test.c Fix some sizeof calculations that work only by luck on 64-bit platforms. Modified: stable/10/usr.sbin/rpcbind/tests/addrmerge_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpcbind/tests/addrmerge_test.c ============================================================================== --- stable/10/usr.sbin/rpcbind/tests/addrmerge_test.c Tue Jul 12 21:41:27 2016 (r302675) +++ stable/10/usr.sbin/rpcbind/tests/addrmerge_test.c Tue Jul 12 21:49:08 2016 (r302676) @@ -92,15 +92,15 @@ mock_ifaddr4(const char* name, const cha in->sin_family = AF_INET; in->sin_port = 0; - in->sin_len = sizeof(in); + in->sin_len = sizeof(*in); in->sin_addr.s_addr = inet_addr(addr); mask_in->sin_family = AF_INET; mask_in->sin_port = 0; - mask_in->sin_len = sizeof(mask_in); + mask_in->sin_len = sizeof(*mask_in); mask_in->sin_addr.s_addr = inet_addr(mask); bcast_in->sin_family = AF_INET; bcast_in->sin_port = 0; - bcast_in->sin_len = sizeof(bcast_in); + bcast_in->sin_len = sizeof(*bcast_in); bcast_in->sin_addr.s_addr = inet_addr(bcast); *ifaddr = (struct ifaddrs) { .ifa_next = NULL, From owner-svn-src-stable@freebsd.org Tue Jul 12 22:09:06 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F5ADB939ED; Tue, 12 Jul 2016 22:09:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F6D51394; Tue, 12 Jul 2016 22:09:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6CM95nm033454; Tue, 12 Jul 2016 22:09:05 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CM953U033453; Tue, 12 Jul 2016 22:09:05 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607122209.u6CM953U033453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 12 Jul 2016 22:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302687 - stable/10/tests/sys/acl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 22:09:06 -0000 Author: asomers Date: Tue Jul 12 22:09:05 2016 New Revision: 302687 URL: https://svnweb.freebsd.org/changeset/base/302687 Log: MFC r302036 Skip sys/acl tests on systems lacking perl tests/sys/acl/Makefile add perl to the required_programs for all tests in this directory Modified: stable/10/tests/sys/acl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/acl/Makefile ============================================================================== --- stable/10/tests/sys/acl/Makefile Tue Jul 12 21:57:05 2016 (r302686) +++ stable/10/tests/sys/acl/Makefile Tue Jul 12 22:09:05 2016 (r302687) @@ -25,11 +25,11 @@ TEST_METADATA.$t+= required_user="root" _ACL_PROGS= getfacl setfacl .for t in 01 03 04 -TEST_METADATA.$t+= required_programs="zpool ${_ACL_PROGS}" +TEST_METADATA.$t+= required_programs="perl zpool ${_ACL_PROGS}" .endfor .for t in 00 02 -TEST_METADATA.$t+= required_programs="${_ACL_PROGS}" +TEST_METADATA.$t+= required_programs="perl ${_ACL_PROGS}" .endfor .include From owner-svn-src-stable@freebsd.org Tue Jul 12 22:19:26 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81B0DB93D3A; Tue, 12 Jul 2016 22:19:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 358B71A0B; Tue, 12 Jul 2016 22:19:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6CMJPTC037098; Tue, 12 Jul 2016 22:19:25 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CMJPww037097; Tue, 12 Jul 2016 22:19:25 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607122219.u6CMJPww037097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 12 Jul 2016 22:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302688 - stable/10/sbin/sysctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 22:19:26 -0000 Author: asomers Date: Tue Jul 12 22:19:25 2016 New Revision: 302688 URL: https://svnweb.freebsd.org/changeset/base/302688 Log: MFC r302174 Fix "sysctl vm.vmtotal" output on machines with > 2TB virtual memory sbin/sysctl/sysctl.c Fix integer overflows in printf format strings PR: 199673 Modified: stable/10/sbin/sysctl/sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/sysctl/sysctl.c ============================================================================== --- stable/10/sbin/sysctl/sysctl.c Tue Jul 12 22:09:05 2016 (r302687) +++ stable/10/sbin/sysctl/sysctl.c Tue Jul 12 22:19:25 2016 (r302688) @@ -547,15 +547,15 @@ S_vmtotal(size_t l2, void *p) "%hd Sleep: %hd)\n", v->t_rq, v->t_dw, v->t_pw, v->t_sl); printf( - "Virtual Memory:\t\t(Total: %dK Active: %dK)\n", - v->t_vm * pageKilo, v->t_avm * pageKilo); - printf("Real Memory:\t\t(Total: %dK Active: %dK)\n", - v->t_rm * pageKilo, v->t_arm * pageKilo); - printf("Shared Virtual Memory:\t(Total: %dK Active: %dK)\n", - v->t_vmshr * pageKilo, v->t_avmshr * pageKilo); - printf("Shared Real Memory:\t(Total: %dK Active: %dK)\n", - v->t_rmshr * pageKilo, v->t_armshr * pageKilo); - printf("Free Memory:\t%dK", v->t_free * pageKilo); + "Virtual Memory:\t\t(Total: %jdK Active: %jdK)\n", + (intmax_t)v->t_vm * pageKilo, (intmax_t)v->t_avm * pageKilo); + printf("Real Memory:\t\t(Total: %jdK Active: %jdK)\n", + (intmax_t)v->t_rm * pageKilo, (intmax_t)v->t_arm * pageKilo); + printf("Shared Virtual Memory:\t(Total: %jdK Active: %jdK)\n", + (intmax_t)v->t_vmshr * pageKilo, (intmax_t)v->t_avmshr * pageKilo); + printf("Shared Real Memory:\t(Total: %jdK Active: %jdK)\n", + (intmax_t)v->t_rmshr * pageKilo, (intmax_t)v->t_armshr * pageKilo); + printf("Free Memory:\t%jdK", (intmax_t)v->t_free * pageKilo); return (0); } From owner-svn-src-stable@freebsd.org Tue Jul 12 22:53:12 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6276EB93869; Tue, 12 Jul 2016 22:53:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D49D1E86; Tue, 12 Jul 2016 22:53:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6CMrBCQ051529; Tue, 12 Jul 2016 22:53:11 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CMrBJT051527; Tue, 12 Jul 2016 22:53:11 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607122253.u6CMrBJT051527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 12 Jul 2016 22:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302689 - in stable/10: usr.bin/lastcomm/tests usr.sbin/sa/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 22:53:12 -0000 Author: asomers Date: Tue Jul 12 22:53:11 2016 New Revision: 302689 URL: https://svnweb.freebsd.org/changeset/base/302689 Log: MFC r302206 Skip lastcomm and sa tests on unsupported architectures usr.bin/lastcom/tests/Makefile usr.sbin/sa/tests/Makefile Set allow_architectures appropriately. These tests depend on golden files that must be generated for each architecture, and haven't yet been generated for all of them. PR: 204154 Modified: stable/10/usr.bin/lastcomm/tests/Makefile stable/10/usr.sbin/sa/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/lastcomm/tests/Makefile ============================================================================== --- stable/10/usr.bin/lastcomm/tests/Makefile Tue Jul 12 22:19:25 2016 (r302688) +++ stable/10/usr.bin/lastcomm/tests/Makefile Tue Jul 12 22:53:11 2016 (r302689) @@ -3,6 +3,7 @@ TESTSDIR= ${TESTSBASE}/usr.bin/lastcomm TAP_TESTS_SH= legacy_test +TEST_METADATA.legacy_test+= allowed_architectures="amd64 i386 sparc64" FILESDIR= ${TESTSDIR} FILES= v1-amd64-acct.in Modified: stable/10/usr.sbin/sa/tests/Makefile ============================================================================== --- stable/10/usr.sbin/sa/tests/Makefile Tue Jul 12 22:19:25 2016 (r302688) +++ stable/10/usr.sbin/sa/tests/Makefile Tue Jul 12 22:53:11 2016 (r302689) @@ -3,6 +3,7 @@ TESTSDIR= ${TESTSBASE}/usr.sbin/sa TAP_TESTS_SH= legacy_test +TEST_METADATA.legacy_test+= allowed_architectures="amd64 i386 sparc64" FILESDIR= ${TESTSDIR} FILES= v1-amd64-sav.in From owner-svn-src-stable@freebsd.org Wed Jul 13 06:09:36 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CB1CB93072; Wed, 13 Jul 2016 06:09:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC797116F; Wed, 13 Jul 2016 06:09:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D69YIi012760; Wed, 13 Jul 2016 06:09:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D69YxD012753; Wed, 13 Jul 2016 06:09:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607130609.u6D69YxD012753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 Jul 2016 06:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302705 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 06:09:36 -0000 Author: ngie Date: Wed Jul 13 06:09:34 2016 New Revision: 302705 URL: https://svnweb.freebsd.org/changeset/base/302705 Log: MFC r302362,r302363,r302364,r302365,r302373: r302362: Fix gcc warnings - Remove -Wunused-but-set-variable (newcpu) - Always return VMEXIT_CONTINUE as the code always set retval to that value. r302363: Fix gcc warnings Put cfl/prdt under AHCI_DEBUG #defines as they are only used in those cases. r302364: Fix gcc warnings Add `WRAPPED_CTASSERT` macro by annotating CTASSERTs with __unused to deal with -Wunused-local-typedefs warnings from gcc 4.8+. All other compilers (clang, etc) use CTASSERT as-is. A more generic solution for this issue will be proposed after ^/stable/11 is forked. Consolidate all CTASSERTs under one block instead of inlining them in functions. r302365: Fix gcc warnings Remove -Wunused-but-set-variable (`error`). Cast calls with `(void)` to note that the return value is explicitly ignored. r302373: Fix CTASSERT issue in a more clean way - Replace all CTASSERT macro instances with static_assert's. - Remove the WRAPPED_CTASSERT macro; it's now an unnecessary obfuscation. - Localize all static_assert's to the structures being tested. - Sort some headers per-style(9). Modified: stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/bhyverun.h stable/10/usr.sbin/bhyve/pci_ahci.c stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/pci_emul.h stable/10/usr.sbin/bhyve/pci_passthru.c stable/10/usr.sbin/bhyve/task_switch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Wed Jul 13 05:58:46 2016 (r302704) +++ stable/10/usr.sbin/bhyve/bhyverun.c Wed Jul 13 06:09:34 2016 (r302705) @@ -387,13 +387,11 @@ vmexit_wrmsr(struct vmctx *ctx, struct v static int vmexit_spinup_ap(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) { - int newcpu; - int retval = VMEXIT_CONTINUE; - newcpu = spinup_ap(ctx, *pvcpu, - vme->u.spinup_ap.vcpu, vme->u.spinup_ap.rip); + (void)spinup_ap(ctx, *pvcpu, + vme->u.spinup_ap.vcpu, vme->u.spinup_ap.rip); - return (retval); + return (VMEXIT_CONTINUE); } #define DEBUG_EPT_MISCONFIG Modified: stable/10/usr.sbin/bhyve/bhyverun.h ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.h Wed Jul 13 05:58:46 2016 (r302704) +++ stable/10/usr.sbin/bhyve/bhyverun.h Wed Jul 13 06:09:34 2016 (r302705) @@ -29,12 +29,6 @@ #ifndef _FBSDRUN_H_ #define _FBSDRUN_H_ -#ifndef CTASSERT /* Allow lint to override */ -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] -#endif - #define VMEXIT_CONTINUE (0) #define VMEXIT_ABORT (-1) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Wed Jul 13 05:58:46 2016 (r302704) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Wed Jul 13 06:09:34 2016 (r302705) @@ -1724,19 +1724,25 @@ static void ahci_handle_slot(struct ahci_port *p, int slot) { struct ahci_cmd_hdr *hdr; +#ifdef AHCI_DEBUG struct ahci_prdt_entry *prdt; +#endif struct pci_ahci_softc *sc; uint8_t *cfis; +#ifdef AHCI_DEBUG int cfl; +#endif sc = p->pr_sc; hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); +#ifdef AHCI_DEBUG cfl = (hdr->flags & 0x1f) * 4; +#endif cfis = paddr_guest2host(ahci_ctx(sc), hdr->ctba, 0x80 + hdr->prdtl * sizeof(struct ahci_prdt_entry)); +#ifdef AHCI_DEBUG prdt = (struct ahci_prdt_entry *)(cfis + 0x80); -#ifdef AHCI_DEBUG DPRINTF("\ncfis:"); for (i = 0; i < cfl; i++) { if (i % 10 == 0) Modified: stable/10/usr.sbin/bhyve/pci_emul.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_emul.c Wed Jul 13 05:58:46 2016 (r302704) +++ stable/10/usr.sbin/bhyve/pci_emul.c Wed Jul 13 06:09:34 2016 (r302705) @@ -31,9 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include #include #include #include @@ -760,8 +760,6 @@ pci_populate_msicap(struct msicap *msica { int mmc; - CTASSERT(sizeof(struct msicap) == 14); - /* Number of msi messages must be a power of 2 between 1 and 32 */ assert((msgnum & (msgnum - 1)) == 0 && msgnum >= 1 && msgnum <= 32); mmc = ffs(msgnum) - 1; @@ -786,7 +784,6 @@ static void pci_populate_msixcap(struct msixcap *msixcap, int msgnum, int barnum, uint32_t msix_tab_size) { - CTASSERT(sizeof(struct msixcap) == 12); assert(msix_tab_size % 4096 == 0); @@ -937,8 +934,6 @@ pci_emul_add_pciecap(struct pci_devinst int err; struct pciecap pciecap; - CTASSERT(sizeof(struct pciecap) == 60); - if (type != PCIEM_TYPE_ROOT_PORT) return (-1); Modified: stable/10/usr.sbin/bhyve/pci_emul.h ============================================================================== --- stable/10/usr.sbin/bhyve/pci_emul.h Wed Jul 13 05:58:46 2016 (r302704) +++ stable/10/usr.sbin/bhyve/pci_emul.h Wed Jul 13 06:09:34 2016 (r302705) @@ -160,6 +160,7 @@ struct msicap { uint32_t addrhi; uint16_t msgdata; } __packed; +static_assert(sizeof(struct msicap) == 14, "compile-time assertion failed"); struct msixcap { uint8_t capid; @@ -168,6 +169,7 @@ struct msixcap { uint32_t table_info; /* bar index and offset within it */ uint32_t pba_info; /* bar index and offset within it */ } __packed; +static_assert(sizeof(struct msixcap) == 12, "compile-time assertion failed"); struct pciecap { uint8_t capid; @@ -202,6 +204,7 @@ struct pciecap { uint16_t slot_control2; uint16_t slot_status2; } __packed; +static_assert(sizeof(struct pciecap) == 60, "compile-time assertion failed"); typedef void (*pci_lintr_cb)(int b, int s, int pin, int pirq_pin, int ioapic_irq, void *arg); Modified: stable/10/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_passthru.c Wed Jul 13 05:58:46 2016 (r302704) +++ stable/10/usr.sbin/bhyve/pci_passthru.c Wed Jul 13 06:09:34 2016 (r302705) @@ -361,7 +361,7 @@ msix_table_write(struct vmctx *ctx, int uint64_t *dest64; size_t entry_offset; uint32_t vector_control; - int error, index; + int index; pi = sc->psc_pi; if (offset >= pi->pi_msix.pba_offset && @@ -416,8 +416,8 @@ msix_table_write(struct vmctx *ctx, int /* If the entry is masked, don't set it up */ if ((entry->vector_control & PCIM_MSIX_VCTRL_MASK) == 0 || (vector_control & PCIM_MSIX_VCTRL_MASK) == 0) { - error = vm_setup_pptdev_msix(ctx, vcpu, - sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, + (void)vm_setup_pptdev_msix(ctx, vcpu, + sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, sc->psc_sel.pc_func, index, entry->addr, entry->msg_data, entry->vector_control); } Modified: stable/10/usr.sbin/bhyve/task_switch.c ============================================================================== --- stable/10/usr.sbin/bhyve/task_switch.c Wed Jul 13 05:58:46 2016 (r302704) +++ stable/10/usr.sbin/bhyve/task_switch.c Wed Jul 13 06:09:34 2016 (r302705) @@ -37,11 +37,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include -#include -#include #include @@ -91,7 +91,7 @@ struct tss32 { uint16_t tss_trap; uint16_t tss_iomap; }; -CTASSERT(sizeof(struct tss32) == 104); +static_assert(sizeof(struct tss32) == 104, "compile-time assertion failed"); #define SEL_START(sel) (((sel) & ~0x7)) #define SEL_LIMIT(sel) (((sel) | 0x7)) From owner-svn-src-stable@freebsd.org Wed Jul 13 08:33:58 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB254B937AC; Wed, 13 Jul 2016 08:33:58 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D4491F1C; Wed, 13 Jul 2016 08:33:58 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D8Xvhx068691; Wed, 13 Jul 2016 08:33:57 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D8XvNh068689; Wed, 13 Jul 2016 08:33:57 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201607130833.u6D8XvNh068689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 13 Jul 2016 08:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302714 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 08:33:58 -0000 Author: smh Date: Wed Jul 13 08:33:57 2016 New Revision: 302714 URL: https://svnweb.freebsd.org/changeset/base/302714 Log: MFC r302265, r302382 Allow ZFS ARC min / max to be tuned at runtime Relnotes: YES Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 13 08:30:14 2016 (r302713) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 13 08:33:57 2016 (r302714) @@ -233,10 +233,15 @@ int zfs_disable_dup_eviction = 0; uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ u_int zfs_arc_free_target = 0; +/* Absolute min for arc min / max is 16MB. */ +static uint64_t arc_abs_min = 16 << 20; + static int sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS); static int sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS); +static int sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS); +static int sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_ARGS); -#ifdef _KERNEL +#if defined(__FreeBSD__) && defined(_KERNEL) static void arc_free_target_init(void *unused __unused) { @@ -253,10 +258,10 @@ TUNABLE_QUAD("vfs.zfs.arc_meta_min", &zf TUNABLE_QUAD("vfs.zfs.arc_average_blocksize", &zfs_arc_average_blocksize); TUNABLE_INT("vfs.zfs.arc_shrink_shift", &zfs_arc_shrink_shift); SYSCTL_DECL(_vfs_zfs); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, - "Maximum ARC size"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, - "Minimum ARC size"); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max, CTLTYPE_U64 | CTLFLAG_RWTUN, + 0, sizeof(uint64_t), sysctl_vfs_zfs_arc_max, "QU", "Maximum ARC size"); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min, CTLTYPE_U64 | CTLFLAG_RWTUN, + 0, sizeof(uint64_t), sysctl_vfs_zfs_arc_min, "QU", "Minimum ARC size"); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN, &zfs_arc_average_blocksize, 0, "ARC average blocksize"); @@ -882,7 +887,7 @@ struct arc_buf_hdr { l1arc_buf_hdr_t b_l1hdr; }; -#ifdef _KERNEL +#if defined(__FreeBSD__) && defined(_KERNEL) static int sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS) { @@ -900,6 +905,82 @@ sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HAN arc_meta_limit = val; return (0); } + +static int +sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS) +{ + uint64_t val; + int err; + + val = zfs_arc_max; + err = sysctl_handle_64(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (zfs_arc_max == 0) { + /* Loader tunable so blindly set */ + zfs_arc_max = val; + return (0); + } + + if (val < arc_abs_min || val > kmem_size()) + return (EINVAL); + if (val < arc_c_min) + return (EINVAL); + if (zfs_arc_meta_limit > 0 && val < zfs_arc_meta_limit) + return (EINVAL); + + arc_c_max = val; + + arc_c = arc_c_max; + arc_p = (arc_c >> 1); + + if (zfs_arc_meta_limit == 0) { + /* limit meta-data to 1/4 of the arc capacity */ + arc_meta_limit = arc_c_max / 4; + } + + /* if kmem_flags are set, lets try to use less memory */ + if (kmem_debugging()) + arc_c = arc_c / 2; + + zfs_arc_max = arc_c; + + return (0); +} + +static int +sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_ARGS) +{ + uint64_t val; + int err; + + val = zfs_arc_min; + err = sysctl_handle_64(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (zfs_arc_min == 0) { + /* Loader tunable so blindly set */ + zfs_arc_min = val; + return (0); + } + + if (val < arc_abs_min || val > arc_c_max) + return (EINVAL); + + arc_c_min = val; + + if (zfs_arc_meta_min == 0) + arc_meta_min = arc_c_min / 2; + + if (arc_c < arc_c_min) + arc_c = arc_c_min; + + zfs_arc_min = arc_c_min; + + return (0); +} #endif static arc_buf_t *arc_eviction_list; @@ -5320,8 +5401,8 @@ arc_init(void) arc_c = MIN(arc_c, vmem_size(heap_arena, VMEM_ALLOC | VMEM_FREE) / 8); #endif #endif /* illumos */ - /* set min cache to 1/32 of all memory, or 16MB, whichever is more */ - arc_c_min = MAX(arc_c / 4, 16 << 20); + /* set min cache to 1/32 of all memory, or arc_abs_min, whichever is more */ + arc_c_min = MAX(arc_c / 4, arc_abs_min); /* set max to 1/2 of all memory, or all but 1GB, whichever is more */ if (arc_c * 8 >= 1 << 30) arc_c_max = (arc_c * 8) - (1 << 30); @@ -5342,11 +5423,11 @@ arc_init(void) #ifdef _KERNEL /* * Allow the tunables to override our calculations if they are - * reasonable (ie. over 16MB) + * reasonable. */ - if (zfs_arc_max > 16 << 20 && zfs_arc_max < kmem_size()) + if (zfs_arc_max > arc_abs_min && zfs_arc_max < kmem_size()) arc_c_max = zfs_arc_max; - if (zfs_arc_min > 16 << 20 && zfs_arc_min <= arc_c_max) + if (zfs_arc_min > arc_abs_min && zfs_arc_min <= arc_c_max) arc_c_min = zfs_arc_min; #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Jul 13 08:30:14 2016 (r302713) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Jul 13 08:33:57 2016 (r302714) @@ -49,8 +49,8 @@ #include #ifdef __FreeBSD__ -#include #include +#include #endif /* From owner-svn-src-stable@freebsd.org Wed Jul 13 09:02:15 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76769B976F5; Wed, 13 Jul 2016 09:02:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43D9F188E; Wed, 13 Jul 2016 09:02:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D92Ero077784; Wed, 13 Jul 2016 09:02:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D92Ee8077783; Wed, 13 Jul 2016 09:02:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130902.u6D92Ee8077783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302715 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:02:15 -0000 Author: avg Date: Wed Jul 13 09:02:14 2016 New Revision: 302715 URL: https://svnweb.freebsd.org/changeset/base/302715 Log: MFC r299913: dounmount: do not call mountcheckdirs() for mounts with MNT_IGNORE Modified: stable/9/sys/kern/vfs_mount.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Wed Jul 13 08:33:57 2016 (r302714) +++ stable/9/sys/kern/vfs_mount.c Wed Jul 13 09:02:14 2016 (r302715) @@ -1306,7 +1306,8 @@ dounmount(mp, flags, td) */ if ((flags & MNT_FORCE) && VFS_ROOT(mp, LK_EXCLUSIVE, &fsrootvp) == 0) { - if (mp->mnt_vnodecovered != NULL) + if (mp->mnt_vnodecovered != NULL && + (mp->mnt_flag & MNT_IGNORE) == 0) mountcheckdirs(fsrootvp, mp->mnt_vnodecovered); if (fsrootvp == rootvnode) { vrele(rootvnode); @@ -1327,7 +1328,8 @@ dounmount(mp, flags, td) if (error && error != ENXIO) { if ((flags & MNT_FORCE) && VFS_ROOT(mp, LK_EXCLUSIVE, &fsrootvp) == 0) { - if (mp->mnt_vnodecovered != NULL) + if (mp->mnt_vnodecovered != NULL && + (mp->mnt_flag & MNT_IGNORE) == 0) mountcheckdirs(mp->mnt_vnodecovered, fsrootvp); if (rootvnode == NULL) { rootvnode = fsrootvp; From owner-svn-src-stable@freebsd.org Wed Jul 13 09:03:03 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1052EB9775D; Wed, 13 Jul 2016 09:03:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D34441A44; Wed, 13 Jul 2016 09:03:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D932tZ079840; Wed, 13 Jul 2016 09:03:02 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D932ng079839; Wed, 13 Jul 2016 09:03:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130903.u6D932ng079839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302716 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:03:03 -0000 Author: avg Date: Wed Jul 13 09:03:01 2016 New Revision: 302716 URL: https://svnweb.freebsd.org/changeset/base/302716 Log: MFC r299913: dounmount: do not call mountcheckdirs() for mounts with MNT_IGNORE Modified: stable/10/sys/kern/vfs_mount.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_mount.c ============================================================================== --- stable/10/sys/kern/vfs_mount.c Wed Jul 13 09:02:14 2016 (r302715) +++ stable/10/sys/kern/vfs_mount.c Wed Jul 13 09:03:01 2016 (r302716) @@ -1315,7 +1315,8 @@ dounmount(struct mount *mp, int flags, s */ if ((flags & MNT_FORCE) && VFS_ROOT(mp, LK_EXCLUSIVE, &fsrootvp) == 0) { - if (mp->mnt_vnodecovered != NULL) + if (mp->mnt_vnodecovered != NULL && + (mp->mnt_flag & MNT_IGNORE) == 0) mountcheckdirs(fsrootvp, mp->mnt_vnodecovered); if (fsrootvp == rootvnode) { vrele(rootvnode); @@ -1336,7 +1337,8 @@ dounmount(struct mount *mp, int flags, s if (error && error != ENXIO) { if ((flags & MNT_FORCE) && VFS_ROOT(mp, LK_EXCLUSIVE, &fsrootvp) == 0) { - if (mp->mnt_vnodecovered != NULL) + if (mp->mnt_vnodecovered != NULL && + (mp->mnt_flag & MNT_IGNORE) == 0) mountcheckdirs(mp->mnt_vnodecovered, fsrootvp); if (rootvnode == NULL) { rootvnode = fsrootvp; From owner-svn-src-stable@freebsd.org Wed Jul 13 09:05:15 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D59EB9782B; Wed, 13 Jul 2016 09:05:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CFB21D17; Wed, 13 Jul 2016 09:05:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D95ENl079983; Wed, 13 Jul 2016 09:05:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D95E4u079981; Wed, 13 Jul 2016 09:05:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130905.u6D95E4u079981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302717 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:05:15 -0000 Author: avg Date: Wed Jul 13 09:05:14 2016 New Revision: 302717 URL: https://svnweb.freebsd.org/changeset/base/302717 Log: MFC r300132: zfsctl: tighten assertion and remove unused definition Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Wed Jul 13 09:03:01 2016 (r302716) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Wed Jul 13 09:05:14 2016 (r302717) @@ -61,7 +61,6 @@ int zfsctl_lookup_objset(vfs_t *vfsp, ui #define ZFSCTL_INO_ROOT 0x1 #define ZFSCTL_INO_SNAPDIR 0x2 -#define ZFSCTL_INO_SHARES 0x3 #ifdef __cplusplus } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:03:01 2016 (r302716) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:05:14 2016 (r302717) @@ -223,7 +223,7 @@ zfsctl_root_inode_cb(vnode_t *vp, int in { zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; - ASSERT(index <= 2); + ASSERT(index < 2); if (index == 0) return (ZFSCTL_INO_SNAPDIR); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:05:28 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F01F2B97898; Wed, 13 Jul 2016 09:05:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC38F1E77; Wed, 13 Jul 2016 09:05:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D95Rqd080037; Wed, 13 Jul 2016 09:05:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D95RBH080035; Wed, 13 Jul 2016 09:05:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130905.u6D95RBH080035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302718 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:05:29 -0000 Author: avg Date: Wed Jul 13 09:05:27 2016 New Revision: 302718 URL: https://svnweb.freebsd.org/changeset/base/302718 Log: MFC r300132: zfsctl: tighten assertion and remove unused definition Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Wed Jul 13 09:05:14 2016 (r302717) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Wed Jul 13 09:05:27 2016 (r302718) @@ -61,7 +61,6 @@ int zfsctl_lookup_objset(vfs_t *vfsp, ui #define ZFSCTL_INO_ROOT 0x1 #define ZFSCTL_INO_SNAPDIR 0x2 -#define ZFSCTL_INO_SHARES 0x3 #ifdef __cplusplus } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:05:14 2016 (r302717) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:05:27 2016 (r302718) @@ -222,7 +222,7 @@ zfsctl_root_inode_cb(vnode_t *vp, int in { zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; - ASSERT(index <= 2); + ASSERT(index < 2); if (index == 0) return (ZFSCTL_INO_SNAPDIR); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:07:00 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F877B97950; Wed, 13 Jul 2016 09:07:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF35C1181; Wed, 13 Jul 2016 09:06:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D96x18080151; Wed, 13 Jul 2016 09:06:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D96xSD080150; Wed, 13 Jul 2016 09:06:59 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130906.u6D96xSD080150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302719 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:07:00 -0000 Author: avg Date: Wed Jul 13 09:06:58 2016 New Revision: 302719 URL: https://svnweb.freebsd.org/changeset/base/302719 Log: MFC r300133: zfsctl_common_fid: remove redundant assignment Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:05:27 2016 (r302718) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:06:58 2016 (r302719) @@ -404,8 +404,6 @@ zfsctl_common_fid(ap) ZFS_EXIT(zfsvfs); return (SET_ERROR(ENOSPC)); } -#else - fidp->fid_len = SHORT_FID_LEN; #endif zfid = (zfid_short_t *)fidp; From owner-svn-src-stable@freebsd.org Wed Jul 13 09:07:15 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81ECCB97991; Wed, 13 Jul 2016 09:07:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4272B12D9; Wed, 13 Jul 2016 09:07:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D97E6q080207; Wed, 13 Jul 2016 09:07:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D97En6080206; Wed, 13 Jul 2016 09:07:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130907.u6D97En6080206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302720 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:07:15 -0000 Author: avg Date: Wed Jul 13 09:07:14 2016 New Revision: 302720 URL: https://svnweb.freebsd.org/changeset/base/302720 Log: MFC r300133: zfsctl_common_fid: remove redundant assignment Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:06:58 2016 (r302719) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:07:14 2016 (r302720) @@ -403,8 +403,6 @@ zfsctl_common_fid(ap) ZFS_EXIT(zfsvfs); return (SET_ERROR(ENOSPC)); } -#else - fidp->fid_len = SHORT_FID_LEN; #endif zfid = (zfid_short_t *)fidp; From owner-svn-src-stable@freebsd.org Wed Jul 13 09:09:23 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E410B97A5F; Wed, 13 Jul 2016 09:09:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D51491507; Wed, 13 Jul 2016 09:09:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D99Mwu080345; Wed, 13 Jul 2016 09:09:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D99Lam080342; Wed, 13 Jul 2016 09:09:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130909.u6D99Lam080342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302721 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:09:23 -0000 Author: avg Date: Wed Jul 13 09:09:21 2016 New Revision: 302721 URL: https://svnweb.freebsd.org/changeset/base/302721 Log: MFC r298105: zfs: enable vn_io_fault support Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Jul 13 09:07:14 2016 (r302720) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Jul 13 09:09:21 2016 (r302721) @@ -1083,8 +1083,13 @@ dmu_read_uio_dnode(dnode_t *dn, uio_t *u else XUIOSTAT_BUMP(xuiostat_rbuf_copied); } else { +#ifdef illumos err = uiomove((char *)db->db_data + bufoff, tocpy, UIO_READ, uio); +#else + err = vn_io_fault_uiomove((char *)db->db_data + bufoff, + tocpy, uio); +#endif } if (err) break; @@ -1178,6 +1183,7 @@ dmu_write_uio_dnode(dnode_t *dn, uio_t * else dmu_buf_will_dirty(db, tx); +#ifdef illumos /* * XXX uiomove could block forever (eg. nfs-backed * pages). There needs to be a uiolockdown() function @@ -1186,6 +1192,10 @@ dmu_write_uio_dnode(dnode_t *dn, uio_t * */ err = uiomove((char *)db->db_data + bufoff, tocpy, UIO_WRITE, uio); +#else + err = vn_io_fault_uiomove((char *)db->db_data + bufoff, tocpy, + uio); +#endif if (tocpy == db->db_size) dmu_buf_fill_done(db, tx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:07:14 2016 (r302720) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:09:21 2016 (r302721) @@ -1171,6 +1171,7 @@ zfs_domount(vfs_t *vfsp, char *osname) vfsp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; vfsp->mnt_kern_flag |= MNTK_SHARED_WRITES; vfsp->mnt_kern_flag |= MNTK_EXTENDED_SHARED; + vfsp->mnt_kern_flag |= MNTK_NO_IOPF; /* vn_io_fault can be used */ /* * The fsid is 64 bits, composed of an 8-bit fs type, which Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:07:14 2016 (r302720) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:09:21 2016 (r302721) @@ -655,7 +655,11 @@ mappedread(vnode_t *vp, int nbytes, uio_ zfs_vmobject_wunlock(obj); va = zfs_map_page(pp, &sf); +#ifdef illumos error = uiomove(va + off, bytes, UIO_READ, uio); +#else + error = vn_io_fault_uiomove(va + off, bytes, uio); +#endif zfs_unmap_page(sf); zfs_vmobject_wlock(obj); page_unhold(pp); @@ -1033,18 +1037,31 @@ zfs_write(vnode_t *vp, uio_t *uio, int i * holding up the transaction if the data copy hangs * up on a pagefault (e.g., from an NFS server mapping). */ +#ifdef illumos size_t cbytes; +#endif abuf = dmu_request_arcbuf(sa_get_db(zp->z_sa_hdl), max_blksz); ASSERT(abuf != NULL); ASSERT(arc_buf_size(abuf) == max_blksz); +#ifdef illumos if (error = uiocopy(abuf->b_data, max_blksz, UIO_WRITE, uio, &cbytes)) { dmu_return_arcbuf(abuf); break; } ASSERT(cbytes == max_blksz); +#else + ssize_t resid = uio->uio_resid; + error = vn_io_fault_uiomove(abuf->b_data, max_blksz, uio); + if (error != 0) { + uio->uio_offset -= resid - uio->uio_resid; + uio->uio_resid = resid; + dmu_return_arcbuf(abuf); + break; + } +#endif } /* @@ -1122,8 +1139,10 @@ zfs_write(vnode_t *vp, uio_t *uio, int i dmu_assign_arcbuf(sa_get_db(zp->z_sa_hdl), woff, abuf, tx); } +#ifdef illumos ASSERT(tx_bytes <= uio->uio_resid); uioskip(uio, tx_bytes); +#endif } if (tx_bytes && vn_has_cached_data(vp)) { update_pages(vp, woff, tx_bytes, zfsvfs->z_os, @@ -1177,7 +1196,11 @@ zfs_write(vnode_t *vp, uio_t *uio, int i while ((end_size = zp->z_size) < uio->uio_loffset) { (void) atomic_cas_64(&zp->z_size, end_size, uio->uio_loffset); +#ifdef illumos ASSERT(error == 0); +#else + ASSERT(error == 0 || error == EFAULT); +#endif } /* * If we are replaying and eof is non zero then force @@ -1187,7 +1210,10 @@ zfs_write(vnode_t *vp, uio_t *uio, int i if (zfsvfs->z_replay && zfsvfs->z_replay_eof != 0) zp->z_size = zfsvfs->z_replay_eof; - error = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); + if (error == 0) + error = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); + else + (void) sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); zfs_log_write(zilog, tx, TX_WRITE, zp, woff, tx_bytes, ioflag); dmu_tx_commit(tx); @@ -1214,6 +1240,17 @@ zfs_write(vnode_t *vp, uio_t *uio, int i return (error); } +#ifdef __FreeBSD__ + /* + * EFAULT means that at least one page of the source buffer was not + * available. VFS will re-try remaining I/O upon this error. + */ + if (error == EFAULT) { + ZFS_EXIT(zfsvfs); + return (error); + } +#endif + if (ioflag & (FSYNC | FDSYNC) || zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, zp->z_id); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:09:35 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E05BCB97AA2; Wed, 13 Jul 2016 09:09:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A341D1675; Wed, 13 Jul 2016 09:09:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D99YRE080400; Wed, 13 Jul 2016 09:09:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D99Ytp080397; Wed, 13 Jul 2016 09:09:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130909.u6D99Ytp080397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302722 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:09:36 -0000 Author: avg Date: Wed Jul 13 09:09:34 2016 New Revision: 302722 URL: https://svnweb.freebsd.org/changeset/base/302722 Log: MFC r298105: zfs: enable vn_io_fault support Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Jul 13 09:09:21 2016 (r302721) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Jul 13 09:09:34 2016 (r302722) @@ -1025,8 +1025,13 @@ dmu_read_uio(objset_t *os, uint64_t obje else XUIOSTAT_BUMP(xuiostat_rbuf_copied); } else { +#ifdef illumos err = uiomove((char *)db->db_data + bufoff, tocpy, UIO_READ, uio); +#else + err = vn_io_fault_uiomove((char *)db->db_data + bufoff, + tocpy, uio); +#endif } if (err) break; @@ -1068,6 +1073,7 @@ dmu_write_uio_dnode(dnode_t *dn, uio_t * else dmu_buf_will_dirty(db, tx); +#ifdef illumos /* * XXX uiomove could block forever (eg. nfs-backed * pages). There needs to be a uiolockdown() function @@ -1076,6 +1082,10 @@ dmu_write_uio_dnode(dnode_t *dn, uio_t * */ err = uiomove((char *)db->db_data + bufoff, tocpy, UIO_WRITE, uio); +#else + err = vn_io_fault_uiomove((char *)db->db_data + bufoff, tocpy, + uio); +#endif if (tocpy == db->db_size) dmu_buf_fill_done(db, tx); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:09:21 2016 (r302721) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:09:34 2016 (r302722) @@ -1182,6 +1182,7 @@ zfs_domount(vfs_t *vfsp, char *osname) vfsp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; vfsp->mnt_kern_flag |= MNTK_SHARED_WRITES; vfsp->mnt_kern_flag |= MNTK_EXTENDED_SHARED; + vfsp->mnt_kern_flag |= MNTK_NO_IOPF; /* vn_io_fault can be used */ /* * The fsid is 64 bits, composed of an 8-bit fs type, which Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:09:21 2016 (r302721) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:09:34 2016 (r302722) @@ -595,7 +595,11 @@ mappedread(vnode_t *vp, int nbytes, uio_ VM_OBJECT_UNLOCK(obj); va = zfs_map_page(pp, &sf); +#ifdef illumos error = uiomove(va + off, bytes, UIO_READ, uio); +#else + error = vn_io_fault_uiomove(va + off, bytes, uio); +#endif zfs_unmap_page(sf); VM_OBJECT_LOCK(obj); page_unhold(pp); @@ -962,18 +966,31 @@ zfs_write(vnode_t *vp, uio_t *uio, int i * holding up the transaction if the data copy hangs * up on a pagefault (e.g., from an NFS server mapping). */ +#ifdef illumos size_t cbytes; +#endif abuf = dmu_request_arcbuf(sa_get_db(zp->z_sa_hdl), max_blksz); ASSERT(abuf != NULL); ASSERT(arc_buf_size(abuf) == max_blksz); +#ifdef illumos if (error = uiocopy(abuf->b_data, max_blksz, UIO_WRITE, uio, &cbytes)) { dmu_return_arcbuf(abuf); break; } ASSERT(cbytes == max_blksz); +#else + ssize_t resid = uio->uio_resid; + error = vn_io_fault_uiomove(abuf->b_data, max_blksz, uio); + if (error != 0) { + uio->uio_offset -= resid - uio->uio_resid; + uio->uio_resid = resid; + dmu_return_arcbuf(abuf); + break; + } +#endif } /* @@ -1045,8 +1062,10 @@ zfs_write(vnode_t *vp, uio_t *uio, int i dmu_assign_arcbuf(sa_get_db(zp->z_sa_hdl), woff, abuf, tx); } +#ifdef illumos ASSERT(tx_bytes <= uio->uio_resid); uioskip(uio, tx_bytes); +#endif } if (tx_bytes && vn_has_cached_data(vp)) { update_pages(vp, woff, tx_bytes, zfsvfs->z_os, @@ -1100,7 +1119,11 @@ zfs_write(vnode_t *vp, uio_t *uio, int i while ((end_size = zp->z_size) < uio->uio_loffset) { (void) atomic_cas_64(&zp->z_size, end_size, uio->uio_loffset); +#ifdef illumos ASSERT(error == 0); +#else + ASSERT(error == 0 || error == EFAULT); +#endif } /* * If we are replaying and eof is non zero then force @@ -1110,7 +1133,10 @@ zfs_write(vnode_t *vp, uio_t *uio, int i if (zfsvfs->z_replay && zfsvfs->z_replay_eof != 0) zp->z_size = zfsvfs->z_replay_eof; - error = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); + if (error == 0) + error = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); + else + (void) sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); zfs_log_write(zilog, tx, TX_WRITE, zp, woff, tx_bytes, ioflag); dmu_tx_commit(tx); @@ -1137,6 +1163,17 @@ zfs_write(vnode_t *vp, uio_t *uio, int i return (error); } +#ifdef __FreeBSD__ + /* + * EFAULT means that at least one page of the source buffer was not + * available. VFS will re-try remaining I/O upon this error. + */ + if (error == EFAULT) { + ZFS_EXIT(zfsvfs); + return (error); + } +#endif + if (ioflag & (FSYNC | FDSYNC) || zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, zp->z_id); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:14:46 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4388B97DBA; Wed, 13 Jul 2016 09:14:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B71E1C90; Wed, 13 Jul 2016 09:14:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9Ejqx083925; Wed, 13 Jul 2016 09:14:45 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9EjoM083922; Wed, 13 Jul 2016 09:14:45 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130914.u6D9EjoM083922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302724 - in stable/10/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:14:46 -0000 Author: avg Date: Wed Jul 13 09:14:45 2016 New Revision: 302724 URL: https://svnweb.freebsd.org/changeset/base/302724 Log: MFC r299900: zfsctl: fix several problems with reference counts PR: 207464 Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:11:03 2016 (r302723) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:14:45 2016 (r302724) @@ -229,7 +229,7 @@ mount_snapshot(kthread_t *td, vnode_t ** vfs_event_signal(NULL, VQ_MOUNT, 0); if (VFS_ROOT(mp, LK_EXCLUSIVE, &mvp)) panic("mount: lost mount"); - vput(vp); + VOP_UNLOCK(vp, 0); vfs_unbusy(mp); *vpp = mvp; return (0); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:11:03 2016 (r302723) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:14:45 2016 (r302724) @@ -1074,7 +1074,6 @@ zfsctl_snapdir_lookup(ap) sep->se_name = kmem_alloc(strlen(nm) + 1, KM_SLEEP); (void) strcpy(sep->se_name, nm); *vpp = sep->se_root = zfsctl_snapshot_mknode(dvp, dmu_objset_id(snap)); - VN_HOLD(*vpp); avl_insert(&sdp->sd_snaps, sep, where); dmu_objset_rele(snap, FTAG); @@ -1452,7 +1451,6 @@ zfsctl_snapshot_mknode(vnode_t *pvp, uin vp = gfs_dir_create(sizeof (zfsctl_node_t), pvp, pvp->v_vfsp, &zfsctl_ops_snapshot, NULL, NULL, MAXNAMELEN, NULL, NULL); - VN_HOLD(vp); zcp = vp->v_data; zcp->zc_id = objset; VOP_UNLOCK(vp, 0); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:11:03 2016 (r302723) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:14:45 2016 (r302724) @@ -2006,12 +2006,6 @@ zfs_umount(vfs_t *vfsp, int fflag) */ if (zfsvfs->z_ctldir != NULL) zfsctl_destroy(zfsvfs); - if (zfsvfs->z_issnap) { - vnode_t *svp = vfsp->mnt_vnodecovered; - - if (svp->v_count >= 2) - VN_RELE(svp); - } zfs_freevfs(vfsp); return (0); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:15:13 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA0F6B97E64; Wed, 13 Jul 2016 09:15:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 608AC1E81; Wed, 13 Jul 2016 09:15:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9FC8V084011; Wed, 13 Jul 2016 09:15:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9FCN6084008; Wed, 13 Jul 2016 09:15:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130915.u6D9FCN6084008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302725 - in stable/9/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:15:13 -0000 Author: avg Date: Wed Jul 13 09:15:12 2016 New Revision: 302725 URL: https://svnweb.freebsd.org/changeset/base/302725 Log: MFC r299900: zfsctl: fix several problems with reference counts PR: 207464 Modified: stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:14:45 2016 (r302724) +++ stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:15:12 2016 (r302725) @@ -229,7 +229,7 @@ mount_snapshot(kthread_t *td, vnode_t ** vfs_event_signal(NULL, VQ_MOUNT, 0); if (VFS_ROOT(mp, LK_EXCLUSIVE, &mvp)) panic("mount: lost mount"); - vput(vp); + VOP_UNLOCK(vp, 0); vfs_unbusy(mp); *vpp = mvp; return (0); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:14:45 2016 (r302724) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:15:12 2016 (r302725) @@ -1062,7 +1062,6 @@ zfsctl_snapdir_lookup(ap) sep->se_name = kmem_alloc(strlen(nm) + 1, KM_SLEEP); (void) strcpy(sep->se_name, nm); *vpp = sep->se_root = zfsctl_snapshot_mknode(dvp, dmu_objset_id(snap)); - VN_HOLD(*vpp); avl_insert(&sdp->sd_snaps, sep, where); dmu_objset_rele(snap, FTAG); @@ -1439,7 +1438,6 @@ zfsctl_snapshot_mknode(vnode_t *pvp, uin vp = gfs_dir_create(sizeof (zfsctl_node_t), pvp, pvp->v_vfsp, &zfsctl_ops_snapshot, NULL, NULL, MAXNAMELEN, NULL, NULL); - VN_HOLD(vp); zcp = vp->v_data; zcp->zc_id = objset; VOP_UNLOCK(vp, 0); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:14:45 2016 (r302724) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:15:12 2016 (r302725) @@ -2051,12 +2051,6 @@ zfs_umount(vfs_t *vfsp, int fflag) */ if (zfsvfs->z_ctldir != NULL) zfsctl_destroy(zfsvfs); - if (zfsvfs->z_issnap) { - vnode_t *svp = vfsp->mnt_vnodecovered; - - if (svp->v_count >= 2) - VN_RELE(svp); - } zfs_freevfs(vfsp); return (0); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:21:30 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ACA2B93430; Wed, 13 Jul 2016 09:21:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB1FF1846; Wed, 13 Jul 2016 09:21:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9LTc9087489; Wed, 13 Jul 2016 09:21:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9LTGQ087488; Wed, 13 Jul 2016 09:21:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130921.u6D9LTGQ087488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302727 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:21:30 -0000 Author: avg Date: Wed Jul 13 09:21:28 2016 New Revision: 302727 URL: https://svnweb.freebsd.org/changeset/base/302727 Log: MFC r302123: fix deadlock-prone code in getzfsvfs() Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jul 13 09:19:33 2016 (r302726) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jul 13 09:21:28 2016 (r302727) @@ -1429,6 +1429,7 @@ static int getzfsvfs(const char *dsname, zfsvfs_t **zfvp) { objset_t *os; + vfs_t *vfsp; int error; error = dmu_objset_hold(dsname, FTAG, &os); @@ -1442,19 +1443,21 @@ getzfsvfs(const char *dsname, zfsvfs_t * mutex_enter(&os->os_user_ptr_lock); *zfvp = dmu_objset_get_user(os); if (*zfvp) { -#ifdef illumos - VFS_HOLD((*zfvp)->z_vfs); -#else - if (vfs_busy((*zfvp)->z_vfs, 0) != 0) { - *zfvp = NULL; - error = SET_ERROR(ESRCH); - } -#endif + vfsp = (*zfvp)->z_vfs; + vfs_ref(vfsp); } else { error = SET_ERROR(ESRCH); } mutex_exit(&os->os_user_ptr_lock); dmu_objset_rele(os, FTAG); + if (error == 0) { + error = vfs_busy(vfsp, 0); + vfs_rel(vfsp); + if (error != 0) { + *zfvp = NULL; + error = SET_ERROR(ESRCH); + } + } return (error); } From owner-svn-src-stable@freebsd.org Wed Jul 13 09:21:42 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27951B93473; Wed, 13 Jul 2016 09:21:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED9D61AA1; Wed, 13 Jul 2016 09:21:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9Lfjg087540; Wed, 13 Jul 2016 09:21:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9LfOx087539; Wed, 13 Jul 2016 09:21:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130921.u6D9LfOx087539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302728 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:21:42 -0000 Author: avg Date: Wed Jul 13 09:21:40 2016 New Revision: 302728 URL: https://svnweb.freebsd.org/changeset/base/302728 Log: MFC r302123: fix deadlock-prone code in getzfsvfs() Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jul 13 09:21:28 2016 (r302727) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jul 13 09:21:40 2016 (r302728) @@ -1428,6 +1428,7 @@ static int getzfsvfs(const char *dsname, zfsvfs_t **zfvp) { objset_t *os; + vfs_t *vfsp; int error; error = dmu_objset_hold(dsname, FTAG, &os); @@ -1441,19 +1442,21 @@ getzfsvfs(const char *dsname, zfsvfs_t * mutex_enter(&os->os_user_ptr_lock); *zfvp = dmu_objset_get_user(os); if (*zfvp) { -#ifdef illumos - VFS_HOLD((*zfvp)->z_vfs); -#else - if (vfs_busy((*zfvp)->z_vfs, 0) != 0) { - *zfvp = NULL; - error = SET_ERROR(ESRCH); - } -#endif + vfsp = (*zfvp)->z_vfs; + vfs_ref(vfsp); } else { error = SET_ERROR(ESRCH); } mutex_exit(&os->os_user_ptr_lock); dmu_objset_rele(os, FTAG); + if (error == 0) { + error = vfs_busy(vfsp, 0); + vfs_rel(vfsp); + if (error != 0) { + *zfvp = NULL; + error = SET_ERROR(ESRCH); + } + } return (error); } From owner-svn-src-stable@freebsd.org Wed Jul 13 09:23:03 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5F65B9351E; Wed, 13 Jul 2016 09:23:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A56801CEC; Wed, 13 Jul 2016 09:23:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9N29Q088317; Wed, 13 Jul 2016 09:23:02 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9N2FZ088316; Wed, 13 Jul 2016 09:23:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130923.u6D9N2FZ088316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302729 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:23:03 -0000 Author: avg Date: Wed Jul 13 09:23:02 2016 New Revision: 302729 URL: https://svnweb.freebsd.org/changeset/base/302729 Log: MFC r301873: l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 13 09:21:40 2016 (r302728) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 13 09:23:02 2016 (r302729) @@ -2332,6 +2332,7 @@ arc_buf_l2_cdata_free(arc_buf_hdr_t *hdr ASSERT3P(hdr->b_l1hdr.b_tmp_cdata, ==, hdr->b_l1hdr.b_buf->b_data); ASSERT3U(hdr->b_l2hdr.b_compress, ==, ZIO_COMPRESS_OFF); + hdr->b_l1hdr.b_tmp_cdata = NULL; return; } From owner-svn-src-stable@freebsd.org Wed Jul 13 09:26:34 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C6A5B936E9; Wed, 13 Jul 2016 09:26:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F521F80; Wed, 13 Jul 2016 09:26:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9QX4f088504; Wed, 13 Jul 2016 09:26:33 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9QX0Z088503; Wed, 13 Jul 2016 09:26:33 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130926.u6D9QX0Z088503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302730 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:26:34 -0000 Author: avg Date: Wed Jul 13 09:26:33 2016 New Revision: 302730 URL: https://svnweb.freebsd.org/changeset/base/302730 Log: MFC r300145: add vop_print methods to vnode operatios of various zfsctl node types Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:23:02 2016 (r302729) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:26:33 2016 (r302730) @@ -294,6 +294,22 @@ zfsctl_root(znode_t *zp) return (zp->z_zfsvfs->z_ctldir); } +static int +zfsctl_common_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + gfs_file_t *fp = vp->v_data; + + printf(" parent = %p\n", fp->gfs_parent); + printf(" type = %d\n", fp->gfs_type); + printf(" index = %d\n", fp->gfs_index); + printf(" ino = %ju\n", (uintmax_t)fp->gfs_ino); + return (0); +} + /* * Common open routine. Disallow any write access. */ @@ -548,6 +564,17 @@ zfsctl_root_lookup(vnode_t *dvp, char *n return (err); } +static int +zfsctl_root_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + printf(" .zfs node\n"); + zfsctl_common_print(ap); + return (0); +} + #ifdef illumos static int zfsctl_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, @@ -641,6 +668,7 @@ static struct vop_vector zfsctl_ops_root .vop_pathconf = zfsctl_pathconf, #endif .vop_fid = zfsctl_common_fid, + .vop_print = zfsctl_root_print, }; /* @@ -1374,6 +1402,32 @@ zfsctl_snapdir_inactive(ap) return (0); } +static int +zfsctl_shares_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + printf(" .zfs/shares node\n"); + zfsctl_common_print(ap); + return (0); +} + +static int +zfsctl_snapdir_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + zfsctl_snapdir_t *sdp = vp->v_data; + + printf(" .zfs/snapshot node\n"); + printf(" number of children = %lu\n", avl_numnodes(&sdp->sd_snaps)); + zfsctl_common_print(ap); + return (0); +} + #ifdef illumos static const fs_operation_def_t zfsctl_tops_snapdir[] = { { VOPNAME_OPEN, { .vop_open = zfsctl_common_open } }, @@ -1419,6 +1473,7 @@ static struct vop_vector zfsctl_ops_snap .vop_inactive = zfsctl_snapdir_inactive, .vop_reclaim = zfsctl_common_reclaim, .vop_fid = zfsctl_common_fid, + .vop_print = zfsctl_snapdir_print, }; static struct vop_vector zfsctl_ops_shares = { @@ -1433,6 +1488,7 @@ static struct vop_vector zfsctl_ops_shar .vop_inactive = VOP_NULL, .vop_reclaim = gfs_vop_reclaim, .vop_fid = zfsctl_shares_fid, + .vop_print = zfsctl_shares_print, }; #endif /* illumos */ @@ -1653,6 +1709,21 @@ zfsctl_snapshot_vptocnp(struct vop_vptoc return (error); } +static int +zfsctl_snaphot_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + zfsctl_node_t *zcp = vp->v_data; + + printf(" .zfs/snapshot/ node\n"); + printf(" id = %ju\n", (uintmax_t)zcp->zc_id); + zfsctl_common_print(ap); + return (0); +} + /* * These VP's should never see the light of day. They should always * be covered. @@ -1665,6 +1736,7 @@ static struct vop_vector zfsctl_ops_snap .vop_getattr = zfsctl_snapshot_getattr, .vop_fid = zfsctl_snapshot_fid, .vop_vptocnp = zfsctl_snapshot_vptocnp, + .vop_print = zfsctl_snaphot_print, }; int From owner-svn-src-stable@freebsd.org Wed Jul 13 09:35:44 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60B63B93D38; Wed, 13 Jul 2016 09:35:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16C491A25; Wed, 13 Jul 2016 09:35:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9ZhpS092172; Wed, 13 Jul 2016 09:35:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9Zhnd092171; Wed, 13 Jul 2016 09:35:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130935.u6D9Zhnd092171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302732 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:35:44 -0000 Author: avg Date: Wed Jul 13 09:35:43 2016 New Revision: 302732 URL: https://svnweb.freebsd.org/changeset/base/302732 Log: MFC r299906,301870: add zfs_vptocnp with special handling for snapshots under .zfs Note that the changed is adjusted for the lack of LK_VNHELD in this branch. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:28:46 2016 (r302731) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:35:43 2016 (r302732) @@ -7202,6 +7202,53 @@ zfs_freebsd_aclcheck(ap) return (EOPNOTSUPP); } +static int +zfs_vptocnp(struct vop_vptocnp_args *ap) +{ + vnode_t *covered_vp; + vnode_t *vp = ap->a_vp;; + zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; + znode_t *zp = VTOZ(vp); + uint64_t parent; + int ltype; + int error; + + ZFS_ENTER(zfsvfs); + ZFS_VERIFY_ZP(zp); + + /* + * If we are a snapshot mounted under .zfs, run the operation + * on the covered vnode. + */ + if ((error = sa_lookup(zp->z_sa_hdl, + SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0) { + ZFS_EXIT(zfsvfs); + return (error); + } + + if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) { + ZFS_EXIT(zfsvfs); + return (vop_stdvptocnp(ap)); + } + ZFS_EXIT(zfsvfs); + + covered_vp = vp->v_mount->mnt_vnodecovered; + vhold(covered_vp); + ltype = VOP_ISLOCKED(vp); + VOP_UNLOCK(vp, 0); + error = vget(covered_vp, LK_EXCLUSIVE, curthread); + vdrop(covered_vp); + if (error == 0) { + error = VOP_VPTOCNP(covered_vp, ap->a_vpp, ap->a_cred, + ap->a_buf, ap->a_buflen); + vput(covered_vp); + } + vn_lock(vp, ltype | LK_RETRY); + if ((vp->v_iflag & VI_DOOMED) != 0) + error = SET_ERROR(ENOENT); + return (error); +} + struct vop_vector zfs_vnodeops; struct vop_vector zfs_fifoops; struct vop_vector zfs_shareops; @@ -7247,6 +7294,7 @@ struct vop_vector zfs_vnodeops = { .vop_aclcheck = zfs_freebsd_aclcheck, .vop_getpages = zfs_freebsd_getpages, .vop_putpages = zfs_freebsd_putpages, + .vop_vptocnp = zfs_vptocnp, }; struct vop_vector zfs_fifoops = { From owner-svn-src-stable@freebsd.org Wed Jul 13 09:37:52 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2365BB9704C; Wed, 13 Jul 2016 09:37:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0B991D70; Wed, 13 Jul 2016 09:37:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9bpIh092330; Wed, 13 Jul 2016 09:37:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9bp1f092329; Wed, 13 Jul 2016 09:37:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130937.u6D9bp1f092329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302734 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:37:52 -0000 Author: avg Date: Wed Jul 13 09:37:50 2016 New Revision: 302734 URL: https://svnweb.freebsd.org/changeset/base/302734 Log: MFC r299906,301870: add zfs_vptocnp with special handling for snapshots under .zfs Note that the change is adjusted for the lack of LK_VNHELD in this branch. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:36:46 2016 (r302733) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 13 09:37:50 2016 (r302734) @@ -7036,6 +7036,53 @@ zfs_freebsd_aclcheck(ap) return (EOPNOTSUPP); } +static int +zfs_vptocnp(struct vop_vptocnp_args *ap) +{ + vnode_t *covered_vp; + vnode_t *vp = ap->a_vp;; + zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; + znode_t *zp = VTOZ(vp); + uint64_t parent; + int ltype; + int error; + + ZFS_ENTER(zfsvfs); + ZFS_VERIFY_ZP(zp); + + /* + * If we are a snapshot mounted under .zfs, run the operation + * on the covered vnode. + */ + if ((error = sa_lookup(zp->z_sa_hdl, + SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0) { + ZFS_EXIT(zfsvfs); + return (error); + } + + if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) { + ZFS_EXIT(zfsvfs); + return (vop_stdvptocnp(ap)); + } + ZFS_EXIT(zfsvfs); + + covered_vp = vp->v_mount->mnt_vnodecovered; + vhold(covered_vp); + ltype = VOP_ISLOCKED(vp); + VOP_UNLOCK(vp, 0); + error = vget(covered_vp, LK_EXCLUSIVE, curthread); + vdrop(covered_vp); + if (error == 0) { + error = VOP_VPTOCNP(covered_vp, ap->a_vpp, ap->a_cred, + ap->a_buf, ap->a_buflen); + vput(covered_vp); + } + vn_lock(vp, ltype | LK_RETRY); + if ((vp->v_iflag & VI_DOOMED) != 0) + error = SET_ERROR(ENOENT); + return (error); +} + struct vop_vector zfs_vnodeops; struct vop_vector zfs_fifoops; struct vop_vector zfs_shareops; @@ -7081,6 +7128,7 @@ struct vop_vector zfs_vnodeops = { .vop_aclcheck = zfs_freebsd_aclcheck, .vop_getpages = zfs_freebsd_getpages, .vop_putpages = zfs_freebsd_putpages, + .vop_vptocnp = zfs_vptocnp, }; struct vop_vector zfs_fifoops = { From owner-svn-src-stable@freebsd.org Wed Jul 13 09:40:54 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C62D6B971DB; Wed, 13 Jul 2016 09:40:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8465D124D; Wed, 13 Jul 2016 09:40:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9erti094498; Wed, 13 Jul 2016 09:40:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9er1m094496; Wed, 13 Jul 2016 09:40:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130940.u6D9er1m094496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302735 - in stable/10/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:40:54 -0000 Author: avg Date: Wed Jul 13 09:40:53 2016 New Revision: 302735 URL: https://svnweb.freebsd.org/changeset/base/302735 Log: MFC r299902,299938: mount_snapshot: consolidate all error handling Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:37:50 2016 (r302734) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:40:53 2016 (r302735) @@ -121,34 +121,39 @@ mount_snapshot(kthread_t *td, vnode_t ** struct ucred *cr; int error; + ASSERT_VOP_ELOCKED(*vpp, "mount_snapshot"); + + vp = *vpp; + *vpp = NULL; + error = 0; + /* * Be ultra-paranoid about making sure the type and fspath * variables will fit in our mp buffers, including the * terminating NUL. */ if (strlen(fstype) >= MFSNAMELEN || strlen(fspath) >= MNAMELEN) - return (ENAMETOOLONG); - - vfsp = vfs_byname_kld(fstype, td, &error); - if (vfsp == NULL) - return (ENODEV); - - vp = *vpp; - if (vp->v_type != VDIR) - return (ENOTDIR); + error = ENAMETOOLONG; + if (error == 0 && (vfsp = vfs_byname_kld(fstype, td, &error)) == NULL) + error = ENODEV; + if (error == 0 && vp->v_type != VDIR) + error = ENOTDIR; /* * We need vnode lock to protect v_mountedhere and vnode interlock * to protect v_iflag. */ - vn_lock(vp, LK_SHARED | LK_RETRY); - VI_LOCK(vp); - if ((vp->v_iflag & VI_MOUNT) != 0 || vp->v_mountedhere != NULL) { + if (error == 0) { + VI_LOCK(vp); + if ((vp->v_iflag & VI_MOUNT) == 0 && vp->v_mountedhere == NULL) + vp->v_iflag |= VI_MOUNT; + else + error = EBUSY; VI_UNLOCK(vp); - VOP_UNLOCK(vp, 0); - return (EBUSY); } - vp->v_iflag |= VI_MOUNT; - VI_UNLOCK(vp); + if (error != 0) { + vput(vp); + return (error); + } VOP_UNLOCK(vp, 0); /* @@ -198,7 +203,6 @@ mount_snapshot(kthread_t *td, vnode_t ** vfs_unbusy(mp); vfs_freeopts(mp->mnt_optnew); vfs_mount_destroy(mp); - *vpp = NULL; return (error); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:37:50 2016 (r302734) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:40:53 2016 (r302735) @@ -1112,6 +1112,7 @@ domount: (void) snprintf(mountpoint, mountpoint_len, "%s/" ZFS_CTLDIR_NAME "/snapshot/%s", dvp->v_vfsp->mnt_stat.f_mntonname, nm); + VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); err = mount_snapshot(curthread, vpp, "zfs", mountpoint, snapname, 0); kmem_free(mountpoint, mountpoint_len); if (err == 0) { From owner-svn-src-stable@freebsd.org Wed Jul 13 09:41:06 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52907B97228; Wed, 13 Jul 2016 09:41:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F292613B3; Wed, 13 Jul 2016 09:41:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9f5N0095206; Wed, 13 Jul 2016 09:41:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9f4gv095204; Wed, 13 Jul 2016 09:41:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130941.u6D9f4gv095204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302736 - in stable/9/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:41:06 -0000 Author: avg Date: Wed Jul 13 09:41:04 2016 New Revision: 302736 URL: https://svnweb.freebsd.org/changeset/base/302736 Log: MFC r299902,299938: mount_snapshot: consolidate all error handling Modified: stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:40:53 2016 (r302735) +++ stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Wed Jul 13 09:41:04 2016 (r302736) @@ -121,34 +121,39 @@ mount_snapshot(kthread_t *td, vnode_t ** struct ucred *cr; int error; + ASSERT_VOP_ELOCKED(*vpp, "mount_snapshot"); + + vp = *vpp; + *vpp = NULL; + error = 0; + /* * Be ultra-paranoid about making sure the type and fspath * variables will fit in our mp buffers, including the * terminating NUL. */ if (strlen(fstype) >= MFSNAMELEN || strlen(fspath) >= MNAMELEN) - return (ENAMETOOLONG); - - vfsp = vfs_byname_kld(fstype, td, &error); - if (vfsp == NULL) - return (ENODEV); - - vp = *vpp; - if (vp->v_type != VDIR) - return (ENOTDIR); + error = ENAMETOOLONG; + if (error == 0 && (vfsp = vfs_byname_kld(fstype, td, &error)) == NULL) + error = ENODEV; + if (error == 0 && vp->v_type != VDIR) + error = ENOTDIR; /* * We need vnode lock to protect v_mountedhere and vnode interlock * to protect v_iflag. */ - vn_lock(vp, LK_SHARED | LK_RETRY); - VI_LOCK(vp); - if ((vp->v_iflag & VI_MOUNT) != 0 || vp->v_mountedhere != NULL) { + if (error == 0) { + VI_LOCK(vp); + if ((vp->v_iflag & VI_MOUNT) == 0 && vp->v_mountedhere == NULL) + vp->v_iflag |= VI_MOUNT; + else + error = EBUSY; VI_UNLOCK(vp); - VOP_UNLOCK(vp, 0); - return (EBUSY); } - vp->v_iflag |= VI_MOUNT; - VI_UNLOCK(vp); + if (error != 0) { + vput(vp); + return (error); + } VOP_UNLOCK(vp, 0); /* @@ -198,7 +203,6 @@ mount_snapshot(kthread_t *td, vnode_t ** vfs_unbusy(mp); vfs_freeopts(mp->mnt_optnew); vfs_mount_destroy(mp); - *vpp = NULL; return (error); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:40:53 2016 (r302735) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:41:04 2016 (r302736) @@ -1072,6 +1072,7 @@ domount: (void) snprintf(mountpoint, mountpoint_len, "%s/" ZFS_CTLDIR_NAME "/snapshot/%s", dvp->v_vfsp->mnt_stat.f_mntonname, nm); + VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); err = mount_snapshot(curthread, vpp, "zfs", mountpoint, snapname, 0); kmem_free(mountpoint, mountpoint_len); if (err == 0) { From owner-svn-src-stable@freebsd.org Wed Jul 13 09:47:56 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11B3EB9775E; Wed, 13 Jul 2016 09:47:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA1441ADB; Wed, 13 Jul 2016 09:47:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9lsZQ096130; Wed, 13 Jul 2016 09:47:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9lsOv096127; Wed, 13 Jul 2016 09:47:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130947.u6D9lsOv096127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302738 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:47:56 -0000 Author: avg Date: Wed Jul 13 09:47:54 2016 New Revision: 302738 URL: https://svnweb.freebsd.org/changeset/base/302738 Log: MFC r299908,300131,301275: zfs: set VROOT / VV_ROOT consistently and in a single place Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:44:24 2016 (r302737) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:47:54 2016 (r302738) @@ -1053,13 +1053,6 @@ zfsctl_snapdir_lookup(ap) */ VERIFY(zfsctl_snapshot_zname(dvp, nm, MAXNAMELEN, snapname) == 0); goto domount; - } else { - /* - * VROOT was set during the traverse call. We need - * to clear it since we're pretending to be part - * of our parent's vfs. - */ - (*vpp)->v_flag &= ~VROOT; } mutex_exit(&sdp->sd_lock); ZFS_EXIT(zfsvfs); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:44:24 2016 (r302737) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:47:54 2016 (r302738) @@ -1781,11 +1781,8 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t ZFS_EXIT(zfsvfs); - if (error == 0) { + if (error == 0) error = vn_lock(*vpp, flags); - if (error == 0) - (*vpp)->v_vflag |= VV_ROOT; - } if (error != 0) *vpp = NULL; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Jul 13 09:44:24 2016 (r302737) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Jul 13 09:47:54 2016 (r302738) @@ -574,9 +574,10 @@ zfs_znode_sa_init(zfsvfs_t *zfsvfs, znod zp->z_is_sa = (obj_type == DMU_OT_SA) ? B_TRUE : B_FALSE; /* - * Slap on VROOT if we are the root znode + * Slap on VROOT if we are the root znode unless we are the root + * node of a snapshot mounted under .zfs. */ - if (zp->z_id == zfsvfs->z_root) + if (zp->z_id == zfsvfs->z_root && zfsvfs->z_parent == zfsvfs) ZTOV(zp)->v_flag |= VROOT; mutex_exit(&zp->z_lock); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:48:06 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27668B977AE; Wed, 13 Jul 2016 09:48:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C88A41C3E; Wed, 13 Jul 2016 09:48:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9m4Vr096188; Wed, 13 Jul 2016 09:48:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9m4fc096185; Wed, 13 Jul 2016 09:48:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130948.u6D9m4fc096185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302739 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:48:06 -0000 Author: avg Date: Wed Jul 13 09:48:04 2016 New Revision: 302739 URL: https://svnweb.freebsd.org/changeset/base/302739 Log: MFC r299908,300131,301275: zfs: set VROOT / VV_ROOT consistently and in a single place Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:47:54 2016 (r302738) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 09:48:04 2016 (r302739) @@ -1013,13 +1013,6 @@ zfsctl_snapdir_lookup(ap) */ VERIFY(zfsctl_snapshot_zname(dvp, nm, MAXNAMELEN, snapname) == 0); goto domount; - } else { - /* - * VROOT was set during the traverse call. We need - * to clear it since we're pretending to be part - * of our parent's vfs. - */ - (*vpp)->v_flag &= ~VROOT; } mutex_exit(&sdp->sd_lock); ZFS_EXIT(zfsvfs); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:47:54 2016 (r302738) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:48:04 2016 (r302739) @@ -1826,11 +1826,8 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t ZFS_EXIT(zfsvfs); - if (error == 0) { + if (error == 0) error = vn_lock(*vpp, flags); - if (error == 0) - (*vpp)->v_vflag |= VV_ROOT; - } if (error != 0) *vpp = NULL; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Jul 13 09:47:54 2016 (r302738) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Jul 13 09:48:04 2016 (r302739) @@ -572,9 +572,10 @@ zfs_znode_sa_init(zfsvfs_t *zfsvfs, znod zp->z_is_sa = (obj_type == DMU_OT_SA) ? B_TRUE : B_FALSE; /* - * Slap on VROOT if we are the root znode + * Slap on VROOT if we are the root znode unless we are the root + * node of a snapshot mounted under .zfs. */ - if (zp->z_id == zfsvfs->z_root) + if (zp->z_id == zfsvfs->z_root && zfsvfs->z_parent == zfsvfs) ZTOV(zp)->v_flag |= VROOT; mutex_exit(&zp->z_lock); From owner-svn-src-stable@freebsd.org Wed Jul 13 09:50:08 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77166B9792B; Wed, 13 Jul 2016 09:50:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC5E1DF1; Wed, 13 Jul 2016 09:50:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9o7MP096336; Wed, 13 Jul 2016 09:50:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9o7iS096335; Wed, 13 Jul 2016 09:50:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130950.u6D9o7iS096335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302740 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:50:08 -0000 Author: avg Date: Wed Jul 13 09:50:07 2016 New Revision: 302740 URL: https://svnweb.freebsd.org/changeset/base/302740 Log: MFC r301273: zfs_root: fix a potential root vnode reference leak Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:48:04 2016 (r302739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:50:07 2016 (r302740) @@ -1781,11 +1781,13 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t ZFS_EXIT(zfsvfs); - if (error == 0) + if (error == 0) { error = vn_lock(*vpp, flags); - if (error != 0) - *vpp = NULL; - + if (error != 0) { + VN_RELE(*vpp); + *vpp = NULL; + } + } return (error); } From owner-svn-src-stable@freebsd.org Wed Jul 13 09:50:18 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1107B97978; Wed, 13 Jul 2016 09:50:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7925D1F9A; Wed, 13 Jul 2016 09:50:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6D9oHj5096386; Wed, 13 Jul 2016 09:50:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6D9oHc8096385; Wed, 13 Jul 2016 09:50:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607130950.u6D9oHc8096385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 09:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302741 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:50:18 -0000 Author: avg Date: Wed Jul 13 09:50:17 2016 New Revision: 302741 URL: https://svnweb.freebsd.org/changeset/base/302741 Log: MFC r301273: zfs_root: fix a potential root vnode reference leak Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:50:07 2016 (r302740) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:50:17 2016 (r302741) @@ -1826,11 +1826,13 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t ZFS_EXIT(zfsvfs); - if (error == 0) + if (error == 0) { error = vn_lock(*vpp, flags); - if (error != 0) - *vpp = NULL; - + if (error != 0) { + VN_RELE(*vpp); + *vpp = NULL; + } + } return (error); } From owner-svn-src-stable@freebsd.org Wed Jul 13 10:02:40 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AED6BB9309D; Wed, 13 Jul 2016 10:02:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89F171EF6; Wed, 13 Jul 2016 10:02:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DA2d9L003765; Wed, 13 Jul 2016 10:02:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DA2d0q003764; Wed, 13 Jul 2016 10:02:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131002.u6DA2d0q003764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302743 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:02:40 -0000 Author: avg Date: Wed Jul 13 10:02:39 2016 New Revision: 302743 URL: https://svnweb.freebsd.org/changeset/base/302743 Log: MFC r299914: zfsctl_ops_snapshot: remove methods should never be called Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:01:31 2016 (r302742) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:02:39 2016 (r302743) @@ -1569,99 +1569,6 @@ zfsctl_snapshot_reclaim(ap) } static int -zfsctl_traverse_begin(vnode_t **vpp, int lktype) -{ - - VN_HOLD(*vpp); - /* Snapshot should be already mounted, but just in case. */ - if (vn_mountedvfs(*vpp) == NULL) - return (ENOENT); - return (traverse(vpp, lktype)); -} - -static void -zfsctl_traverse_end(vnode_t *vp, int err) -{ - - if (err == 0) - vput(vp); - else - VN_RELE(vp); -} - -static int -zfsctl_snapshot_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; -{ - vnode_t *vp = ap->a_vp; - int err; - - err = zfsctl_traverse_begin(&vp, LK_SHARED | LK_RETRY); - if (err == 0) - err = VOP_GETATTR(vp, ap->a_vap, ap->a_cred); - zfsctl_traverse_end(vp, err); - return (err); -} - -static int -zfsctl_snapshot_fid(ap) - struct vop_fid_args /* { - struct vnode *a_vp; - struct fid *a_fid; - } */ *ap; -{ - vnode_t *vp = ap->a_vp; - int err; - - err = zfsctl_traverse_begin(&vp, LK_SHARED | LK_RETRY); - if (err == 0) - err = VOP_VPTOFH(vp, (void *)ap->a_fid); - zfsctl_traverse_end(vp, err); - return (err); -} - -static int -zfsctl_snapshot_lookup(ap) - struct vop_lookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; -{ - vnode_t *dvp = ap->a_dvp; - vnode_t **vpp = ap->a_vpp; - struct componentname *cnp = ap->a_cnp; - cred_t *cr = ap->a_cnp->cn_cred; - zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; - int error; - - if (cnp->cn_namelen != 2 || cnp->cn_nameptr[0] != '.' || - cnp->cn_nameptr[1] != '.') { - return (ENOENT); - } - - ASSERT(dvp->v_type == VDIR); - ASSERT(zfsvfs->z_ctldir != NULL); - - error = zfsctl_root_lookup(zfsvfs->z_ctldir, "snapshot", vpp, - NULL, 0, NULL, cr, NULL, NULL, NULL); - if (error == 0) { - int ltype = VOP_ISLOCKED(dvp); - VN_HOLD(*vpp); - VOP_UNLOCK(dvp, 0); - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); - VN_RELE(*vpp); - vn_lock(dvp, ltype | LK_RETRY); - } - - return (error); -} - -static int zfsctl_snapshot_vptocnp(struct vop_vptocnp_args *ap) { zfsvfs_t *zfsvfs = ap->a_vp->v_vfsp->vfs_data; @@ -1725,10 +1632,7 @@ zfsctl_snaphot_print(ap) static struct vop_vector zfsctl_ops_snapshot = { .vop_default = &default_vnodeops, .vop_inactive = VOP_NULL, - .vop_lookup = zfsctl_snapshot_lookup, .vop_reclaim = zfsctl_snapshot_reclaim, - .vop_getattr = zfsctl_snapshot_getattr, - .vop_fid = zfsctl_snapshot_fid, .vop_vptocnp = zfsctl_snapshot_vptocnp, .vop_print = zfsctl_snaphot_print, }; From owner-svn-src-stable@freebsd.org Wed Jul 13 10:06:18 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7727BB932E2; Wed, 13 Jul 2016 10:06:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39614157D; Wed, 13 Jul 2016 10:06:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DA6HFU004116; Wed, 13 Jul 2016 10:06:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DA6HNc004115; Wed, 13 Jul 2016 10:06:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131006.u6DA6HNc004115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302745 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:06:18 -0000 Author: avg Date: Wed Jul 13 10:06:17 2016 New Revision: 302745 URL: https://svnweb.freebsd.org/changeset/base/302745 Log: MFC r299914: zfsctl_ops_snapshot: remove methods should never be called Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:03:14 2016 (r302744) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:06:17 2016 (r302745) @@ -1497,92 +1497,6 @@ end: } static int -zfsctl_traverse_begin(vnode_t **vpp, int lktype) -{ - - VN_HOLD(*vpp); - /* Snapshot should be already mounted, but just in case. */ - if (vn_mountedvfs(*vpp) == NULL) - return (ENOENT); - return (traverse(vpp, lktype)); -} - -static void -zfsctl_traverse_end(vnode_t *vp, int err) -{ - - if (err == 0) - vput(vp); - else - VN_RELE(vp); -} - -static int -zfsctl_snapshot_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; -{ - vnode_t *vp = ap->a_vp; - int err; - - err = zfsctl_traverse_begin(&vp, LK_SHARED | LK_RETRY); - if (err == 0) - err = VOP_GETATTR(vp, ap->a_vap, ap->a_cred); - zfsctl_traverse_end(vp, err); - return (err); -} - -static int -zfsctl_snapshot_fid(ap) - struct vop_fid_args /* { - struct vnode *a_vp; - struct fid *a_fid; - } */ *ap; -{ - vnode_t *vp = ap->a_vp; - int err; - - err = zfsctl_traverse_begin(&vp, LK_SHARED | LK_RETRY); - if (err == 0) - err = VOP_VPTOFH(vp, (void *)ap->a_fid); - zfsctl_traverse_end(vp, err); - return (err); -} - -static int -zfsctl_snapshot_lookup(ap) - struct vop_lookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; -{ - vnode_t *dvp = ap->a_dvp; - vnode_t **vpp = ap->a_vpp; - struct componentname *cnp = ap->a_cnp; - cred_t *cr = ap->a_cnp->cn_cred; - zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; - int error; - - if (cnp->cn_namelen != 2 || cnp->cn_nameptr[0] != '.' || - cnp->cn_nameptr[1] != '.') { - return (ENOENT); - } - - ASSERT(dvp->v_type == VDIR); - ASSERT(zfsvfs->z_ctldir != NULL); - - error = zfsctl_root_lookup(zfsvfs->z_ctldir, "snapshot", vpp, - NULL, 0, NULL, cr, NULL, NULL, NULL); - if (error == 0) - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); - return (error); -} - -static int zfsctl_snapshot_vptocnp(struct vop_vptocnp_args *ap) { zfsvfs_t *zfsvfs = ap->a_vp->v_vfsp->vfs_data; @@ -1631,10 +1545,7 @@ zfsctl_snapshot_vptocnp(struct vop_vptoc static struct vop_vector zfsctl_ops_snapshot = { .vop_default = &default_vnodeops, .vop_inactive = zfsctl_snapshot_inactive, - .vop_lookup = zfsctl_snapshot_lookup, .vop_reclaim = zfsctl_common_reclaim, - .vop_getattr = zfsctl_snapshot_getattr, - .vop_fid = zfsctl_snapshot_fid, .vop_vptocnp = zfsctl_snapshot_vptocnp, }; From owner-svn-src-stable@freebsd.org Wed Jul 13 10:10:06 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F7EFB93519; Wed, 13 Jul 2016 10:10:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 416CD1AE4; Wed, 13 Jul 2016 10:10:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAA5Tm004330; Wed, 13 Jul 2016 10:10:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAA5Bj004328; Wed, 13 Jul 2016 10:10:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131010.u6DAA5Bj004328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302746 - in stable/10/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:10:06 -0000 Author: avg Date: Wed Jul 13 10:10:05 2016 New Revision: 302746 URL: https://svnweb.freebsd.org/changeset/base/302746 Log: MFC r299940: fix a vnode reference leak caused by illumos compat traverse() Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Wed Jul 13 10:06:17 2016 (r302745) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Wed Jul 13 10:10:05 2016 (r302746) @@ -89,13 +89,14 @@ traverse(vnode_t **cvpp, int lktype) if (vfsp == NULL) break; error = vfs_busy(vfsp, 0); + /* * tvp is NULL for *cvpp vnode, which we can't unlock. - * At least some callers expect the reference to be - * maintained to the original *cvpp */ if (tvp != NULL) vput(cvp); + else + vrele(cvp); if (error) return (error); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:06:17 2016 (r302745) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:10:05 2016 (r302746) @@ -1044,7 +1044,6 @@ zfsctl_snapdir_lookup(ap) VN_HOLD(*vpp); err = traverse(vpp, LK_EXCLUSIVE | LK_RETRY); if (err != 0) { - VN_RELE(*vpp); *vpp = NULL; } else if (*vpp == sep->se_root) { /* @@ -1675,16 +1674,15 @@ zfsctl_lookup_objset(vfs_t *vfsp, uint64 */ error = traverse(&vp, LK_SHARED | LK_RETRY); if (error == 0) { - if (vp == sep->se_root) + if (vp == sep->se_root) { + VN_RELE(vp); /* release covered vp */ error = SET_ERROR(EINVAL); - else + } else { *zfsvfsp = VTOZ(vp)->z_zfsvfs; + VN_URELE(vp); /* put snapshot's root vp */ + } } mutex_exit(&sdp->sd_lock); - if (error == 0) - VN_URELE(vp); - else - VN_RELE(vp); } else { error = SET_ERROR(EINVAL); mutex_exit(&sdp->sd_lock); From owner-svn-src-stable@freebsd.org Wed Jul 13 10:10:22 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E879FB935A9; Wed, 13 Jul 2016 10:10:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FF9C1C4E; Wed, 13 Jul 2016 10:10:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAALmS004393; Wed, 13 Jul 2016 10:10:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAALuW004391; Wed, 13 Jul 2016 10:10:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131010.u6DAALuW004391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302747 - in stable/9/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:10:23 -0000 Author: avg Date: Wed Jul 13 10:10:21 2016 New Revision: 302747 URL: https://svnweb.freebsd.org/changeset/base/302747 Log: MFC r299940: fix a vnode reference leak caused by illumos compat traverse() Modified: stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Wed Jul 13 10:10:05 2016 (r302746) +++ stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Wed Jul 13 10:10:21 2016 (r302747) @@ -89,6 +89,7 @@ traverse(vnode_t **cvpp, int lktype) if (vfsp == NULL) break; error = vfs_busy(vfsp, 0); + /* * tvp is NULL for *cvpp vnode, which we can't unlock. */ Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:10:05 2016 (r302746) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:10:21 2016 (r302747) @@ -1004,7 +1004,6 @@ zfsctl_snapdir_lookup(ap) VN_HOLD(*vpp); err = traverse(vpp, LK_EXCLUSIVE | LK_RETRY); if (err != 0) { - VN_RELE(*vpp); *vpp = NULL; } else if (*vpp == sep->se_root) { /* @@ -1587,16 +1586,15 @@ zfsctl_lookup_objset(vfs_t *vfsp, uint64 */ error = traverse(&vp, LK_SHARED | LK_RETRY); if (error == 0) { - if (vp == sep->se_root) + if (vp == sep->se_root) { + VN_RELE(vp); /* release covered vp */ error = SET_ERROR(EINVAL); - else + } else { *zfsvfsp = VTOZ(vp)->z_zfsvfs; + VN_URELE(vp); /* put snapshot's root vp */ + } } mutex_exit(&sdp->sd_lock); - if (error == 0) - VN_URELE(vp); - else - VN_RELE(vp); } else { error = SET_ERROR(EINVAL); mutex_exit(&sdp->sd_lock); From owner-svn-src-stable@freebsd.org Wed Jul 13 10:11:49 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 863A7B93709; Wed, 13 Jul 2016 10:11:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 557AD1EE5; Wed, 13 Jul 2016 10:11:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DABm8I007165; Wed, 13 Jul 2016 10:11:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DABmvf007164; Wed, 13 Jul 2016 10:11:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131011.u6DABmvf007164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302748 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:11:49 -0000 Author: avg Date: Wed Jul 13 10:11:48 2016 New Revision: 302748 URL: https://svnweb.freebsd.org/changeset/base/302748 Log: MFC r299945: avoid deadlock between zfsctl_snapdir_lookup and zfsctl_snapshot_reclaim Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:10:21 2016 (r302747) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:11:48 2016 (r302748) @@ -1037,6 +1037,7 @@ zfsctl_snapdir_lookup(ap) #endif } +relookup: mutex_enter(&sdp->sd_lock); search.se_name = (char *)nm; if ((sep = avl_find(&sdp->sd_snaps, &search, &where)) != NULL) { @@ -1104,7 +1105,16 @@ domount: (void) snprintf(mountpoint, mountpoint_len, "%s/" ZFS_CTLDIR_NAME "/snapshot/%s", dvp->v_vfsp->mnt_stat.f_mntonname, nm); - VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); + mutex_exit(&sdp->sd_lock); + + /* + * The vnode may get reclaimed between dropping sd_lock and + * getting the vnode lock. + * */ + err = vn_lock(*vpp, LK_EXCLUSIVE); + if (err == ENOENT) + goto relookup; + VERIFY0(err); err = mount_snapshot(curthread, vpp, "zfs", mountpoint, snapname, 0); kmem_free(mountpoint, mountpoint_len); if (err == 0) { @@ -1118,7 +1128,6 @@ domount: ASSERT(VTOZ(*vpp)->z_zfsvfs != zfsvfs); VTOZ(*vpp)->z_zfsvfs->z_parent = zfsvfs; } - mutex_exit(&sdp->sd_lock); ZFS_EXIT(zfsvfs); #ifdef illumos From owner-svn-src-stable@freebsd.org Wed Jul 13 10:11:59 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13972B9374B; Wed, 13 Jul 2016 10:11:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3E481279; Wed, 13 Jul 2016 10:11:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DABvn6007215; Wed, 13 Jul 2016 10:11:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DABvAM007214; Wed, 13 Jul 2016 10:11:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131011.u6DABvAM007214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302749 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:11:59 -0000 Author: avg Date: Wed Jul 13 10:11:57 2016 New Revision: 302749 URL: https://svnweb.freebsd.org/changeset/base/302749 Log: MFC r299945: avoid deadlock between zfsctl_snapdir_lookup and zfsctl_snapshot_reclaim Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:11:48 2016 (r302748) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:11:57 2016 (r302749) @@ -997,6 +997,7 @@ zfsctl_snapdir_lookup(ap) #endif } +relookup: mutex_enter(&sdp->sd_lock); search.se_name = (char *)nm; if ((sep = avl_find(&sdp->sd_snaps, &search, &where)) != NULL) { @@ -1064,7 +1065,16 @@ domount: (void) snprintf(mountpoint, mountpoint_len, "%s/" ZFS_CTLDIR_NAME "/snapshot/%s", dvp->v_vfsp->mnt_stat.f_mntonname, nm); - VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); + mutex_exit(&sdp->sd_lock); + + /* + * The vnode may get reclaimed between dropping sd_lock and + * getting the vnode lock. + * */ + err = vn_lock(*vpp, LK_EXCLUSIVE); + if (err == ENOENT) + goto relookup; + VERIFY0(err); err = mount_snapshot(curthread, vpp, "zfs", mountpoint, snapname, 0); kmem_free(mountpoint, mountpoint_len); if (err == 0) { @@ -1078,7 +1088,6 @@ domount: ASSERT(VTOZ(*vpp)->z_zfsvfs != zfsvfs); VTOZ(*vpp)->z_zfsvfs->z_parent = zfsvfs; } - mutex_exit(&sdp->sd_lock); ZFS_EXIT(zfsvfs); #ifdef illumos From owner-svn-src-stable@freebsd.org Wed Jul 13 10:13:30 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 012FBB938E1; Wed, 13 Jul 2016 10:13:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC7B914B4; Wed, 13 Jul 2016 10:13:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DADSFu007979; Wed, 13 Jul 2016 10:13:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DADSnv007977; Wed, 13 Jul 2016 10:13:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131013.u6DADSnv007977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302750 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs: . zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:13:30 -0000 Author: avg Date: Wed Jul 13 10:13:28 2016 New Revision: 302750 URL: https://svnweb.freebsd.org/changeset/base/302750 Log: MFC r299946: gfs_lookup_dot() does not have to acquire any locks Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:11:57 2016 (r302749) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:13:28 2016 (r302750) @@ -442,19 +442,9 @@ gfs_lookup_dot(vnode_t **vpp, vnode_t *d *vpp = dvp; return (0); } else if (strcmp(nm, "..") == 0) { - if (pvp == NULL) { - ASSERT(dvp->v_flag & VROOT); - VN_HOLD(dvp); - *vpp = dvp; - ASSERT_VOP_ELOCKED(dvp, "gfs_lookup_dot: non-locked dvp"); - } else { - ltype = VOP_ISLOCKED(dvp); - VOP_UNLOCK(dvp, 0); - VN_HOLD(pvp); - *vpp = pvp; - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); - vn_lock(dvp, ltype | LK_RETRY); - } + ASSERT(pvp != NULL); + VN_HOLD(pvp); + *vpp = pvp; return (0); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:11:57 2016 (r302749) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:13:28 2016 (r302750) @@ -1013,6 +1013,11 @@ zfsctl_snapdir_lookup(ap) ZFS_ENTER(zfsvfs); if (gfs_lookup_dot(vpp, dvp, zfsvfs->z_ctldir, nm) == 0) { + if (nm[0] == '.' && nm[1] == '.' && nm[2] =='\0') { + VOP_UNLOCK(dvp, 0); + VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); + VERIFY0(vn_lock(dvp, LK_EXCLUSIVE)); + } ZFS_EXIT(zfsvfs); return (0); } @@ -1169,6 +1174,11 @@ zfsctl_shares_lookup(ap) strlcpy(nm, cnp->cn_nameptr, cnp->cn_namelen + 1); if (gfs_lookup_dot(vpp, dvp, zfsvfs->z_ctldir, nm) == 0) { + if (nm[0] == '.' && nm[1] == '.' && nm[2] =='\0') { + VOP_UNLOCK(dvp, 0); + VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); + VERIFY0(vn_lock(dvp, LK_EXCLUSIVE)); + } ZFS_EXIT(zfsvfs); return (0); } @@ -1534,7 +1544,6 @@ zfsctl_snapshot_reclaim(ap) VERIFY(gfs_dir_lookup(vp, "..", &dvp, cr, 0, NULL, NULL) == 0); sdp = dvp->v_data; - VOP_UNLOCK(dvp, 0); /* this may already have been unmounted */ if (sdp == NULL) { VN_RELE(dvp); From owner-svn-src-stable@freebsd.org Wed Jul 13 10:14:37 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF5F9B93973; Wed, 13 Jul 2016 10:14:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78873164A; Wed, 13 Jul 2016 10:14:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAEaWJ008062; Wed, 13 Jul 2016 10:14:36 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAEaR5008060; Wed, 13 Jul 2016 10:14:36 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131014.u6DAEaR5008060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302751 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs: . zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:14:37 -0000 Author: avg Date: Wed Jul 13 10:14:36 2016 New Revision: 302751 URL: https://svnweb.freebsd.org/changeset/base/302751 Log: MFC r299946: gfs_lookup_dot() does not have to acquire any locks Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:13:28 2016 (r302750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:14:36 2016 (r302751) @@ -440,14 +440,9 @@ gfs_lookup_dot(vnode_t **vpp, vnode_t *d *vpp = dvp; return (0); } else if (strcmp(nm, "..") == 0) { - if (pvp == NULL) { - ASSERT(dvp->v_flag & VROOT); - VN_HOLD(dvp); - *vpp = dvp; - } else { - VN_HOLD(pvp); - *vpp = pvp; - } + ASSERT(pvp != NULL); + VN_HOLD(pvp); + *vpp = pvp; vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); return (0); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:13:28 2016 (r302750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:14:36 2016 (r302751) @@ -973,6 +973,11 @@ zfsctl_snapdir_lookup(ap) ZFS_ENTER(zfsvfs); if (gfs_lookup_dot(vpp, dvp, zfsvfs->z_ctldir, nm) == 0) { + if (nm[0] == '.' && nm[1] == '.' && nm[2] =='\0') { + VOP_UNLOCK(dvp, 0); + VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); + VERIFY0(vn_lock(dvp, LK_EXCLUSIVE)); + } ZFS_EXIT(zfsvfs); return (0); } @@ -1129,6 +1134,11 @@ zfsctl_shares_lookup(ap) strlcpy(nm, cnp->cn_nameptr, cnp->cn_namelen + 1); if (gfs_lookup_dot(vpp, dvp, zfsvfs->z_ctldir, nm) == 0) { + if (nm[0] == '.' && nm[1] == '.' && nm[2] =='\0') { + VOP_UNLOCK(dvp, 0); + VERIFY0(vn_lock(*vpp, LK_EXCLUSIVE)); + VERIFY0(vn_lock(dvp, LK_EXCLUSIVE)); + } ZFS_EXIT(zfsvfs); return (0); } @@ -1467,7 +1477,6 @@ zfsctl_snapshot_inactive(ap) VERIFY(gfs_dir_lookup(vp, "..", &dvp, cr, 0, NULL, NULL) == 0); sdp = dvp->v_data; - VOP_UNLOCK(dvp, 0); if (!(locked = MUTEX_HELD(&sdp->sd_lock))) mutex_enter(&sdp->sd_lock); From owner-svn-src-stable@freebsd.org Wed Jul 13 10:16:47 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4426DB93B54; Wed, 13 Jul 2016 10:16:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE6FB1898; Wed, 13 Jul 2016 10:16:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAGkYm008204; Wed, 13 Jul 2016 10:16:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAGkal008203; Wed, 13 Jul 2016 10:16:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131016.u6DAGkal008203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302752 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:16:47 -0000 Author: avg Date: Wed Jul 13 10:16:45 2016 New Revision: 302752 URL: https://svnweb.freebsd.org/changeset/base/302752 Log: MFC r299947: fix locking in zfsctl_root_lookup Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:14:36 2016 (r302751) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:16:45 2016 (r302752) @@ -551,9 +551,20 @@ zfsctl_root_lookup(vnode_t *dvp, char *n ZFS_ENTER(zfsvfs); if (strcmp(nm, "..") == 0) { +#ifdef illumos err = VFS_ROOT(dvp->v_vfsp, LK_EXCLUSIVE, vpp); +#else + /* + * NB: can not use VFS_ROOT here as it would acquire + * the vnode lock of the parent (root) vnode while + * holding the child's (.zfs) lock. + */ + znode_t *rootzp; + + err = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); if (err == 0) - VOP_UNLOCK(*vpp, 0); + *vpp = ZTOV(rootzp); +#endif } else { err = gfs_vop_lookup(dvp, nm, vpp, pnp, flags, rdir, cr, ct, direntflags, realpnp); @@ -626,10 +637,10 @@ zfsctl_freebsd_root_lookup(ap) vnode_t **vpp = ap->a_vpp; cred_t *cr = ap->a_cnp->cn_cred; int flags = ap->a_cnp->cn_flags; + int lkflags = ap->a_cnp->cn_lkflags; int nameiop = ap->a_cnp->cn_nameiop; char nm[NAME_MAX + 1]; int err; - int ltype; if ((flags & ISLASTCN) && (nameiop == RENAME || nameiop == CREATE)) return (EOPNOTSUPP); @@ -638,16 +649,15 @@ zfsctl_freebsd_root_lookup(ap) strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { - ltype = VOP_ISLOCKED(dvp); - if (flags & ISDOTDOT) { - VN_HOLD(*vpp); + if (flags & ISDOTDOT) VOP_UNLOCK(dvp, 0); + err = vn_lock(*vpp, lkflags); + if (err != 0) { + vrele(*vpp); + *vpp = NULL; } - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); - if (flags & ISDOTDOT) { - VN_RELE(*vpp); - vn_lock(dvp, ltype| LK_RETRY); - } + if (flags & ISDOTDOT) + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } return (err); From owner-svn-src-stable@freebsd.org Wed Jul 13 10:18:30 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C74FDB93BE4; Wed, 13 Jul 2016 10:18:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7423D1A42; Wed, 13 Jul 2016 10:18:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAITPN008300; Wed, 13 Jul 2016 10:18:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAIT7W008299; Wed, 13 Jul 2016 10:18:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131018.u6DAIT7W008299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302753 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:18:30 -0000 Author: avg Date: Wed Jul 13 10:18:29 2016 New Revision: 302753 URL: https://svnweb.freebsd.org/changeset/base/302753 Log: MFC r299946: gfs_lookup_dot() does not have to acquire any locks Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:16:45 2016 (r302752) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:18:29 2016 (r302753) @@ -534,9 +534,20 @@ zfsctl_root_lookup(vnode_t *dvp, char *n ZFS_ENTER(zfsvfs); if (strcmp(nm, "..") == 0) { +#ifdef illumos err = VFS_ROOT(dvp->v_vfsp, LK_EXCLUSIVE, vpp); +#else + /* + * NB: can not use VFS_ROOT here as it would acquire + * the vnode lock of the parent (root) vnode while + * holding the child's (.zfs) lock. + */ + znode_t *rootzp; + + err = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); if (err == 0) - VOP_UNLOCK(*vpp, 0); + *vpp = ZTOV(rootzp); +#endif } else { err = gfs_vop_lookup(dvp, nm, vpp, pnp, flags, rdir, cr, ct, direntflags, realpnp); @@ -598,6 +609,7 @@ zfsctl_freebsd_root_lookup(ap) vnode_t **vpp = ap->a_vpp; cred_t *cr = ap->a_cnp->cn_cred; int flags = ap->a_cnp->cn_flags; + int lkflags = ap->a_cnp->cn_lkflags; int nameiop = ap->a_cnp->cn_nameiop; char nm[NAME_MAX + 1]; int err; @@ -609,8 +621,18 @@ zfsctl_freebsd_root_lookup(ap) strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); - if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); + if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { + if (flags & ISDOTDOT) + VOP_UNLOCK(dvp, 0); + err = vn_lock(*vpp, lkflags); + if (err != 0) { + vrele(*vpp); + *vpp = NULL; + } + if (flags & ISDOTDOT) + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } + return (err); } From owner-svn-src-stable@freebsd.org Wed Jul 13 10:26:39 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB9AFB97024; Wed, 13 Jul 2016 10:26:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6390611A7; Wed, 13 Jul 2016 10:26:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAQcLH011958; Wed, 13 Jul 2016 10:26:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAQc2O011957; Wed, 13 Jul 2016 10:26:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131026.u6DAQc2O011957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302754 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:26:39 -0000 Author: avg Date: Wed Jul 13 10:26:38 2016 New Revision: 302754 URL: https://svnweb.freebsd.org/changeset/base/302754 Log: revert r302753 because of incorrect commit message The change was MFC of r299947 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:18:29 2016 (r302753) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:26:38 2016 (r302754) @@ -534,20 +534,9 @@ zfsctl_root_lookup(vnode_t *dvp, char *n ZFS_ENTER(zfsvfs); if (strcmp(nm, "..") == 0) { -#ifdef illumos err = VFS_ROOT(dvp->v_vfsp, LK_EXCLUSIVE, vpp); -#else - /* - * NB: can not use VFS_ROOT here as it would acquire - * the vnode lock of the parent (root) vnode while - * holding the child's (.zfs) lock. - */ - znode_t *rootzp; - - err = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); if (err == 0) - *vpp = ZTOV(rootzp); -#endif + VOP_UNLOCK(*vpp, 0); } else { err = gfs_vop_lookup(dvp, nm, vpp, pnp, flags, rdir, cr, ct, direntflags, realpnp); @@ -609,7 +598,6 @@ zfsctl_freebsd_root_lookup(ap) vnode_t **vpp = ap->a_vpp; cred_t *cr = ap->a_cnp->cn_cred; int flags = ap->a_cnp->cn_flags; - int lkflags = ap->a_cnp->cn_lkflags; int nameiop = ap->a_cnp->cn_nameiop; char nm[NAME_MAX + 1]; int err; @@ -621,18 +609,8 @@ zfsctl_freebsd_root_lookup(ap) strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); - if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { - if (flags & ISDOTDOT) - VOP_UNLOCK(dvp, 0); - err = vn_lock(*vpp, lkflags); - if (err != 0) { - vrele(*vpp); - *vpp = NULL; - } - if (flags & ISDOTDOT) - vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); - } - + if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) + vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); return (err); } From owner-svn-src-stable@freebsd.org Wed Jul 13 10:30:33 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E64B8B97177; Wed, 13 Jul 2016 10:30:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DDB41443; Wed, 13 Jul 2016 10:30:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAUWEL014316; Wed, 13 Jul 2016 10:30:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAUWwO014314; Wed, 13 Jul 2016 10:30:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131030.u6DAUWwO014314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302755 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:30:34 -0000 Author: avg Date: Wed Jul 13 10:30:32 2016 New Revision: 302755 URL: https://svnweb.freebsd.org/changeset/base/302755 Log: MFC r299947: fix locking in zfsctl_root_lookup Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:26:38 2016 (r302754) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:30:32 2016 (r302755) @@ -534,9 +534,20 @@ zfsctl_root_lookup(vnode_t *dvp, char *n ZFS_ENTER(zfsvfs); if (strcmp(nm, "..") == 0) { +#ifdef illumos err = VFS_ROOT(dvp->v_vfsp, LK_EXCLUSIVE, vpp); +#else + /* + * NB: can not use VFS_ROOT here as it would acquire + * the vnode lock of the parent (root) vnode while + * holding the child's (.zfs) lock. + */ + znode_t *rootzp; + + err = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); if (err == 0) - VOP_UNLOCK(*vpp, 0); + *vpp = ZTOV(rootzp); +#endif } else { err = gfs_vop_lookup(dvp, nm, vpp, pnp, flags, rdir, cr, ct, direntflags, realpnp); @@ -598,6 +609,7 @@ zfsctl_freebsd_root_lookup(ap) vnode_t **vpp = ap->a_vpp; cred_t *cr = ap->a_cnp->cn_cred; int flags = ap->a_cnp->cn_flags; + int lkflags = ap->a_cnp->cn_lkflags; int nameiop = ap->a_cnp->cn_nameiop; char nm[NAME_MAX + 1]; int err; @@ -609,8 +621,18 @@ zfsctl_freebsd_root_lookup(ap) strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); - if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); + if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { + if (flags & ISDOTDOT) + VOP_UNLOCK(dvp, 0); + err = vn_lock(*vpp, lkflags); + if (err != 0) { + vrele(*vpp); + *vpp = NULL; + } + if (flags & ISDOTDOT) + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } + return (err); } From owner-svn-src-stable@freebsd.org Wed Jul 13 10:32:25 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D7B0B972AF; Wed, 13 Jul 2016 10:32:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 443E717D0; Wed, 13 Jul 2016 10:32:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAWOOT015662; Wed, 13 Jul 2016 10:32:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAWOlL015661; Wed, 13 Jul 2016 10:32:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131032.u6DAWOlL015661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302756 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:32:25 -0000 Author: avg Date: Wed Jul 13 10:32:24 2016 New Revision: 302756 URL: https://svnweb.freebsd.org/changeset/base/302756 Log: MFC r299949: try to recycle "snap" vnodes as soon as possible Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:30:32 2016 (r302755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:32:24 2016 (r302756) @@ -1536,17 +1536,28 @@ zfsctl_snapshot_mknode(vnode_t *pvp, uin return (vp); } +static int +zfsctl_snapshot_inactive(ap) + struct vop_inactive_args /* { + struct vnode *a_vp; + struct thread *a_td; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + + vrecycle(vp); + return (0); +} static int zfsctl_snapshot_reclaim(ap) - struct vop_inactive_args /* { + struct vop_reclaim_args /* { struct vnode *a_vp; struct thread *a_td; } */ *ap; { vnode_t *vp = ap->a_vp; cred_t *cr = ap->a_td->td_ucred; - struct vop_reclaim_args iap; zfsctl_snapdir_t *sdp; zfs_snapentry_t *sep, *next; int locked; @@ -1589,8 +1600,7 @@ zfsctl_snapshot_reclaim(ap) * "active". If we lookup the same name again we will end up * creating a new vnode. */ - iap.a_vp = vp; - gfs_vop_reclaim(&iap); + gfs_vop_reclaim(ap); return (0); } @@ -1658,7 +1668,7 @@ zfsctl_snaphot_print(ap) */ static struct vop_vector zfsctl_ops_snapshot = { .vop_default = &default_vnodeops, - .vop_inactive = VOP_NULL, + .vop_inactive = zfsctl_snapshot_inactive, .vop_reclaim = zfsctl_snapshot_reclaim, .vop_vptocnp = zfsctl_snapshot_vptocnp, .vop_print = zfsctl_snaphot_print, From owner-svn-src-stable@freebsd.org Wed Jul 13 10:49:34 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EDA3B976B9; Wed, 13 Jul 2016 10:49:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F22561EEA; Wed, 13 Jul 2016 10:49:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAnXZf019519; Wed, 13 Jul 2016 10:49:33 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAnXxj019518; Wed, 13 Jul 2016 10:49:33 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131049.u6DAnXxj019518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302757 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:49:34 -0000 Author: avg Date: Wed Jul 13 10:49:32 2016 New Revision: 302757 URL: https://svnweb.freebsd.org/changeset/base/302757 Log: fix a mismerge in r302751 This is a direct commit. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:32:24 2016 (r302756) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:49:32 2016 (r302757) @@ -443,7 +443,6 @@ gfs_lookup_dot(vnode_t **vpp, vnode_t *d ASSERT(pvp != NULL); VN_HOLD(pvp); *vpp = pvp; - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); return (0); } From owner-svn-src-stable@freebsd.org Wed Jul 13 10:58:54 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00502B9791F; Wed, 13 Jul 2016 10:58:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADFA914C2; Wed, 13 Jul 2016 10:58:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DAwqse023312; Wed, 13 Jul 2016 10:58:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DAwqoS023309; Wed, 13 Jul 2016 10:58:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131058.u6DAwqoS023309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 10:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302758 - in stable/9/sys/cddl/contrib/opensolaris/uts/common: fs fs/zfs sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 10:58:54 -0000 Author: avg Date: Wed Jul 13 10:58:52 2016 New Revision: 302758 URL: https://svnweb.freebsd.org/changeset/base/302758 Log: Partial MFC r273641: use FreeBSD reclaim for illumos inactive Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/gfs.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:49:32 2016 (r302757) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Wed Jul 13 10:58:52 2016 (r302758) @@ -90,7 +90,7 @@ * gfs_dir_lookup() * gfs_dir_readdir() * - * gfs_vop_inactive() + * gfs_vop_reclaim() * gfs_vop_lookup() * gfs_vop_readdir() * gfs_vop_map() @@ -614,7 +614,7 @@ gfs_root_create_file(size_t size, vfs_t /* * gfs_file_inactive() * - * Called from the VOP_INACTIVE() routine. If necessary, this routine will + * Called from the VOP_RECLAIM() routine. If necessary, this routine will * remove the given vnode from the parent directory and clean up any references * in the VFS layer. * @@ -1213,15 +1213,15 @@ gfs_vop_map(vnode_t *vp, offset_t off, s #endif /* sun */ /* - * gfs_vop_inactive: VOP_INACTIVE() entry point + * gfs_vop_reclaim: VOP_RECLAIM() entry point (solaris' VOP_INACTIVE()) * * Given a vnode that is a GFS file or directory, call gfs_file_inactive() or * gfs_dir_inactive() as necessary, and kmem_free()s associated private data. */ /* ARGSUSED */ int -gfs_vop_inactive(ap) - struct vop_inactive_args /* { +gfs_vop_reclaim(ap) + struct vop_reclaim_args /* { struct vnode *a_vp; struct thread *a_td; } */ *ap; @@ -1234,6 +1234,7 @@ gfs_vop_inactive(ap) else gfs_file_inactive(vp); + vnode_destroy_vobject(vp); VI_LOCK(vp); vp->v_data = NULL; VI_UNLOCK(vp); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:49:32 2016 (r302757) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:58:52 2016 (r302758) @@ -645,8 +645,8 @@ static struct vop_vector zfsctl_ops_root .vop_access = zfsctl_common_access, .vop_readdir = gfs_vop_readdir, .vop_lookup = zfsctl_freebsd_root_lookup, - .vop_inactive = gfs_vop_inactive, - .vop_reclaim = zfsctl_common_reclaim, + .vop_inactive = VOP_NULL, + .vop_reclaim = gfs_vop_reclaim, #ifdef TODO .vop_pathconf = zfsctl_pathconf, #endif @@ -699,7 +699,7 @@ zfsctl_unmount_snap(zfs_snapentry_t *sep * the sd_lock mutex held by our caller. */ ASSERT(svp->v_count == 1); - gfs_vop_inactive(svp, cr, NULL); + gfs_vop_reclaim(svp, cr, NULL); kmem_free(sep->se_name, strlen(sep->se_name) + 1); kmem_free(sep, sizeof (zfs_snapentry_t)); @@ -1451,8 +1451,8 @@ static struct vop_vector zfsctl_ops_shar .vop_access = zfsctl_common_access, .vop_readdir = zfsctl_shares_readdir, .vop_lookup = zfsctl_shares_lookup, - .vop_inactive = gfs_vop_inactive, - .vop_reclaim = zfsctl_common_reclaim, + .vop_inactive = VOP_NULL, + .vop_reclaim = gfs_vop_reclaim, .vop_fid = zfsctl_shares_fid, }; #endif /* !sun */ @@ -1479,8 +1479,9 @@ zfsctl_snapshot_mknode(vnode_t *pvp, uin return (vp); } + static int -zfsctl_snapshot_inactive(ap) +zfsctl_snapshot_reclaim(ap) struct vop_inactive_args /* { struct vnode *a_vp; struct thread *a_td; @@ -1488,18 +1489,19 @@ zfsctl_snapshot_inactive(ap) { vnode_t *vp = ap->a_vp; cred_t *cr = ap->a_td->td_ucred; - struct vop_inactive_args iap; + struct vop_reclaim_args iap; zfsctl_snapdir_t *sdp; zfs_snapentry_t *sep, *next; int locked; vnode_t *dvp; - if (vp->v_count > 0) - goto end; - VERIFY(gfs_dir_lookup(vp, "..", &dvp, cr, 0, NULL, NULL) == 0); sdp = dvp->v_data; - + /* this may already have been unmounted */ + if (sdp == NULL) { + VN_RELE(dvp); + return (0); + } if (!(locked = MUTEX_HELD(&sdp->sd_lock))) mutex_enter(&sdp->sd_lock); @@ -1523,7 +1525,6 @@ zfsctl_snapshot_inactive(ap) mutex_exit(&sdp->sd_lock); VN_RELE(dvp); -end: /* * Dispose of the vnode for the snapshot mount point. * This is safe to do because once this entry has been removed @@ -1532,7 +1533,9 @@ end: * creating a new vnode. */ iap.a_vp = vp; - return (gfs_vop_inactive(&iap)); + gfs_vop_reclaim(&iap); + return (0); + } static int @@ -1583,8 +1586,8 @@ zfsctl_snapshot_vptocnp(struct vop_vptoc */ static struct vop_vector zfsctl_ops_snapshot = { .vop_default = &default_vnodeops, - .vop_inactive = zfsctl_snapshot_inactive, - .vop_reclaim = zfsctl_common_reclaim, + .vop_inactive = VOP_NULL, + .vop_reclaim = zfsctl_snapshot_reclaim, .vop_vptocnp = zfsctl_snapshot_vptocnp, }; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/gfs.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/gfs.h Wed Jul 13 10:49:32 2016 (r302757) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/gfs.h Wed Jul 13 10:58:52 2016 (r302758) @@ -149,7 +149,7 @@ extern int gfs_get_parent_ino(vnode_t *, extern int gfs_lookup_dot(vnode_t **, vnode_t *, vnode_t *, const char *); extern int gfs_vop_readdir(struct vop_readdir_args *); -extern int gfs_vop_inactive(struct vop_inactive_args *); +extern int gfs_vop_reclaim(struct vop_reclaim_args *); #ifdef __cplusplus From owner-svn-src-stable@freebsd.org Wed Jul 13 11:00:45 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57D3EB979AF; Wed, 13 Jul 2016 11:00:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DACC1670; Wed, 13 Jul 2016 11:00:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DB0i2V023472; Wed, 13 Jul 2016 11:00:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DB0ifA023471; Wed, 13 Jul 2016 11:00:44 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131100.u6DB0ifA023471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302759 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:00:45 -0000 Author: avg Date: Wed Jul 13 11:00:44 2016 New Revision: 302759 URL: https://svnweb.freebsd.org/changeset/base/302759 Log: MFC r299949: try to recycle "snap" vnodes as soon as possible Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 10:58:52 2016 (r302758) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:00:44 2016 (r302759) @@ -1479,17 +1479,28 @@ zfsctl_snapshot_mknode(vnode_t *pvp, uin return (vp); } +static int +zfsctl_snapshot_inactive(ap) + struct vop_inactive_args /* { + struct vnode *a_vp; + struct thread *a_td; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + + vrecycle(vp, curthread); + return (0); +} static int zfsctl_snapshot_reclaim(ap) - struct vop_inactive_args /* { + struct vop_reclaim_args /* { struct vnode *a_vp; struct thread *a_td; } */ *ap; { vnode_t *vp = ap->a_vp; cred_t *cr = ap->a_td->td_ucred; - struct vop_reclaim_args iap; zfsctl_snapdir_t *sdp; zfs_snapentry_t *sep, *next; int locked; @@ -1532,8 +1543,7 @@ zfsctl_snapshot_reclaim(ap) * "active". If we lookup the same name again we will end up * creating a new vnode. */ - iap.a_vp = vp; - gfs_vop_reclaim(&iap); + gfs_vop_reclaim(ap); return (0); } @@ -1586,7 +1596,7 @@ zfsctl_snapshot_vptocnp(struct vop_vptoc */ static struct vop_vector zfsctl_ops_snapshot = { .vop_default = &default_vnodeops, - .vop_inactive = VOP_NULL, + .vop_inactive = zfsctl_snapshot_inactive, .vop_reclaim = zfsctl_snapshot_reclaim, .vop_vptocnp = zfsctl_snapshot_vptocnp, }; From owner-svn-src-stable@freebsd.org Wed Jul 13 11:04:03 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D86E2B97B02; Wed, 13 Jul 2016 11:04:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DFBB1A3A; Wed, 13 Jul 2016 11:04:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DB42QY027139; Wed, 13 Jul 2016 11:04:02 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DB4240027138; Wed, 13 Jul 2016 11:04:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131104.u6DB4240027138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302760 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:04:04 -0000 Author: avg Date: Wed Jul 13 11:04:02 2016 New Revision: 302760 URL: https://svnweb.freebsd.org/changeset/base/302760 Log: MFC r299951: do not destroy 'snapdir' when it becomes inactive Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:00:44 2016 (r302759) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:04:02 2016 (r302760) @@ -468,25 +468,6 @@ zfsctl_shares_fid(ap) return (error); } -static int -zfsctl_common_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; -{ - vnode_t *vp = ap->a_vp; - - /* - * Destroy the vm object and flush associated pages. - */ - vnode_destroy_vobject(vp); - VI_LOCK(vp); - vp->v_data = NULL; - VI_UNLOCK(vp); - return (0); -} - /* * .zfs inode namespace * @@ -1395,8 +1376,8 @@ zfsctl_snapdir_getattr(ap) /* ARGSUSED */ static int -zfsctl_snapdir_inactive(ap) - struct vop_inactive_args /* { +zfsctl_snapdir_reclaim(ap) + struct vop_reclaim_args /* { struct vnode *a_vp; struct thread *a_td; } */ *ap; @@ -1405,21 +1386,10 @@ zfsctl_snapdir_inactive(ap) zfsctl_snapdir_t *sdp = vp->v_data; zfs_snapentry_t *sep; - /* - * On forced unmount we have to free snapshots from here. - */ - mutex_enter(&sdp->sd_lock); - while ((sep = avl_first(&sdp->sd_snaps)) != NULL) { - avl_remove(&sdp->sd_snaps, sep); - kmem_free(sep->se_name, strlen(sep->se_name) + 1); - kmem_free(sep, sizeof (zfs_snapentry_t)); - } - mutex_exit(&sdp->sd_lock); - gfs_dir_inactive(vp); ASSERT(avl_numnodes(&sdp->sd_snaps) == 0); mutex_destroy(&sdp->sd_lock); avl_destroy(&sdp->sd_snaps); - kmem_free(sdp, sizeof (zfsctl_snapdir_t)); + gfs_vop_reclaim(ap); return (0); } @@ -1492,8 +1462,8 @@ static struct vop_vector zfsctl_ops_snap .vop_mkdir = zfsctl_freebsd_snapdir_mkdir, .vop_readdir = gfs_vop_readdir, .vop_lookup = zfsctl_snapdir_lookup, - .vop_inactive = zfsctl_snapdir_inactive, - .vop_reclaim = zfsctl_common_reclaim, + .vop_inactive = VOP_NULL, + .vop_reclaim = zfsctl_snapdir_reclaim, .vop_fid = zfsctl_common_fid, .vop_print = zfsctl_snapdir_print, }; From owner-svn-src-stable@freebsd.org Wed Jul 13 11:04:23 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10B90B97B56; Wed, 13 Jul 2016 11:04:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD1631B9D; Wed, 13 Jul 2016 11:04:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DB4LOu027194; Wed, 13 Jul 2016 11:04:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DB4LUn027193; Wed, 13 Jul 2016 11:04:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131104.u6DB4LUn027193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302761 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:04:23 -0000 Author: avg Date: Wed Jul 13 11:04:21 2016 New Revision: 302761 URL: https://svnweb.freebsd.org/changeset/base/302761 Log: MFC r299951: do not destroy 'snapdir' when it becomes inactive Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:04:02 2016 (r302760) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:04:21 2016 (r302761) @@ -451,25 +451,6 @@ zfsctl_shares_fid(ap) return (error); } -static int -zfsctl_common_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; -{ - vnode_t *vp = ap->a_vp; - - /* - * Destroy the vm object and flush associated pages. - */ - vnode_destroy_vobject(vp); - VI_LOCK(vp); - vp->v_data = NULL; - VI_UNLOCK(vp); - return (0); -} - /* * .zfs inode namespace * @@ -1366,8 +1347,8 @@ zfsctl_snapdir_getattr(ap) /* ARGSUSED */ static int -zfsctl_snapdir_inactive(ap) - struct vop_inactive_args /* { +zfsctl_snapdir_reclaim(ap) + struct vop_reclaim_args /* { struct vnode *a_vp; struct thread *a_td; } */ *ap; @@ -1376,21 +1357,10 @@ zfsctl_snapdir_inactive(ap) zfsctl_snapdir_t *sdp = vp->v_data; zfs_snapentry_t *sep; - /* - * On forced unmount we have to free snapshots from here. - */ - mutex_enter(&sdp->sd_lock); - while ((sep = avl_first(&sdp->sd_snaps)) != NULL) { - avl_remove(&sdp->sd_snaps, sep); - kmem_free(sep->se_name, strlen(sep->se_name) + 1); - kmem_free(sep, sizeof (zfs_snapentry_t)); - } - mutex_exit(&sdp->sd_lock); - gfs_dir_inactive(vp); ASSERT(avl_numnodes(&sdp->sd_snaps) == 0); mutex_destroy(&sdp->sd_lock); avl_destroy(&sdp->sd_snaps); - kmem_free(sdp, sizeof (zfsctl_snapdir_t)); + gfs_vop_reclaim(ap); return (0); } @@ -1437,8 +1407,8 @@ static struct vop_vector zfsctl_ops_snap .vop_mkdir = zfsctl_freebsd_snapdir_mkdir, .vop_readdir = gfs_vop_readdir, .vop_lookup = zfsctl_snapdir_lookup, - .vop_inactive = zfsctl_snapdir_inactive, - .vop_reclaim = zfsctl_common_reclaim, + .vop_inactive = VOP_NULL, + .vop_reclaim = zfsctl_snapdir_reclaim, .vop_fid = zfsctl_common_fid, }; From owner-svn-src-stable@freebsd.org Wed Jul 13 11:06:38 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3D03B97BFD; Wed, 13 Jul 2016 11:06:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8435B1D25; Wed, 13 Jul 2016 11:06:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DB6bQa027336; Wed, 13 Jul 2016 11:06:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DB6bCg027335; Wed, 13 Jul 2016 11:06:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131106.u6DB6bCg027335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302762 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:06:38 -0000 Author: avg Date: Wed Jul 13 11:06:37 2016 New Revision: 302762 URL: https://svnweb.freebsd.org/changeset/base/302762 Log: MFC r300130: zfsctl_freebsd_root_lookup: gfs_vop_lookup may return a doomed vnode Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:04:21 2016 (r302761) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:06:37 2016 (r302762) @@ -628,19 +628,25 @@ zfsctl_freebsd_root_lookup(ap) ASSERT(ap->a_cnp->cn_namelen < sizeof(nm)); strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); +relookup: err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { - if (flags & ISDOTDOT) + if (flags & ISDOTDOT) { VOP_UNLOCK(dvp, 0); - err = vn_lock(*vpp, lkflags); - if (err != 0) { - vrele(*vpp); - *vpp = NULL; - } - if (flags & ISDOTDOT) + err = vn_lock(*vpp, lkflags); + if (err != 0) { + vrele(*vpp); + *vpp = NULL; + } vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } else { + err = vn_lock(*vpp, LK_EXCLUSIVE); + if (err != 0) { + VERIFY3S(err, ==, ENOENT); + goto relookup; + } + } } - return (err); } From owner-svn-src-stable@freebsd.org Wed Jul 13 11:08:52 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21606B97C7F; Wed, 13 Jul 2016 11:08:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E58851ED1; Wed, 13 Jul 2016 11:08:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DB8paw027451; Wed, 13 Jul 2016 11:08:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DB8pJt027450; Wed, 13 Jul 2016 11:08:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131108.u6DB8pJt027450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302763 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:08:52 -0000 Author: avg Date: Wed Jul 13 11:08:50 2016 New Revision: 302763 URL: https://svnweb.freebsd.org/changeset/base/302763 Log: MFC r300130: zfsctl_freebsd_root_lookup: gfs_vop_lookup may return a doomed vnode Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:06:37 2016 (r302762) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:08:50 2016 (r302763) @@ -600,20 +600,25 @@ zfsctl_freebsd_root_lookup(ap) ASSERT(ap->a_cnp->cn_namelen < sizeof(nm)); strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); - +relookup: err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { - if (flags & ISDOTDOT) + if (flags & ISDOTDOT) { VOP_UNLOCK(dvp, 0); - err = vn_lock(*vpp, lkflags); - if (err != 0) { - vrele(*vpp); - *vpp = NULL; - } - if (flags & ISDOTDOT) + err = vn_lock(*vpp, lkflags); + if (err != 0) { + vrele(*vpp); + *vpp = NULL; + } vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } else { + err = vn_lock(*vpp, LK_EXCLUSIVE); + if (err != 0) { + VERIFY3S(err, ==, ENOENT); + goto relookup; + } + } } - return (err); } From owner-svn-src-stable@freebsd.org Wed Jul 13 11:14:13 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14D13B97195; Wed, 13 Jul 2016 11:14:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA8221636; Wed, 13 Jul 2016 11:14:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DBECIX030932; Wed, 13 Jul 2016 11:14:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DBECAX030931; Wed, 13 Jul 2016 11:14:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131114.u6DBECAX030931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302764 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:14:13 -0000 Author: avg Date: Wed Jul 13 11:14:11 2016 New Revision: 302764 URL: https://svnweb.freebsd.org/changeset/base/302764 Log: MFC r300134: move zfsctl_freebsd_root_lookup right next to zfsctl_root_lookup Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:08:50 2016 (r302763) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:14:11 2016 (r302764) @@ -557,6 +557,50 @@ zfsctl_root_lookup(vnode_t *dvp, char *n } static int +zfsctl_freebsd_root_lookup(ap) + struct vop_lookup_args /* { + struct vnode *a_dvp; + struct vnode **a_vpp; + struct componentname *a_cnp; + } */ *ap; +{ + vnode_t *dvp = ap->a_dvp; + vnode_t **vpp = ap->a_vpp; + cred_t *cr = ap->a_cnp->cn_cred; + int flags = ap->a_cnp->cn_flags; + int lkflags = ap->a_cnp->cn_lkflags; + int nameiop = ap->a_cnp->cn_nameiop; + char nm[NAME_MAX + 1]; + int err; + + if ((flags & ISLASTCN) && (nameiop == RENAME || nameiop == CREATE)) + return (EOPNOTSUPP); + + ASSERT(ap->a_cnp->cn_namelen < sizeof(nm)); + strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); +relookup: + err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); + if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { + if (flags & ISDOTDOT) { + VOP_UNLOCK(dvp, 0); + err = vn_lock(*vpp, lkflags); + if (err != 0) { + vrele(*vpp); + *vpp = NULL; + } + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } else { + err = vn_lock(*vpp, LK_EXCLUSIVE); + if (err != 0) { + VERIFY3S(err, ==, ENOENT); + goto relookup; + } + } + } + return (err); +} + +static int zfsctl_root_print(ap) struct vop_print_args /* { struct vnode *a_vp; @@ -602,54 +646,6 @@ static const fs_operation_def_t zfsctl_t }; #endif /* illumos */ -/* - * Special case the handling of "..". - */ -/* ARGSUSED */ -int -zfsctl_freebsd_root_lookup(ap) - struct vop_lookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; -{ - vnode_t *dvp = ap->a_dvp; - vnode_t **vpp = ap->a_vpp; - cred_t *cr = ap->a_cnp->cn_cred; - int flags = ap->a_cnp->cn_flags; - int lkflags = ap->a_cnp->cn_lkflags; - int nameiop = ap->a_cnp->cn_nameiop; - char nm[NAME_MAX + 1]; - int err; - - if ((flags & ISLASTCN) && (nameiop == RENAME || nameiop == CREATE)) - return (EOPNOTSUPP); - - ASSERT(ap->a_cnp->cn_namelen < sizeof(nm)); - strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); -relookup: - err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); - if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { - if (flags & ISDOTDOT) { - VOP_UNLOCK(dvp, 0); - err = vn_lock(*vpp, lkflags); - if (err != 0) { - vrele(*vpp); - *vpp = NULL; - } - vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); - } else { - err = vn_lock(*vpp, LK_EXCLUSIVE); - if (err != 0) { - VERIFY3S(err, ==, ENOENT); - goto relookup; - } - } - } - return (err); -} - static struct vop_vector zfsctl_ops_root = { .vop_default = &default_vnodeops, .vop_open = zfsctl_common_open, From owner-svn-src-stable@freebsd.org Wed Jul 13 11:16:13 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CC53B97223; Wed, 13 Jul 2016 11:16:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 347DD17C8; Wed, 13 Jul 2016 11:16:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DBGCkJ031049; Wed, 13 Jul 2016 11:16:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DBGCn6031048; Wed, 13 Jul 2016 11:16:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131116.u6DBGCn6031048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302765 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:16:13 -0000 Author: avg Date: Wed Jul 13 11:16:12 2016 New Revision: 302765 URL: https://svnweb.freebsd.org/changeset/base/302765 Log: MFC r300134: move zfsctl_freebsd_root_lookup right next to zfsctl_root_lookup Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:14:11 2016 (r302764) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:16:12 2016 (r302765) @@ -539,46 +539,7 @@ zfsctl_root_lookup(vnode_t *dvp, char *n return (err); } -#ifdef sun static int -zfsctl_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, - caller_context_t *ct) -{ - /* - * We only care about ACL_ENABLED so that libsec can - * display ACL correctly and not default to POSIX draft. - */ - if (cmd == _PC_ACL_ENABLED) { - *valp = _ACL_ACE_ENABLED; - return (0); - } - - return (fs_pathconf(vp, cmd, valp, cr, ct)); -} -#endif /* sun */ - -#ifdef sun -static const fs_operation_def_t zfsctl_tops_root[] = { - { VOPNAME_OPEN, { .vop_open = zfsctl_common_open } }, - { VOPNAME_CLOSE, { .vop_close = zfsctl_common_close } }, - { VOPNAME_IOCTL, { .error = fs_inval } }, - { VOPNAME_GETATTR, { .vop_getattr = zfsctl_root_getattr } }, - { VOPNAME_ACCESS, { .vop_access = zfsctl_common_access } }, - { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } }, - { VOPNAME_LOOKUP, { .vop_lookup = zfsctl_root_lookup } }, - { VOPNAME_SEEK, { .vop_seek = fs_seek } }, - { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } }, - { VOPNAME_PATHCONF, { .vop_pathconf = zfsctl_pathconf } }, - { VOPNAME_FID, { .vop_fid = zfsctl_common_fid } }, - { NULL } -}; -#endif /* sun */ - -/* - * Special case the handling of "..". - */ -/* ARGSUSED */ -int zfsctl_freebsd_root_lookup(ap) struct vop_lookup_args /* { struct vnode *a_dvp; @@ -622,6 +583,41 @@ relookup: return (err); } +#ifdef illumos +static int +zfsctl_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, + caller_context_t *ct) +{ + /* + * We only care about ACL_ENABLED so that libsec can + * display ACL correctly and not default to POSIX draft. + */ + if (cmd == _PC_ACL_ENABLED) { + *valp = _ACL_ACE_ENABLED; + return (0); + } + + return (fs_pathconf(vp, cmd, valp, cr, ct)); +} +#endif /* illumos */ + +#ifdef illumos +static const fs_operation_def_t zfsctl_tops_root[] = { + { VOPNAME_OPEN, { .vop_open = zfsctl_common_open } }, + { VOPNAME_CLOSE, { .vop_close = zfsctl_common_close } }, + { VOPNAME_IOCTL, { .error = fs_inval } }, + { VOPNAME_GETATTR, { .vop_getattr = zfsctl_root_getattr } }, + { VOPNAME_ACCESS, { .vop_access = zfsctl_common_access } }, + { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } }, + { VOPNAME_LOOKUP, { .vop_lookup = zfsctl_root_lookup } }, + { VOPNAME_SEEK, { .vop_seek = fs_seek } }, + { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } }, + { VOPNAME_PATHCONF, { .vop_pathconf = zfsctl_pathconf } }, + { VOPNAME_FID, { .vop_fid = zfsctl_common_fid } }, + { NULL } +}; +#endif /* illumos */ + static struct vop_vector zfsctl_ops_root = { .vop_default = &default_vnodeops, .vop_open = zfsctl_common_open, From owner-svn-src-stable@freebsd.org Wed Jul 13 11:18:39 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D195B972B7; Wed, 13 Jul 2016 11:18:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEB9519C2; Wed, 13 Jul 2016 11:18:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DBIcB0031178; Wed, 13 Jul 2016 11:18:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DBIcZD031177; Wed, 13 Jul 2016 11:18:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131118.u6DBIcZD031177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302766 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:18:39 -0000 Author: avg Date: Wed Jul 13 11:18:37 2016 New Revision: 302766 URL: https://svnweb.freebsd.org/changeset/base/302766 Log: MFC r300145: add vop_print methods to vnode operatios of various zfsctl node types Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:16:12 2016 (r302765) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:18:37 2016 (r302766) @@ -293,6 +293,22 @@ zfsctl_root(znode_t *zp) return (zp->z_zfsvfs->z_ctldir); } +static int +zfsctl_common_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + gfs_file_t *fp = vp->v_data; + + printf(" parent = %p\n", fp->gfs_parent); + printf(" type = %d\n", fp->gfs_type); + printf(" index = %d\n", fp->gfs_index); + printf(" ino = %ju\n", (uintmax_t)fp->gfs_ino); + return (0); +} + /* * Common open routine. Disallow any write access. */ @@ -583,6 +599,17 @@ relookup: return (err); } +static int +zfsctl_root_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + printf(" .zfs node\n"); + zfsctl_common_print(ap); + return (0); +} + #ifdef illumos static int zfsctl_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, @@ -633,6 +660,7 @@ static struct vop_vector zfsctl_ops_root .vop_pathconf = zfsctl_pathconf, #endif .vop_fid = zfsctl_common_fid, + .vop_print = zfsctl_root_print, }; /* @@ -1366,6 +1394,32 @@ zfsctl_snapdir_reclaim(ap) return (0); } +static int +zfsctl_shares_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + printf(" .zfs/shares node\n"); + zfsctl_common_print(ap); + return (0); +} + +static int +zfsctl_snapdir_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + zfsctl_snapdir_t *sdp = vp->v_data; + + printf(" .zfs/snapshot node\n"); + printf(" number of children = %lu\n", avl_numnodes(&sdp->sd_snaps)); + zfsctl_common_print(ap); + return (0); +} + #ifdef sun static const fs_operation_def_t zfsctl_tops_snapdir[] = { { VOPNAME_OPEN, { .vop_open = zfsctl_common_open } }, @@ -1411,6 +1465,7 @@ static struct vop_vector zfsctl_ops_snap .vop_inactive = VOP_NULL, .vop_reclaim = zfsctl_snapdir_reclaim, .vop_fid = zfsctl_common_fid, + .vop_print = zfsctl_snapdir_print, }; static struct vop_vector zfsctl_ops_shares = { @@ -1425,6 +1480,7 @@ static struct vop_vector zfsctl_ops_shar .vop_inactive = VOP_NULL, .vop_reclaim = gfs_vop_reclaim, .vop_fid = zfsctl_shares_fid, + .vop_print = zfsctl_shares_print, }; #endif /* !sun */ @@ -1561,6 +1617,21 @@ zfsctl_snapshot_vptocnp(struct vop_vptoc return (error); } +static int +zfsctl_snaphot_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + vnode_t *vp = ap->a_vp; + zfsctl_node_t *zcp = vp->v_data; + + printf(" .zfs/snapshot/ node\n"); + printf(" id = %ju\n", (uintmax_t)zcp->zc_id); + zfsctl_common_print(ap); + return (0); +} + /* * These VP's should never see the light of day. They should always * be covered. @@ -1570,6 +1641,7 @@ static struct vop_vector zfsctl_ops_snap .vop_inactive = zfsctl_snapshot_inactive, .vop_reclaim = zfsctl_snapshot_reclaim, .vop_vptocnp = zfsctl_snapshot_vptocnp, + .vop_print = zfsctl_snaphot_print, }; int From owner-svn-src-stable@freebsd.org Wed Jul 13 11:58:22 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 622DFB970D0; Wed, 13 Jul 2016 11:58:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33F77124C; Wed, 13 Jul 2016 11:58:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DBwLXA046009; Wed, 13 Jul 2016 11:58:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DBwLum046008; Wed, 13 Jul 2016 11:58:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201607131158.u6DBwLum046008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Jul 2016 11:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302767 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 11:58:22 -0000 Author: avg Date: Wed Jul 13 11:58:21 2016 New Revision: 302767 URL: https://svnweb.freebsd.org/changeset/base/302767 Log: MFC r286710: 6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:18:37 2016 (r302766) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Jul 13 11:58:21 2016 (r302767) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. */ /* @@ -1179,10 +1180,11 @@ zfsctl_shares_lookup(ap) ZFS_EXIT(zfsvfs); return (SET_ERROR(ENOTSUP)); } - if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) + if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { error = VOP_LOOKUP(ZTOV(dzp), vpp, cnp); + VN_RELE(ZTOV(dzp)); + } - VN_RELE(ZTOV(dzp)); ZFS_EXIT(zfsvfs); return (error); From owner-svn-src-stable@freebsd.org Wed Jul 13 15:51:59 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CFB0B984CA; Wed, 13 Jul 2016 15:51:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF24147E; Wed, 13 Jul 2016 15:51:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DFpwFs033992; Wed, 13 Jul 2016 15:51:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DFpwj9033990; Wed, 13 Jul 2016 15:51:58 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607131551.u6DFpwj9033990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Jul 2016 15:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302773 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 15:51:59 -0000 Author: pfg Date: Wed Jul 13 15:51:58 2016 New Revision: 302773 URL: https://svnweb.freebsd.org/changeset/base/302773 Log: MFC r302476: ng_mppc(4):: basic code readability cleanups. In particular use __unreachable() to appease static analyzers. No functional change. CID: 1356591 Approved by: re (gjb) Modified: stable/11/sys/net/mppcc.c stable/11/sys/net/mppcd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/mppcc.c ============================================================================== --- stable/11/sys/net/mppcc.c Wed Jul 13 15:16:51 2016 (r302772) +++ stable/11/sys/net/mppcc.c Wed Jul 13 15:51:58 2016 (r302773) @@ -232,8 +232,9 @@ int MPPC_Compress(u_char **src, u_char * } else if (off < 8192) { /* 16-bit offset; 320 <= offset < 8192 */ putbits16(*dst, 0xc000|(off-320), 16, &olen, &l); } else { /* NOTREACHED */ + __unreachable(); rtn &= ~MPPC_OK; - return rtn; + return (rtn); } /* Encode length of match. */ Modified: stable/11/sys/net/mppcd.c ============================================================================== --- stable/11/sys/net/mppcd.c Wed Jul 13 15:16:51 2016 (r302772) +++ stable/11/sys/net/mppcd.c Wed Jul 13 15:51:58 2016 (r302773) @@ -170,7 +170,7 @@ int MPPC_Decompress(u_char **src, u_char rtn &= ~MPPC_OK; return (rtn); } - } else { /* NOTREACHED */ + } else { /* This shouldn't happen. */ rtn &= ~MPPC_OK; return (rtn); } From owner-svn-src-stable@freebsd.org Wed Jul 13 16:20:19 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D509B98C22; Wed, 13 Jul 2016 16:20:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D2461AE6; Wed, 13 Jul 2016 16:20:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DGKIQB043938; Wed, 13 Jul 2016 16:20:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DGKINZ043936; Wed, 13 Jul 2016 16:20:18 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607131620.u6DGKINZ043936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Jul 2016 16:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302774 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 16:20:19 -0000 Author: pfg Date: Wed Jul 13 16:20:18 2016 New Revision: 302774 URL: https://svnweb.freebsd.org/changeset/base/302774 Log: MFC r302476: ng_mppc(4): basic readability cleanups. No functional change. Modified: stable/10/sys/net/mppcc.c stable/10/sys/net/mppcd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/mppcc.c ============================================================================== --- stable/10/sys/net/mppcc.c Wed Jul 13 15:51:58 2016 (r302773) +++ stable/10/sys/net/mppcc.c Wed Jul 13 16:20:18 2016 (r302774) @@ -233,7 +233,7 @@ int MPPC_Compress(u_char **src, u_char * putbits16(*dst, 0xc000|(off-320), 16, &olen, &l); } else { /* NOTREACHED */ rtn &= ~MPPC_OK; - return rtn; + return (rtn); } /* Encode length of match. */ Modified: stable/10/sys/net/mppcd.c ============================================================================== --- stable/10/sys/net/mppcd.c Wed Jul 13 15:51:58 2016 (r302773) +++ stable/10/sys/net/mppcd.c Wed Jul 13 16:20:18 2016 (r302774) @@ -170,7 +170,7 @@ int MPPC_Decompress(u_char **src, u_char rtn &= ~MPPC_OK; return (rtn); } - } else { /* NOTREACHED */ + } else { /* This shouldn't happen. */ rtn &= ~MPPC_OK; return (rtn); } From owner-svn-src-stable@freebsd.org Wed Jul 13 16:24:04 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38AFAB98D7B; Wed, 13 Jul 2016 16:24:04 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B1741ECA; Wed, 13 Jul 2016 16:24:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6DGO3ii047648; Wed, 13 Jul 2016 16:24:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6DGO3gh047646; Wed, 13 Jul 2016 16:24:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607131624.u6DGO3gh047646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Jul 2016 16:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302775 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 16:24:04 -0000 Author: pfg Date: Wed Jul 13 16:24:02 2016 New Revision: 302775 URL: https://svnweb.freebsd.org/changeset/base/302775 Log: MFC r302476: ng_mppc(4): basic readability cleanups. No functional change. Modified: stable/9/sys/net/mppcc.c stable/9/sys/net/mppcd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/mppcc.c ============================================================================== --- stable/9/sys/net/mppcc.c Wed Jul 13 16:20:18 2016 (r302774) +++ stable/9/sys/net/mppcc.c Wed Jul 13 16:24:02 2016 (r302775) @@ -233,7 +233,7 @@ int MPPC_Compress(u_char **src, u_char * putbits16(*dst, 0xc000|(off-320), 16, &olen, &l); } else { /* NOTREACHED */ rtn &= ~MPPC_OK; - return rtn; + return (rtn); } /* Encode length of match. */ Modified: stable/9/sys/net/mppcd.c ============================================================================== --- stable/9/sys/net/mppcd.c Wed Jul 13 16:20:18 2016 (r302774) +++ stable/9/sys/net/mppcd.c Wed Jul 13 16:24:02 2016 (r302775) @@ -170,7 +170,7 @@ int MPPC_Decompress(u_char **src, u_char rtn &= ~MPPC_OK; return (rtn); } - } else { /* NOTREACHED */ + } else { /* This shouldn't happen. */ rtn &= ~MPPC_OK; return (rtn); } From owner-svn-src-stable@freebsd.org Thu Jul 14 00:26:58 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E421BB98BEA; Thu, 14 Jul 2016 00:26:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0D07196B; Thu, 14 Jul 2016 00:26:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6E0QvoI027299; Thu, 14 Jul 2016 00:26:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6E0QvgY027297; Thu, 14 Jul 2016 00:26:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607140026.u6E0QvgY027297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 Jul 2016 00:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302791 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 00:26:59 -0000 Author: mav Date: Thu Jul 14 00:26:57 2016 New Revision: 302791 URL: https://svnweb.freebsd.org/changeset/base/302791 Log: MFC r302402: Fix ahci(4) driver attach to controller with 32 ports. Incorrect sign expansion in variables that supposed to be a bit fields caused infinite loop. Fixing this allows system properly detect maximal possible 32 devices configured on AHCI HBA of BHyVe. That case did not happen in a wild before due to lack of hardware AHCI HBAs with 32 ports. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Wed Jul 13 23:49:45 2016 (r302790) +++ stable/10/sys/dev/ahci/ahci.c Thu Jul 14 00:26:57 2016 (r302791) @@ -154,8 +154,8 @@ int ahci_attach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); - int error, i, u, speed, unit; - u_int32_t version; + int error, i, speed, unit; + uint32_t u, version; device_t child; ctlr->dev = dev; Modified: stable/10/sys/dev/ahci/ahci.h ============================================================================== --- stable/10/sys/dev/ahci/ahci.h Wed Jul 13 23:49:45 2016 (r302790) +++ stable/10/sys/dev/ahci/ahci.h Thu Jul 14 00:26:57 2016 (r302791) @@ -472,7 +472,7 @@ struct ahci_enclosure { uint8_t status[AHCI_MAX_PORTS][4]; /* ArrayDev statuses */ int quirks; int channels; - int ichannels; + uint32_t ichannels; }; /* structure describing a AHCI controller */ @@ -503,7 +503,7 @@ struct ahci_controller { int quirks; int numirqs; int channels; - int ichannels; + uint32_t ichannels; int ccc; /* CCC timeout */ int cccv; /* CCC vector */ int direct; /* Direct command completion */ From owner-svn-src-stable@freebsd.org Thu Jul 14 04:30:44 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31639B9884B; Thu, 14 Jul 2016 04:30:44 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D4931F08; Thu, 14 Jul 2016 04:30:43 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6E4UhGQ017423; Thu, 14 Jul 2016 04:30:43 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6E4Uhxc017421; Thu, 14 Jul 2016 04:30:43 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201607140430.u6E4Uhxc017421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Thu, 14 Jul 2016 04:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302800 - stable/10/sbin/kldstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 04:30:44 -0000 Author: julian Date: Thu Jul 14 04:30:42 2016 New Revision: 302800 URL: https://svnweb.freebsd.org/changeset/base/302800 Log: MFH: r297023 Add the ability to print out the module specific information in likely formats. Among other things this gives us the ability to find out the syscall number of a dynamically loaded syscall that has a dynamicly allocated vector number. Sponsored by: Panzura inc. Modified: stable/10/sbin/kldstat/kldstat.8 stable/10/sbin/kldstat/kldstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/kldstat/kldstat.8 ============================================================================== --- stable/10/sbin/kldstat/kldstat.8 Thu Jul 14 02:25:29 2016 (r302799) +++ stable/10/sbin/kldstat/kldstat.8 Thu Jul 14 04:30:42 2016 (r302800) @@ -35,10 +35,12 @@ .Nm .Op Fl q .Op Fl v +.Op Fl d .Op Fl i Ar id .Op Fl n Ar filename .Nm .Op Fl q +.Op Fl d .Op Fl m Ar modname .Sh DESCRIPTION The @@ -50,6 +52,8 @@ The following options are available: .Bl -tag -width indentXX .It Fl v Be more verbose. +.It Fl d +Show the module specific data (as int, unsigned int and unsigned long) .It Fl i Ar id Display the status of only the file with this ID. .It Fl n Ar filename Modified: stable/10/sbin/kldstat/kldstat.c ============================================================================== --- stable/10/sbin/kldstat/kldstat.c Thu Jul 14 02:25:29 2016 (r302799) +++ stable/10/sbin/kldstat/kldstat.c Thu Jul 14 04:30:42 2016 (r302800) @@ -35,19 +35,28 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define POINTER_WIDTH ((int)(sizeof(void *) * 2 + 2)) +static int showdata = 0; + static void printmod(int modid) { struct module_stat stat; + bzero(&stat, sizeof(stat)); stat.version = sizeof(struct module_stat); if (modstat(modid, &stat) < 0) warn("can't stat module id %d", modid); else - printf("\t\t%2d %s\n", stat.id, stat.name); + if (showdata) { + printf("\t\t%2d %s (%d, %u, 0x%lx)\n", stat.id, stat.name, + stat.data.intval, stat.data.uintval, stat.data.ulongval); + } else { + printf("\t\t%2d %s\n", stat.id, stat.name); + } } static void @@ -78,8 +87,8 @@ printfile(int fileid, int verbose) static void usage(void) { - fprintf(stderr, "usage: kldstat [-q] [-v] [-i id] [-n filename]\n"); - fprintf(stderr, " kldstat [-q] [-m modname]\n"); + fprintf(stderr, "usage: kldstat [-d] [-q] [-v] [-i id] [-n filename]\n"); + fprintf(stderr, " kldstat [-d] [-q] [-m modname]\n"); exit(1); } @@ -94,8 +103,11 @@ main(int argc, char** argv) char* modname = NULL; char* p; - while ((c = getopt(argc, argv, "i:m:n:qv")) != -1) + while ((c = getopt(argc, argv, "di:m:n:qv")) != -1) switch (c) { + case 'd': + showdata = 1; + break; case 'i': fileid = (int)strtoul(optarg, &p, 10); if (*p != '\0') @@ -138,8 +150,14 @@ main(int argc, char** argv) if (modstat(modid, &stat) < 0) warn("can't stat module id %d", modid); else { - printf("Id Refs Name\n"); - printf("%3d %4d %s\n", stat.id, stat.refs, stat.name); + if (showdata) { + printf("Id Refs Name data..(int, uint, ulong)\n"); + printf("%3d %4d %s (%d, %u, 0x%lx)\n", stat.id, stat.refs, stat.name, + stat.data.intval, stat.data.uintval, stat.data.ulongval); + } else { + printf("Id Refs Name\n"); + printf("%3d %4d %s\n", stat.id, stat.refs, stat.name); + } } return 0; From owner-svn-src-stable@freebsd.org Thu Jul 14 08:19:26 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8CA4B971BB; Thu, 14 Jul 2016 08:19:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B762512EA; Thu, 14 Jul 2016 08:19:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6E8JPTi002052; Thu, 14 Jul 2016 08:19:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6E8JPRH002051; Thu, 14 Jul 2016 08:19:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607140819.u6E8JPRH002051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 Jul 2016 08:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302821 - stable/11/release X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 08:19:27 -0000 Author: gjb Date: Thu Jul 14 08:19:25 2016 New Revision: 302821 URL: https://svnweb.freebsd.org/changeset/base/302821 Log: Remove the 'debug.witness.trace' entry, as WITNESS is not enabled on stable branches by default. This is a direct commit to stable/11. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/Makefile Modified: stable/11/release/Makefile ============================================================================== --- stable/11/release/Makefile Thu Jul 14 08:18:12 2016 (r302820) +++ stable/11/release/Makefile Thu Jul 14 08:19:25 2016 (r302821) @@ -187,7 +187,6 @@ disc1: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf - echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc touch ${.TARGET} @@ -213,7 +212,6 @@ bootonly: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf - echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc @@ -236,7 +234,6 @@ dvd: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf - echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc touch ${.TARGET} From owner-svn-src-stable@freebsd.org Thu Jul 14 08:20:18 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2060B972A3; Thu, 14 Jul 2016 08:20:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E2A914B2; Thu, 14 Jul 2016 08:20:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6E8KHH7002146; Thu, 14 Jul 2016 08:20:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6E8KHcj002145; Thu, 14 Jul 2016 08:20:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607140820.u6E8KHcj002145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 Jul 2016 08:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302822 - in stable/11/sys: amd64/conf i386/conf pc98/conf powerpc/conf sparc64/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 08:20:18 -0000 Author: gjb Date: Thu Jul 14 08:20:17 2016 New Revision: 302822 URL: https://svnweb.freebsd.org/changeset/base/302822 Log: Remove GENERIC-NODEBUG kernel configurations, missed during the stable/11 branch. This is a direct commit to stable/11. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Deleted: stable/11/sys/amd64/conf/GENERIC-NODEBUG stable/11/sys/i386/conf/GENERIC-NODEBUG stable/11/sys/pc98/conf/GENERIC-NODEBUG stable/11/sys/powerpc/conf/GENERIC-NODEBUG stable/11/sys/sparc64/conf/GENERIC-NODEBUG From owner-svn-src-stable@freebsd.org Thu Jul 14 15:39:33 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 146BDB97F15; Thu, 14 Jul 2016 15:39:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCADE16A9; Thu, 14 Jul 2016 15:39:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6EFdVYT065809; Thu, 14 Jul 2016 15:39:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6EFdVVp065802; Thu, 14 Jul 2016 15:39:31 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607141539.u6EFdVVp065802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 14 Jul 2016 15:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302846 - in stable/10/cddl: contrib/opensolaris/common/ctf contrib/opensolaris/lib/libnvpair lib/libavl lib/libctf lib/libnvpair lib/libumem lib/libuutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 15:39:33 -0000 Author: asomers Date: Thu Jul 14 15:39:31 2016 New Revision: 302846 URL: https://svnweb.freebsd.org/changeset/base/302846 Log: MFC changes relating to warnings in opensolaris-derived libraries MFC r257592 MFC r257657 MFC r257638 MFC r257647 MFC r302141 r257592 | sbruno | 2013-11-03 14:05:44 -0700 (Sun, 03 Nov 2013) | 8 lines This library uses macros to define fprintf behvavior for several object types The compiler will see the non-string literal arguments to the fprintf calls and omit warnings for them. Quiese these warnings in contrib code: cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format string is not a string literal (potentially insecure) [-Wformat-security] ARENDER(pctl, nvlist_array, nvl, name, val, nelem); r257657 | sbruno | 2013-11-04 14:32:07 -0700 (Mon, 04 Nov 2013) | 5 lines Quiesce warning assigning to void * from const ctf_header_t * by explicity casting to void * before assignment. Submitted as Illumos issue 4287 r257638 | sbruno | 2013-11-04 09:15:43 -0700 (Mon, 04 Nov 2013) | 6 lines Quiesce warning regarding %llf which has no effect. Submitted as illumos issue #4284 Reviewed by: delphij r257647 | sbruno | 2013-11-04 12:32:35 -0700 (Mon, 04 Nov 2013) | 4 lines spelling in comments fixup Submitted by: Joerg Sonnenberger r302141 | asomers | 2016-06-23 09:02:57 -0600 (Thu, 23 Jun 2016) | 14 lines Raise the WARNS level in cddl/lib cddl/lib/libavl/Makefile cddl/lib/libctf/Makefile cddl/lib/libnvpair/Makefile cddl/lib/libumem/Makefile cddl/lib/libuutil/Makefile Increase WARNS to the highest working level for each of these libraries Sponsored by: Spectra Logic Corp Modified: stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c stable/10/cddl/lib/libavl/Makefile stable/10/cddl/lib/libctf/Makefile stable/10/cddl/lib/libnvpair/Makefile stable/10/cddl/lib/libumem/Makefile stable/10/cddl/lib/libuutil/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c Thu Jul 14 15:39:31 2016 (r302846) @@ -65,7 +65,7 @@ ctf_create(int *errp) cts.cts_name = _CTF_SECTION; cts.cts_type = SHT_PROGBITS; cts.cts_flags = 0; - cts.cts_data = &hdr; + cts.cts_data = (void *)&hdr; cts.cts_size = sizeof (hdr); cts.cts_entsize = 1; cts.cts_offset = 0; Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Thu Jul 14 15:39:31 2016 (r302846) @@ -210,7 +210,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t, NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x") NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld") NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx") -NVLIST_PRTFUNC(double, double, double, "0x%llf") +NVLIST_PRTFUNC(double, double, double, "0x%f") NVLIST_PRTFUNC(string, char *, char *, "%s") NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx") Modified: stable/10/cddl/lib/libavl/Makefile ============================================================================== --- stable/10/cddl/lib/libavl/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libavl/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -4,7 +4,7 @@ LIB= avl SRCS= avl.c -WARNS?= 0 +WARNS?= 3 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common Modified: stable/10/cddl/lib/libctf/Makefile ============================================================================== --- stable/10/cddl/lib/libctf/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libctf/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -17,7 +17,7 @@ SRCS= ctf_create.c \ ctf_types.c \ ctf_util.c -WARNS?= 0 +WARNS?= 2 CFLAGS+= -DCTF_OLD_VERSIONS CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ Modified: stable/10/cddl/lib/libnvpair/Makefile ============================================================================== --- stable/10/cddl/lib/libnvpair/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libnvpair/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -12,7 +12,7 @@ SRCS= libnvpair.c \ opensolaris_nvpair.c \ opensolaris_nvpair_alloc_fixed.c -WARNS?= 0 +WARNS?= 1 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris @@ -22,4 +22,13 @@ CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem +# This library uses macros to define fprintf behavior for several object types +# The compiler will see the non-string literal arguments to the fprintf calls and +# omit warnings for them. Quiesce these warnings in contrib code: +# +# cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format +# string is not a string literal (potentially insecure) [-Wformat-security] +# ARENDER(pctl, nvlist_array, nvl, name, val, nelem); +# +CFLAGS+= -Wno-format-security .include Modified: stable/10/cddl/lib/libumem/Makefile ============================================================================== --- stable/10/cddl/lib/libumem/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libumem/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -4,7 +4,7 @@ LIB= umem SRCS= umem.c -WARNS?= 0 +WARNS?= 3 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem .include Modified: stable/10/cddl/lib/libuutil/Makefile ============================================================================== --- stable/10/cddl/lib/libuutil/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libuutil/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -15,7 +15,7 @@ SRCS= avl.c \ uu_pname.c \ uu_strtoint.c -WARNS?= 0 +WARNS?= 1 CFLAGS+= -DNATIVE_BUILD CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris From owner-svn-src-stable@freebsd.org Fri Jul 15 02:24:41 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BD2CB97194; Fri, 15 Jul 2016 02:24:41 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D28EC1B84; Fri, 15 Jul 2016 02:24:40 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6F2OeRV008777; Fri, 15 Jul 2016 02:24:40 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6F2Oehp008776; Fri, 15 Jul 2016 02:24:40 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607150224.u6F2Oehp008776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 15 Jul 2016 02:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302862 - stable/11/sys/dev/hyperv/storvsc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 02:24:41 -0000 Author: sephe Date: Fri Jul 15 02:24:39 2016 New Revision: 302862 URL: https://svnweb.freebsd.org/changeset/base/302862 Log: MFC 302541,302605 302541 hyperv/stor: Fix the INQUIRY checks Don't check the area that the host has not filled. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425 Submitted by: Hongjiang Zhang Reviewed by: sephe, Dexuan Cui Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6955 302605 hyperv/stor: Save the response status and xfer length properly. The current command response handling discards status and xfer length unconditionally, so that all of the commands would be considered successful, even if errors happened. When errors really happens, this causes all kinds of wiredness, since the buffer will not be filled on the host side and sense data will be ignored. Most of the time, errors do not happen, however, error does happen for the request sent immediately after the disk resizing. Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense data (capacity changes) prevents the disk resizing from working properly. This commit saves the response status and xfer length properly for later use. Submitted by: Dexuan Cui Noticed by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7181 Approved by: re (gjb) Modified: stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Jul 14 23:35:55 2016 (r302861) +++ stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Jul 15 02:24:39 2016 (r302862) @@ -805,6 +805,13 @@ hv_storvsc_on_iocompletion(struct storvs vm_srb = &vstor_packet->u.vm_srb; + /* + * Copy some fields of the host's response into the request structure, + * because the fields will be used later in storvsc_io_done(). + */ + request->vstor_packet.u.vm_srb.scsi_status = vm_srb->scsi_status; + request->vstor_packet.u.vm_srb.transfer_len = vm_srb->transfer_len; + if (((vm_srb->scsi_status & 0xFF) == SCSI_STATUS_CHECK_COND) && (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID)) { /* Autosense data available */ @@ -1939,62 +1946,24 @@ create_storvsc_request(union ccb *ccb, s } /* - * Modified based on scsi_print_inquiry which is responsible to - * print the detail information for scsi_inquiry_data. - * + * SCSI Inquiry checks qualifier and type. + * If qualifier is 011b, means the device server is not capable + * of supporting a peripheral device on this logical unit, and + * the type should be set to 1Fh. + * * Return 1 if it is valid, 0 otherwise. */ static inline int is_inquiry_valid(const struct scsi_inquiry_data *inq_data) { uint8_t type; - char vendor[16], product[48], revision[16]; - - /* - * Check device type and qualifier - */ - if (!(SID_QUAL_IS_VENDOR_UNIQUE(inq_data) || - SID_QUAL(inq_data) == SID_QUAL_LU_CONNECTED)) + if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) { return (0); - + } type = SID_TYPE(inq_data); - switch (type) { - case T_DIRECT: - case T_SEQUENTIAL: - case T_PRINTER: - case T_PROCESSOR: - case T_WORM: - case T_CDROM: - case T_SCANNER: - case T_OPTICAL: - case T_CHANGER: - case T_COMM: - case T_STORARRAY: - case T_ENCLOSURE: - case T_RBC: - case T_OCRW: - case T_OSD: - case T_ADC: - break; - case T_NODEVICE: - default: + if (type == T_NODEVICE) { return (0); } - - /* - * Check vendor, product, and revision - */ - cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), - sizeof(vendor)); - cam_strvis(product, inq_data->product, sizeof(inq_data->product), - sizeof(product)); - cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), - sizeof(revision)); - if (strlen(vendor) == 0 || - strlen(product) == 0 || - strlen(revision) == 0) - return (0); - return (1); } @@ -2071,7 +2040,6 @@ storvsc_io_done(struct hv_storvsc_reques ccb->ccb_h.status &= ~CAM_STATUS_MASK; if (vm_srb->scsi_status == SCSI_STATUS_OK) { const struct scsi_generic *cmd; - /* * Check whether the data for INQUIRY cmd is valid or * not. Windows 10 and Windows 2016 send all zero @@ -2080,23 +2048,59 @@ storvsc_io_done(struct hv_storvsc_reques cmd = (const struct scsi_generic *) ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); - if (cmd->opcode == INQUIRY && - /* - * XXX: Temporary work around disk hot plugin on win2k12r2, - * only filtering the invalid disk on win10 or 2016 server. - * So, the hot plugin on win10 and 2016 server needs - * to be fixed. + if (cmd->opcode == INQUIRY) { + /* + * The host of Windows 10 or 2016 server will response + * the inquiry request with invalid data for unexisted device: + [0x7f 0x0 0x5 0x2 0x1f ... ] + * But on windows 2012 R2, the response is: + [0x7f 0x0 0x0 0x0 0x0 ] + * That is why here wants to validate the inquiry response. + * The validation will skip the INQUIRY whose response is short, + * which is less than SHORT_INQUIRY_LENGTH (36). + * + * For more information about INQUIRY, please refer to: + * ftp://ftp.avc-pioneer.com/Mtfuji_7/Proposal/Jun09/INQUIRY.pdf */ - vmstor_proto_version == VMSTOR_PROTOCOL_VERSION_WIN10 && - is_inquiry_valid( - (const struct scsi_inquiry_data *)csio->data_ptr) == 0) { + const struct scsi_inquiry_data *inq_data = + (const struct scsi_inquiry_data *)csio->data_ptr; + uint8_t* resp_buf = (uint8_t*)csio->data_ptr; + /* Get the buffer length reported by host */ + int resp_xfer_len = vm_srb->transfer_len; + /* Get the available buffer length */ + int resp_buf_len = resp_xfer_len >= 5 ? resp_buf[4] + 5 : 0; + int data_len = (resp_buf_len < resp_xfer_len) ? resp_buf_len : resp_xfer_len; + if (data_len < SHORT_INQUIRY_LENGTH) { + ccb->ccb_h.status |= CAM_REQ_CMP; + if (bootverbose && data_len >= 5) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc skips the validation for short inquiry (%d)" + " [%x %x %x %x %x]\n", + data_len,resp_buf[0],resp_buf[1],resp_buf[2], + resp_buf[3],resp_buf[4]); + mtx_unlock(&sc->hs_lock); + } + } else if (is_inquiry_valid(inq_data) == 0) { ccb->ccb_h.status |= CAM_DEV_NOT_THERE; + if (bootverbose && data_len >= 5) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc uninstalled invalid device" + " [%x %x %x %x %x]\n", + resp_buf[0],resp_buf[1],resp_buf[2],resp_buf[3],resp_buf[4]); + mtx_unlock(&sc->hs_lock); + } + } else { + ccb->ccb_h.status |= CAM_REQ_CMP; if (bootverbose) { mtx_lock(&sc->hs_lock); xpt_print(ccb->ccb_h.path, - "storvsc uninstalled device\n"); + "storvsc has passed inquiry response (%d) validation\n", + data_len); mtx_unlock(&sc->hs_lock); } + } } else { ccb->ccb_h.status |= CAM_REQ_CMP; } From owner-svn-src-stable@freebsd.org Fri Jul 15 02:29:12 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 189CEB972A6; Fri, 15 Jul 2016 02:29:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDAEA1D62; Fri, 15 Jul 2016 02:29:11 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6F2TB9i008992; Fri, 15 Jul 2016 02:29:11 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6F2TBXR008991; Fri, 15 Jul 2016 02:29:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607150229.u6F2TBXR008991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 15 Jul 2016 02:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302863 - stable/10/sys/dev/hyperv/storvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 02:29:12 -0000 Author: sephe Date: Fri Jul 15 02:29:10 2016 New Revision: 302863 URL: https://svnweb.freebsd.org/changeset/base/302863 Log: MFC 302541,302605 302541 hyperv/stor: Fix the INQUIRY checks Don't check the area that the host has not filled. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425 Submitted by: Hongjiang Zhang Reviewed by: sephe, Dexuan Cui Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6955 302605 hyperv/stor: Save the response status and xfer length properly. The current command response handling discards status and xfer length unconditionally, so that all of the commands would be considered successful, even if errors happened. When errors really happens, this causes all kinds of wiredness, since the buffer will not be filled on the host side and sense data will be ignored. Most of the time, errors do not happen, however, error does happen for the request sent immediately after the disk resizing. Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense data (capacity changes) prevents the disk resizing from working properly. This commit saves the response status and xfer length properly for later use. Submitted by: Dexuan Cui Noticed by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7181 Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Jul 15 02:24:39 2016 (r302862) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Jul 15 02:29:10 2016 (r302863) @@ -805,6 +805,13 @@ hv_storvsc_on_iocompletion(struct storvs vm_srb = &vstor_packet->u.vm_srb; + /* + * Copy some fields of the host's response into the request structure, + * because the fields will be used later in storvsc_io_done(). + */ + request->vstor_packet.u.vm_srb.scsi_status = vm_srb->scsi_status; + request->vstor_packet.u.vm_srb.transfer_len = vm_srb->transfer_len; + if (((vm_srb->scsi_status & 0xFF) == SCSI_STATUS_CHECK_COND) && (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID)) { /* Autosense data available */ @@ -1939,62 +1946,24 @@ create_storvsc_request(union ccb *ccb, s } /* - * Modified based on scsi_print_inquiry which is responsible to - * print the detail information for scsi_inquiry_data. - * + * SCSI Inquiry checks qualifier and type. + * If qualifier is 011b, means the device server is not capable + * of supporting a peripheral device on this logical unit, and + * the type should be set to 1Fh. + * * Return 1 if it is valid, 0 otherwise. */ static inline int is_inquiry_valid(const struct scsi_inquiry_data *inq_data) { uint8_t type; - char vendor[16], product[48], revision[16]; - - /* - * Check device type and qualifier - */ - if (!(SID_QUAL_IS_VENDOR_UNIQUE(inq_data) || - SID_QUAL(inq_data) == SID_QUAL_LU_CONNECTED)) + if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) { return (0); - + } type = SID_TYPE(inq_data); - switch (type) { - case T_DIRECT: - case T_SEQUENTIAL: - case T_PRINTER: - case T_PROCESSOR: - case T_WORM: - case T_CDROM: - case T_SCANNER: - case T_OPTICAL: - case T_CHANGER: - case T_COMM: - case T_STORARRAY: - case T_ENCLOSURE: - case T_RBC: - case T_OCRW: - case T_OSD: - case T_ADC: - break; - case T_NODEVICE: - default: + if (type == T_NODEVICE) { return (0); } - - /* - * Check vendor, product, and revision - */ - cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), - sizeof(vendor)); - cam_strvis(product, inq_data->product, sizeof(inq_data->product), - sizeof(product)); - cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), - sizeof(revision)); - if (strlen(vendor) == 0 || - strlen(product) == 0 || - strlen(revision) == 0) - return (0); - return (1); } @@ -2071,7 +2040,6 @@ storvsc_io_done(struct hv_storvsc_reques ccb->ccb_h.status &= ~CAM_STATUS_MASK; if (vm_srb->scsi_status == SCSI_STATUS_OK) { const struct scsi_generic *cmd; - /* * Check whether the data for INQUIRY cmd is valid or * not. Windows 10 and Windows 2016 send all zero @@ -2080,23 +2048,59 @@ storvsc_io_done(struct hv_storvsc_reques cmd = (const struct scsi_generic *) ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); - if (cmd->opcode == INQUIRY && - /* - * XXX: Temporary work around disk hot plugin on win2k12r2, - * only filtering the invalid disk on win10 or 2016 server. - * So, the hot plugin on win10 and 2016 server needs - * to be fixed. + if (cmd->opcode == INQUIRY) { + /* + * The host of Windows 10 or 2016 server will response + * the inquiry request with invalid data for unexisted device: + [0x7f 0x0 0x5 0x2 0x1f ... ] + * But on windows 2012 R2, the response is: + [0x7f 0x0 0x0 0x0 0x0 ] + * That is why here wants to validate the inquiry response. + * The validation will skip the INQUIRY whose response is short, + * which is less than SHORT_INQUIRY_LENGTH (36). + * + * For more information about INQUIRY, please refer to: + * ftp://ftp.avc-pioneer.com/Mtfuji_7/Proposal/Jun09/INQUIRY.pdf */ - vmstor_proto_version == VMSTOR_PROTOCOL_VERSION_WIN10 && - is_inquiry_valid( - (const struct scsi_inquiry_data *)csio->data_ptr) == 0) { + const struct scsi_inquiry_data *inq_data = + (const struct scsi_inquiry_data *)csio->data_ptr; + uint8_t* resp_buf = (uint8_t*)csio->data_ptr; + /* Get the buffer length reported by host */ + int resp_xfer_len = vm_srb->transfer_len; + /* Get the available buffer length */ + int resp_buf_len = resp_xfer_len >= 5 ? resp_buf[4] + 5 : 0; + int data_len = (resp_buf_len < resp_xfer_len) ? resp_buf_len : resp_xfer_len; + if (data_len < SHORT_INQUIRY_LENGTH) { + ccb->ccb_h.status |= CAM_REQ_CMP; + if (bootverbose && data_len >= 5) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc skips the validation for short inquiry (%d)" + " [%x %x %x %x %x]\n", + data_len,resp_buf[0],resp_buf[1],resp_buf[2], + resp_buf[3],resp_buf[4]); + mtx_unlock(&sc->hs_lock); + } + } else if (is_inquiry_valid(inq_data) == 0) { ccb->ccb_h.status |= CAM_DEV_NOT_THERE; + if (bootverbose && data_len >= 5) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc uninstalled invalid device" + " [%x %x %x %x %x]\n", + resp_buf[0],resp_buf[1],resp_buf[2],resp_buf[3],resp_buf[4]); + mtx_unlock(&sc->hs_lock); + } + } else { + ccb->ccb_h.status |= CAM_REQ_CMP; if (bootverbose) { mtx_lock(&sc->hs_lock); xpt_print(ccb->ccb_h.path, - "storvsc uninstalled device\n"); + "storvsc has passed inquiry response (%d) validation\n", + data_len); mtx_unlock(&sc->hs_lock); } + } } else { ccb->ccb_h.status |= CAM_REQ_CMP; } From owner-svn-src-stable@freebsd.org Fri Jul 15 09:44:50 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C1EB97A90; Fri, 15 Jul 2016 09:44:50 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E9A01709; Fri, 15 Jul 2016 09:44:50 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6F9inqk072147; Fri, 15 Jul 2016 09:44:49 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6F9inT1072143; Fri, 15 Jul 2016 09:44:49 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201607150944.u6F9inT1072143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 15 Jul 2016 09:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302895 - in stable/11/sys: amd64/include i386/include x86/x86 x86/xen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 09:44:50 -0000 Author: royger Date: Fri Jul 15 09:44:48 2016 New Revision: 302895 URL: https://svnweb.freebsd.org/changeset/base/302895 Log: MFC r302635: xen: automatically disable MSI-X interrupt migration Approved by: re (kib) Modified: stable/11/sys/amd64/include/intr_machdep.h stable/11/sys/i386/include/intr_machdep.h stable/11/sys/x86/x86/msi.c stable/11/sys/x86/xen/hvm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/11/sys/amd64/include/intr_machdep.h Fri Jul 15 09:28:32 2016 (r302894) +++ stable/11/sys/amd64/include/intr_machdep.h Fri Jul 15 09:44:48 2016 (r302895) @@ -149,6 +149,8 @@ extern cpuset_t intr_cpus; extern struct mtx icu_lock; extern int elcr_found; +extern int msix_disable_migration; + #ifndef DEV_ATPIC void atpic_reset(void); #endif Modified: stable/11/sys/i386/include/intr_machdep.h ============================================================================== --- stable/11/sys/i386/include/intr_machdep.h Fri Jul 15 09:28:32 2016 (r302894) +++ stable/11/sys/i386/include/intr_machdep.h Fri Jul 15 09:44:48 2016 (r302895) @@ -140,6 +140,8 @@ extern cpuset_t intr_cpus; extern struct mtx icu_lock; extern int elcr_found; +extern int msix_disable_migration; + #ifndef DEV_ATPIC void atpic_reset(void); #endif Modified: stable/11/sys/x86/x86/msi.c ============================================================================== --- stable/11/sys/x86/x86/msi.c Fri Jul 15 09:28:32 2016 (r302894) +++ stable/11/sys/x86/x86/msi.c Fri Jul 15 09:44:48 2016 (r302895) @@ -149,12 +149,16 @@ struct pic msi_pic = { .pic_reprogram_pin = NULL, }; -/* +/** * Xen hypervisors prior to 4.6.0 do not properly handle updates to * enabled MSI-X table entries. Allow migration of MSI-X interrupts - * to be disabled via a tunable. + * to be disabled via a tunable. Values have the following meaning: + * + * -1: automatic detection by FreeBSD + * 0: enable migration + * 1: disable migration */ -static int msix_disable_migration = 0; +int msix_disable_migration = -1; SYSCTL_INT(_machdep, OID_AUTO, disable_msix_migration, CTLFLAG_RDTUN, &msix_disable_migration, 0, "Disable migration of MSI-X interrupts between CPUs"); @@ -312,6 +316,11 @@ msi_init(void) return; } + if (msix_disable_migration == -1) { + /* The default is to allow migration of MSI-X interrupts. */ + msix_disable_migration = 0; + } + msi_enabled = 1; intr_register_pic(&msi_pic); mtx_init(&msi_lock, "msi", NULL, MTX_DEF); Modified: stable/11/sys/x86/xen/hvm.c ============================================================================== --- stable/11/sys/x86/xen/hvm.c Fri Jul 15 09:28:32 2016 (r302894) +++ stable/11/sys/x86/xen/hvm.c Fri Jul 15 09:44:48 2016 (r302895) @@ -134,9 +134,29 @@ xen_hvm_init_hypercall_stubs(enum xen_hv return (ENXIO); if (init_type == XEN_HVM_INIT_COLD) { + int major, minor; + do_cpuid(base + 1, regs); - printf("XEN: Hypervisor version %d.%d detected.\n", - regs[0] >> 16, regs[0] & 0xffff); + + major = regs[0] >> 16; + minor = regs[0] & 0xffff; + printf("XEN: Hypervisor version %d.%d detected.\n", major, + minor); + + if (((major < 4) || (major == 4 && minor <= 5)) && + msix_disable_migration == -1) { + /* + * Xen hypervisors prior to 4.6.0 do not properly + * handle updates to enabled MSI-X table entries, + * so disable MSI-X interrupt migration in that + * case. + */ + if (bootverbose) + printf( +"Disabling MSI-X interrupt migration due to Xen hypervisor bug.\n" +"Set machdep.msix_disable_migration=0 to forcefully enable it.\n"); + msix_disable_migration = 1; + } } /* From owner-svn-src-stable@freebsd.org Fri Jul 15 15:30:11 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45014B991E2; Fri, 15 Jul 2016 15:30:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 086AA1E6F; Fri, 15 Jul 2016 15:30:10 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FFUAK8098033; Fri, 15 Jul 2016 15:30:10 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6FFUAVN098031; Fri, 15 Jul 2016 15:30:10 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607151530.u6FFUAVN098031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 15 Jul 2016 15:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302901 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 15:30:11 -0000 Author: sbruno Date: Fri Jul 15 15:30:09 2016 New Revision: 302901 URL: https://svnweb.freebsd.org/changeset/base/302901 Log: MFC r297187 Support checksum offloading for TCP/IPV6 and UDP/IPV6. Support SCTP checksum offloading for SCTP/IPV6. Support SCTP checksum offloading on all controllers except 82575. Differential Revision: https://reviews.freebsd.org/D7215 Modified: stable/10/sys/dev/e1000/if_igb.c stable/10/sys/dev/e1000/if_igb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Fri Jul 15 15:28:33 2016 (r302900) +++ stable/10/sys/dev/e1000/if_igb.c Fri Jul 15 15:30:09 2016 (r302901) @@ -1169,10 +1169,27 @@ igb_ioctl(struct ifnet *ifp, u_long comm } } #endif +#if __FreeBSD_version >= 1000000 + /* HW cannot turn these on/off separately */ + if (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { + ifp->if_capenable ^= IFCAP_RXCSUM; + ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; + reinit = 1; + } + if (mask & IFCAP_TXCSUM) { + ifp->if_capenable ^= IFCAP_TXCSUM; + reinit = 1; + } + if (mask & IFCAP_TXCSUM_IPV6) { + ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; + reinit = 1; + } +#else if (mask & IFCAP_HWCSUM) { ifp->if_capenable ^= IFCAP_HWCSUM; reinit = 1; } +#endif if (mask & IFCAP_TSO4) { ifp->if_capenable ^= IFCAP_TSO4; reinit = 1; @@ -1251,14 +1268,26 @@ igb_init_locked(struct adapter *adapter) /* Set hardware offload abilities */ ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) { +#if __FreeBSD_version >= 1000000 + ifp->if_hwassist |= (CSUM_IP_TCP | CSUM_IP_UDP); + if (adapter->hw.mac.type != e1000_82575) + ifp->if_hwassist |= CSUM_IP_SCTP; +#else ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); #if __FreeBSD_version >= 800000 - if ((adapter->hw.mac.type == e1000_82576) || - (adapter->hw.mac.type == e1000_82580)) + if (adapter->hw.mac.type != e1000_82575) ifp->if_hwassist |= CSUM_SCTP; #endif +#endif } +#if __FreeBSD_version >= 1000000 + if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) { + ifp->if_hwassist |= (CSUM_IP6_TCP | CSUM_IP6_UDP); + if (adapter->hw.mac.type != e1000_82575) + ifp->if_hwassist |= CSUM_IP6_SCTP; + } +#endif if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= CSUM_TSO; @@ -3064,6 +3093,9 @@ igb_setup_interface(device_t dev, struct ifp->if_capabilities = ifp->if_capenable = 0; ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; +#if __FreeBSD_version >= 1000000 + ifp->if_capabilities |= IFCAP_HWCSUM_IPV6; +#endif ifp->if_capabilities |= IFCAP_TSO; ifp->if_capabilities |= IFCAP_JUMBO_MTU; ifp->if_capenable = ifp->if_capabilities; @@ -3837,17 +3869,29 @@ igb_tx_ctx_setup(struct tx_ring *txr, st switch (ipproto) { case IPPROTO_TCP: +#if __FreeBSD_version >= 1000000 + if (mp->m_pkthdr.csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP)) +#else if (mp->m_pkthdr.csum_flags & CSUM_TCP) +#endif type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_TCP; break; case IPPROTO_UDP: +#if __FreeBSD_version >= 1000000 + if (mp->m_pkthdr.csum_flags & (CSUM_IP_UDP | CSUM_IP6_UDP)) +#else if (mp->m_pkthdr.csum_flags & CSUM_UDP) +#endif type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_UDP; break; #if __FreeBSD_version >= 800000 case IPPROTO_SCTP: +#if __FreeBSD_version >= 1000000 + if (mp->m_pkthdr.csum_flags & (CSUM_IP_SCTP | CSUM_IP6_SCTP)) +#else if (mp->m_pkthdr.csum_flags & CSUM_SCTP) +#endif type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_SCTP; break; #endif @@ -4534,8 +4578,7 @@ igb_initialize_receive_units(struct adap rxcsum |= E1000_RXCSUM_PCSD; #if __FreeBSD_version >= 800000 /* For SCTP Offload */ - if (((hw->mac.type == e1000_82576) || - (hw->mac.type == e1000_82580)) && + if ((hw->mac.type != e1000_82575) && (ifp->if_capenable & IFCAP_RXCSUM)) rxcsum |= E1000_RXCSUM_CRCOFL; #endif @@ -4544,8 +4587,7 @@ igb_initialize_receive_units(struct adap if (ifp->if_capenable & IFCAP_RXCSUM) { rxcsum |= E1000_RXCSUM_IPPCSE; #if __FreeBSD_version >= 800000 - if ((adapter->hw.mac.type == e1000_82576) || - (adapter->hw.mac.type == e1000_82580)) + if (adapter->hw.mac.type != e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; #endif } else Modified: stable/10/sys/dev/e1000/if_igb.h ============================================================================== --- stable/10/sys/dev/e1000/if_igb.h Fri Jul 15 15:28:33 2016 (r302900) +++ stable/10/sys/dev/e1000/if_igb.h Fri Jul 15 15:30:09 2016 (r302901) @@ -291,7 +291,11 @@ #define ETH_ADDR_LEN 6 /* Offload bits in mbuf flag */ -#if __FreeBSD_version >= 800000 +#if __FreeBSD_version >= 1000000 +#define CSUM_OFFLOAD_IPV4 (CSUM_IP|CSUM_IP_TCP|CSUM_IP_UDP|CSUM_IP_SCTP) +#define CSUM_OFFLOAD_IPV6 (CSUM_IP6_TCP|CSUM_IP6_UDP|CSUM_IP6_SCTP) +#define CSUM_OFFLOAD (CSUM_OFFLOAD_IPV4|CSUM_OFFLOAD_IPV6) +#elif __FreeBSD_version >= 800000 #define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) #else #define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP) From owner-svn-src-stable@freebsd.org Fri Jul 15 19:10:34 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43E3CB9A8E0; Fri, 15 Jul 2016 19:10:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0924717E8; Fri, 15 Jul 2016 19:10:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FJAXcB082210; Fri, 15 Jul 2016 19:10:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6FJAXjV082209; Fri, 15 Jul 2016 19:10:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607151910.u6FJAXjV082209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Jul 2016 19:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302909 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 19:10:34 -0000 Author: markj Date: Fri Jul 15 19:10:32 2016 New Revision: 302909 URL: https://svnweb.freebsd.org/changeset/base/302909 Log: MFC r302507: Avoid truncating the return value of DTrace predicates. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jul 15 19:07:00 2016 (r302908) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jul 15 19:10:32 2016 (r302909) @@ -7288,7 +7288,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t a if (pred != NULL) { dtrace_difo_t *dp = pred->dtp_difo; - int rval; + uint64_t rval; rval = dtrace_dif_emulate(dp, &mstate, vstate, state); From owner-svn-src-stable@freebsd.org Fri Jul 15 19:14:29 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE9B5B9AB2E; Fri, 15 Jul 2016 19:14:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAB6A1E53; Fri, 15 Jul 2016 19:14:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FJESCL085681; Fri, 15 Jul 2016 19:14:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6FJESui085680; Fri, 15 Jul 2016 19:14:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607151914.u6FJESui085680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Jul 2016 19:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302910 - stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 19:14:30 -0000 Author: markj Date: Fri Jul 15 19:14:28 2016 New Revision: 302910 URL: https://svnweb.freebsd.org/changeset/base/302910 Log: MFC r302507: Avoid truncating the return value of DTrace predicates. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jul 15 19:10:32 2016 (r302909) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jul 15 19:14:28 2016 (r302910) @@ -6336,7 +6336,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t a if (pred != NULL) { dtrace_difo_t *dp = pred->dtp_difo; - int rval; + uint64_t rval; rval = dtrace_dif_emulate(dp, &mstate, vstate, state); From owner-svn-src-stable@freebsd.org Fri Jul 15 19:58:06 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A497B987AE; Fri, 15 Jul 2016 19:58:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3867D1769; Fri, 15 Jul 2016 19:58:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FJw53o000788; Fri, 15 Jul 2016 19:58:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6FJw5lH000786; Fri, 15 Jul 2016 19:58:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607151958.u6FJw5lH000786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 15 Jul 2016 19:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302912 - in stable/11/usr.sbin: etcupdate mergemaster X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 19:58:06 -0000 Author: bdrewery Date: Fri Jul 15 19:58:05 2016 New Revision: 302912 URL: https://svnweb.freebsd.org/changeset/base/302912 Log: MFC r302674: META_MODE: Don't require filemon(4) for mergemaster(8)/etcupdate(8) Approved by: re (gjb) Modified: stable/11/usr.sbin/etcupdate/etcupdate.sh stable/11/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/11/usr.sbin/etcupdate/etcupdate.sh Fri Jul 15 19:43:24 2016 (r302911) +++ stable/11/usr.sbin/etcupdate/etcupdate.sh Fri Jul 15 19:58:05 2016 (r302912) @@ -184,7 +184,7 @@ build_tree() { local destdir dir file make - make="make $MAKE_OPTIONS" + make="make $MAKE_OPTIONS -DNO_FILEMON" log "Building tree at $1 with $make" mkdir -p $1/usr/obj >&3 2>&1 Modified: stable/11/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/11/usr.sbin/mergemaster/mergemaster.sh Fri Jul 15 19:43:24 2016 (r302911) +++ stable/11/usr.sbin/mergemaster/mergemaster.sh Fri Jul 15 19:58:05 2016 (r302912) @@ -486,7 +486,7 @@ fi SOURCEDIR=$(realpath "$SOURCEDIR") # Setup make to use system files from SOURCEDIR -MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk" +MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. From owner-svn-src-stable@freebsd.org Fri Jul 15 20:26:29 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A561DB9916F; Fri, 15 Jul 2016 20:26:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74A5A1ADA; Fri, 15 Jul 2016 20:26:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FKQSTI011688; Fri, 15 Jul 2016 20:26:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6FKQSLc011687; Fri, 15 Jul 2016 20:26:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607152026.u6FKQSLc011687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Jul 2016 20:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302913 - stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 20:26:29 -0000 Author: markj Date: Fri Jul 15 20:26:28 2016 New Revision: 302913 URL: https://svnweb.freebsd.org/changeset/base/302913 Log: MFC r302507: Avoid truncating the return value of DTrace predicates. Approved by: re (gjb) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jul 15 19:58:05 2016 (r302912) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jul 15 20:26:28 2016 (r302913) @@ -7348,7 +7348,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t a if (pred != NULL) { dtrace_difo_t *dp = pred->dtp_difo; - int rval; + uint64_t rval; rval = dtrace_dif_emulate(dp, &mstate, vstate, state); From owner-svn-src-stable@freebsd.org Fri Jul 15 21:30:23 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA0C1B9A0EB; Fri, 15 Jul 2016 21:30:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD061B3E; Fri, 15 Jul 2016 21:30:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FLUMgK034106; Fri, 15 Jul 2016 21:30:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6FLUJd8034073; Fri, 15 Jul 2016 21:30:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607152130.u6FLUJd8034073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 15 Jul 2016 21:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302915 - in stable/11/sys/arm: conf lpc samsung/exynos X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 21:30:23 -0000 Author: ian Date: Fri Jul 15 21:30:19 2016 New Revision: 302915 URL: https://svnweb.freebsd.org/changeset/base/302915 Log: MFC r302502, r302505: Consolidate debugging options from all arm kernel configs to std.arm[v6]. Correct syntax errors that only show up when compiled with INVARIANTS. Approved by: re (gjb) Modified: stable/11/sys/arm/conf/A10 stable/11/sys/arm/conf/ALLWINNER stable/11/sys/arm/conf/ALPINE stable/11/sys/arm/conf/AML8726 stable/11/sys/arm/conf/ARMADA38X stable/11/sys/arm/conf/ARMADAXP stable/11/sys/arm/conf/ATMEL stable/11/sys/arm/conf/AVILA stable/11/sys/arm/conf/BEAGLEBONE stable/11/sys/arm/conf/BWCT stable/11/sys/arm/conf/CAMBRIA stable/11/sys/arm/conf/CNS11XXNAS stable/11/sys/arm/conf/CRB stable/11/sys/arm/conf/DB-78XXX stable/11/sys/arm/conf/DB-88F5XXX stable/11/sys/arm/conf/DB-88F6XXX stable/11/sys/arm/conf/DOCKSTAR stable/11/sys/arm/conf/DREAMPLUG-1001 stable/11/sys/arm/conf/EA3250 stable/11/sys/arm/conf/EB9200 stable/11/sys/arm/conf/EFIKA_MX stable/11/sys/arm/conf/ETHERNUT5 stable/11/sys/arm/conf/EXYNOS5.common stable/11/sys/arm/conf/GUMSTIX stable/11/sys/arm/conf/HL200 stable/11/sys/arm/conf/HL201 stable/11/sys/arm/conf/IMX53 stable/11/sys/arm/conf/IMX6 stable/11/sys/arm/conf/KB920X stable/11/sys/arm/conf/NSLU stable/11/sys/arm/conf/PANDABOARD stable/11/sys/arm/conf/QILA9G20 stable/11/sys/arm/conf/RK3188 stable/11/sys/arm/conf/RPI-B stable/11/sys/arm/conf/RPI2 stable/11/sys/arm/conf/SAM9260EK stable/11/sys/arm/conf/SAM9G20EK stable/11/sys/arm/conf/SAM9X25EK stable/11/sys/arm/conf/SHEEVAPLUG stable/11/sys/arm/conf/SN9G45 stable/11/sys/arm/conf/SOCKIT.common stable/11/sys/arm/conf/TEGRA124 stable/11/sys/arm/conf/TS7800 stable/11/sys/arm/conf/VERSATILEPB stable/11/sys/arm/conf/VIRT stable/11/sys/arm/conf/VYBRID stable/11/sys/arm/conf/ZEDBOARD stable/11/sys/arm/conf/std.arm stable/11/sys/arm/conf/std.armv6 stable/11/sys/arm/lpc/if_lpe.c stable/11/sys/arm/samsung/exynos/chrome_kb.c Modified: stable/11/sys/arm/conf/A10 ============================================================================== --- stable/11/sys/arm/conf/A10 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/A10 Fri Jul 15 21:30:19 2016 (r302915) @@ -32,21 +32,6 @@ options SCHED_4BSD # 4BSD scheduler options PLATFORM options MULTIDELAY -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -94,9 +79,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device uhci device ohci device ehci Modified: stable/11/sys/arm/conf/ALLWINNER ============================================================================== --- stable/11/sys/arm/conf/ALLWINNER Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/ALLWINNER Fri Jul 15 21:30:19 2016 (r302915) @@ -39,21 +39,6 @@ options PLATFORM options PLATFORM_SMP options MULTIDELAY -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -109,9 +94,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device uhci device ohci device ehci Modified: stable/11/sys/arm/conf/ALPINE ============================================================================== --- stable/11/sys/arm/conf/ALPINE Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/ALPINE Fri Jul 15 21:30:19 2016 (r302915) @@ -29,12 +29,6 @@ options HZ=100 options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores -# Debugging -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB -options DDB #Enable the kernel debugger - # Interrupt controller device gic options INTRNG Modified: stable/11/sys/arm/conf/AML8726 ============================================================================== --- stable/11/sys/arm/conf/AML8726 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/AML8726 Fri Jul 15 21:30:19 2016 (r302915) @@ -28,22 +28,6 @@ options SCHED_ULE # ULE scheduler options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options LINUX_BOOT_ABI -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -94,9 +78,6 @@ device bpf # Berkeley packet filter device usb # General USB code (mandatory for USB) device dwcotg # DWC OTG controller options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device ukbd # USB keyboard #device ums # USB mouse Modified: stable/11/sys/arm/conf/ARMADA38X ============================================================================== --- stable/11/sys/arm/conf/ARMADA38X Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/ARMADA38X Fri Jul 15 21:30:19 2016 (r302915) @@ -11,7 +11,6 @@ ident ARMADA38X options SOC_MV_ARMADA38X -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options MD_ROOT @@ -24,22 +23,6 @@ options SCHED_ULE # ULE scheduler options SMP -# Debugging -#options DEBUG -#options VERBOSE_SYSINIT -options ALT_BREAK_TO_DEBUGGER -options DDB -#options GDB -#options DIAGNOSTIC -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options KDB_TRACE -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB -#options BOOTVERBOSE - # Pseudo devices device random device pty Modified: stable/11/sys/arm/conf/ARMADAXP ============================================================================== --- stable/11/sys/arm/conf/ARMADAXP Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/ARMADAXP Fri Jul 15 21:30:19 2016 (r302915) @@ -31,28 +31,6 @@ options HZ=1000 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options GDB -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB -#options DIAGNOSTIC -#options KTR -#options KTR_VERBOSE=0 -#options KTR_ENTRIES=16384 -#options KTR_MASK=(KTR_SPARE2) -#options KTR_COMPILE=KTR_ALL - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -73,7 +51,6 @@ device loop device md # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: stable/11/sys/arm/conf/ATMEL ============================================================================== --- stable/11/sys/arm/conf/ATMEL Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/ATMEL Fri Jul 15 21:30:19 2016 (r302915) @@ -31,8 +31,6 @@ device at91_board_sam9x25ek device at91_board_sn9g45 device at91_board_tsc4370 -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking @@ -72,20 +70,6 @@ options PRINTF_BUFR_SIZE=128 # Prevent #options MAC # TrustedBSD MAC Framework #options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging support. Always need this: -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options GDB # Support remote GDB -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -152,10 +136,8 @@ device ses # Enclosure Services (SES # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/11/sys/arm/conf/AVILA ============================================================================== --- stable/11/sys/arm/conf/AVILA Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/AVILA Fri Jul 15 21:30:19 2016 (r302915) @@ -29,23 +29,11 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT hints "AVILA.hints" # Default places to look for devices. makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale #options HZ=1000 options HZ=100 options DEVICE_POLLING -# Debugging for use in -current -options KDB -#options GDB -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options GEOM_PART_BSD # BSD partition scheme @@ -146,7 +134,6 @@ device ath_ar9160 device ath_ar9280 device usb -#options USB_DEBUG device ohci device ehci device umass Modified: stable/11/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/11/sys/arm/conf/BEAGLEBONE Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/BEAGLEBONE Fri Jul 15 21:30:19 2016 (r302915) @@ -34,21 +34,6 @@ options HZ=100 options SCHED_4BSD # 4BSD scheduler options PLATFORM -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - # NFS server support #options NFSD @@ -114,9 +99,6 @@ device pmu # USB support device usb options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE device musb device umass device scbus # SCSI bus (required for ATA/SCSI) Modified: stable/11/sys/arm/conf/BWCT ============================================================================== --- stable/11/sys/arm/conf/BWCT Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/BWCT Fri Jul 15 21:30:19 2016 (r302915) @@ -30,8 +30,6 @@ include "../at91/std.bwct" hints "BWCT.hints" makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -59,16 +57,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - options BOOTP options BOOTP_NFSROOT @@ -120,11 +108,8 @@ device md # Memory "disks" # Serial (COM) ports device uart # Multi-uart driver -options BREAK_TO_DEBUGGER -options ALT_BREAK_TO_DEBUGGER # USB support -#options USB_DEBUG #device ohci #device usb #device umass # Disks/Mass storage - Requires scbus and da Modified: stable/11/sys/arm/conf/CAMBRIA ============================================================================== --- stable/11/sys/arm/conf/CAMBRIA Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/CAMBRIA Fri Jul 15 21:30:19 2016 (r302915) @@ -28,24 +28,12 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT #To statically compile in device wiring instead of /boot/device.hints hints "CAMBRIA.hints" # Default places to look for devices. -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale makeoptions MODULES_OVERRIDE="" #options HZ=1000 options HZ=100 options DEVICE_POLLING -# Debugging for use in -current -options KDB -#options GDB -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - options SCHED_4BSD # 4BSD scheduler #options PREEMPTION options INET # InterNETworking @@ -141,7 +129,6 @@ device ath_hal # NB: 2 USB 2.0 ports standard device usb options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order -#options USB_DEBUG device ehci device umass device scbus # SCSI bus (required for ATA/SCSI) Modified: stable/11/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/11/sys/arm/conf/CNS11XXNAS Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/CNS11XXNAS Fri Jul 15 21:30:19 2016 (r302915) @@ -30,21 +30,9 @@ include "../cavium/cns11xx/std.econa" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 options DEVICE_POLLING -# Debugging for use in -current -options KDB -#options GDB -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -##options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - options SCHED_ULE # ULE scheduler #options SCHED_4BSD # 4BSD scheduler @@ -102,7 +90,6 @@ device random # Entropy device device usb -#options USB_DEBUG device ohci device ehci device umass Modified: stable/11/sys/arm/conf/CRB ============================================================================== --- stable/11/sys/arm/conf/CRB Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/CRB Fri Jul 15 21:30:19 2016 (r302915) @@ -27,10 +27,8 @@ options COUNTS_PER_SEC=400000000 include "../xscale/i8134x/std.crb" makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale options HZ=100 -options BREAK_TO_DEBUGGER #options DEVICE_POLLING options SCHED_4BSD # 4BSD scheduler @@ -90,16 +88,6 @@ device "7seg" #options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. -# Debugging for use in -current -options KDB -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: stable/11/sys/arm/conf/DB-78XXX ============================================================================== --- stable/11/sys/arm/conf/DB-78XXX Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/DB-78XXX Fri Jul 15 21:30:19 2016 (r302915) @@ -10,7 +10,6 @@ include "../mv/discovery/std.db78xxx" options SOC_MV_DISCOVERY -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler @@ -40,18 +39,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging -options ALT_BREAK_TO_DEBUGGER -options DDB -#options DEADLKRES # Enable the deadlock resolver -#options DIAGNOSTIC -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - device pci # Pseudo devices @@ -71,7 +58,6 @@ device e1000phy device bpf # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: stable/11/sys/arm/conf/DB-88F5XXX ============================================================================== --- stable/11/sys/arm/conf/DB-88F5XXX Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/DB-88F5XXX Fri Jul 15 21:30:19 2016 (r302915) @@ -10,7 +10,6 @@ include "../mv/orion/std.db88f5xxx" options SOC_MV_ORION -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler @@ -39,18 +38,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging -options ALT_BREAK_TO_DEBUGGER -options DDB -#options DEADLKRES # Enable the deadlock resolver -#options DIAGNOSTIC -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - device pci # Pseudo devices @@ -78,7 +65,6 @@ device twsi device ds133x # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: stable/11/sys/arm/conf/DB-88F6XXX ============================================================================== --- stable/11/sys/arm/conf/DB-88F6XXX Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/DB-88F6XXX Fri Jul 15 21:30:19 2016 (r302915) @@ -32,19 +32,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging for use in -current -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB -#options DIAGNOSTIC - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -76,7 +63,6 @@ device crypto device cryptodev # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: stable/11/sys/arm/conf/DOCKSTAR ============================================================================== --- stable/11/sys/arm/conf/DOCKSTAR Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/DOCKSTAR Fri Jul 15 21:30:19 2016 (r302915) @@ -48,18 +48,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB -#options DIAGNOSTIC - # Enable these options for nfs root configured via BOOTP. #options BOOTP #options BOOTP_NFSROOT @@ -101,7 +89,6 @@ device e1000phy # USB options USB_HOST_ALIGN=32 # Align DMA to cacheline -#options USB_DEBUG # Compile in USB debug support device usb # Basic usb support device ehci # USB host controller device umass # Mass storage Modified: stable/11/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- stable/11/sys/arm/conf/DREAMPLUG-1001 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/DREAMPLUG-1001 Fri Jul 15 21:30:19 2016 (r302915) @@ -51,18 +51,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB -#options DIAGNOSTIC - # Enable these options for nfs root configured via BOOTP. #options BOOTP #options BOOTP_NFSROOT @@ -105,7 +93,6 @@ device e1000phy # USB options USB_HOST_ALIGN=32 # Align DMA to cacheline -#options USB_DEBUG # Compile in USB debug support device usb # Basic usb support device ehci # USB host controller device umass # Mass storage Modified: stable/11/sys/arm/conf/EA3250 ============================================================================== --- stable/11/sys/arm/conf/EA3250 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/EA3250 Fri Jul 15 21:30:19 2016 (r302915) @@ -11,7 +11,6 @@ hints "EA3250.hints" makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler @@ -41,18 +40,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging -options ALT_BREAK_TO_DEBUGGER -options DDB -#options DEADLKRES # Enable the deadlock resolver -#options DIAGNOSTIC -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - # Pseudo devices device loop device md @@ -69,7 +56,6 @@ device bpf device lpe # USB -options USB_DEBUG device usb device ohci device umass Modified: stable/11/sys/arm/conf/EB9200 ============================================================================== --- stable/11/sys/arm/conf/EB9200 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/EB9200 Fri Jul 15 21:30:19 2016 (r302915) @@ -23,8 +23,6 @@ include "../at91/std.eb9200" hints "EB9200.hints" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -53,15 +51,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -115,7 +104,6 @@ device pass # Passthrough device (dir device uart # Multi-uart driver # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/11/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/11/sys/arm/conf/EFIKA_MX Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/EFIKA_MX Fri Jul 15 21:30:19 2016 (r302915) @@ -33,22 +33,6 @@ options SCHED_4BSD # 4BSD scheduler options PLATFORM options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#options GDB # Support remote GDB -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -83,7 +67,6 @@ device ether # Ethernet support # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions @@ -104,7 +87,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -#options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/11/sys/arm/conf/ETHERNUT5 ============================================================================== --- stable/11/sys/arm/conf/ETHERNUT5 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/ETHERNUT5 Fri Jul 15 21:30:19 2016 (r302915) @@ -27,8 +27,6 @@ include "../at91/std.ethernut5" # To statically compile in device wiring instead of /boot/device.hints hints "ETHERNUT5.hints" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking @@ -68,20 +66,6 @@ options PRINTF_BUFR_SIZE=128 # Prevent #options MAC # TrustedBSD MAC Framework #options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging support. Always need this: -#options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -#options DDB # Enable the kernel debugger -#options GDB # Support remote GDB -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -148,10 +132,8 @@ device ether # Ethernet support # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER # USB support -#options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) #device umass # Disks/Mass storage - Requires scbus and da Modified: stable/11/sys/arm/conf/EXYNOS5.common ============================================================================== --- stable/11/sys/arm/conf/EXYNOS5.common Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/EXYNOS5.common Fri Jul 15 21:30:19 2016 (r302915) @@ -56,21 +56,6 @@ options FREEBSD_BOOT_LOADER # Process m options VFP # Enable floating point hardware support options SMP # Enable multiple cores -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -103,9 +88,6 @@ device gpio # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device musb device ehci #device ohci Modified: stable/11/sys/arm/conf/GUMSTIX ============================================================================== --- stable/11/sys/arm/conf/GUMSTIX Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/GUMSTIX Fri Jul 15 21:30:19 2016 (r302915) @@ -33,7 +33,6 @@ options KERNVIRTADDR=0xc0200000 # Used include "../xscale/pxa/std.pxa" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 #options DEVICE_POLLING @@ -78,15 +77,5 @@ device smcphy device uart device uart_ns8250 -# Debugging for use in -current -options KDB -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - device md device random # Entropy device Modified: stable/11/sys/arm/conf/HL200 ============================================================================== --- stable/11/sys/arm/conf/HL200 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/HL200 Fri Jul 15 21:30:19 2016 (r302915) @@ -28,8 +28,6 @@ include "../at91/std.hl200" hints "KB920X.hints" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -57,15 +55,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed - options BOOTP options BOOTP_NFSROOT options BOOTP_COMPAT @@ -123,7 +112,6 @@ device pass # Passthrough device (dir device uart # Multi-uart driver # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices Modified: stable/11/sys/arm/conf/HL201 ============================================================================== --- stable/11/sys/arm/conf/HL201 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/HL201 Fri Jul 15 21:30:19 2016 (r302915) @@ -26,8 +26,6 @@ include "../at91/std.hl201" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -56,15 +54,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -114,7 +103,6 @@ device pass # Passthrough device (dir # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER # USB support device ohci # OHCI USB interface Modified: stable/11/sys/arm/conf/IMX53 ============================================================================== --- stable/11/sys/arm/conf/IMX53 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/IMX53 Fri Jul 15 21:30:19 2016 (r302915) @@ -30,20 +30,6 @@ options SCHED_4BSD # 4BSD scheduler options PLATFORM options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#options GDB # Support remote GDB -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed - # kernel/memory size reduction #options MUTEX_NOINLINE #options NO_FFS_SNAPSHOT @@ -72,7 +58,6 @@ device miibus # Standard mii bus # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions @@ -93,7 +78,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/11/sys/arm/conf/IMX6 ============================================================================== --- stable/11/sys/arm/conf/IMX6 Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/IMX6 Fri Jul 15 21:30:19 2016 (r302915) @@ -33,23 +33,6 @@ options INCLUDE_CONFIG_FILE # Include t options PLATFORM options SMP # Enable multiple cores -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#options GDB # Support remote GDB. -# Other debugging options... -options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -97,7 +80,6 @@ device cd # CD device pass # Passthrough device (direct ATA/SCSI access) # USB support -#options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/11/sys/arm/conf/KB920X ============================================================================== --- stable/11/sys/arm/conf/KB920X Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/KB920X Fri Jul 15 21:30:19 2016 (r302915) @@ -29,8 +29,6 @@ include "../at91/std.kb920x" hints "KB920X.hints" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -58,15 +56,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -130,7 +119,6 @@ device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices Modified: stable/11/sys/arm/conf/NSLU ============================================================================== --- stable/11/sys/arm/conf/NSLU Fri Jul 15 20:27:21 2016 (r302914) +++ stable/11/sys/arm/conf/NSLU Fri Jul 15 21:30:19 2016 (r302915) @@ -36,22 +36,10 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT hints "NSLU.hints" # Default places to look for devices. makeoptions MODULES_OVERRIDE="" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Sat Jul 16 02:47:58 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29283B9AE64; Sat, 16 Jul 2016 02:47:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7A8715C6; Sat, 16 Jul 2016 02:47:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6G2lvqD052127; Sat, 16 Jul 2016 02:47:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6G2lvtK052126; Sat, 16 Jul 2016 02:47:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607160247.u6G2lvtK052126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 16 Jul 2016 02:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302922 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 02:47:58 -0000 Author: markj Date: Sat Jul 16 02:47:56 2016 New Revision: 302922 URL: https://svnweb.freebsd.org/changeset/base/302922 Log: MFC r301210: Don't preserve the page's object linkage in vm_page_insert_after(). Modified: stable/10/sys/vm/vm_page.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c ============================================================================== --- stable/10/sys/vm/vm_page.c Sat Jul 16 00:54:46 2016 (r302921) +++ stable/10/sys/vm/vm_page.c Sat Jul 16 02:47:56 2016 (r302922) @@ -981,8 +981,6 @@ static int vm_page_insert_after(vm_page_t m, vm_object_t object, vm_pindex_t pindex, vm_page_t mpred) { - vm_pindex_t sidx; - vm_object_t sobj; vm_page_t msucc; VM_OBJECT_ASSERT_WLOCKED(object); @@ -1003,8 +1001,6 @@ vm_page_insert_after(vm_page_t m, vm_obj /* * Record the object/offset pair in this page */ - sobj = m->object; - sidx = m->pindex; m->object = object; m->pindex = pindex; @@ -1012,8 +1008,8 @@ vm_page_insert_after(vm_page_t m, vm_obj * Now link into the object's ordered list of backed pages. */ if (vm_radix_insert(&object->rtree, m)) { - m->object = sobj; - m->pindex = sidx; + m->object = NULL; + m->pindex = 0; return (1); } vm_page_insert_radixdone(m, object, mpred); From owner-svn-src-stable@freebsd.org Sat Jul 16 02:49:03 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9949B9AFA6; Sat, 16 Jul 2016 02:49:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6BD217B3; Sat, 16 Jul 2016 02:49:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6G2n2vX052221; Sat, 16 Jul 2016 02:49:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6G2n23L052220; Sat, 16 Jul 2016 02:49:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607160249.u6G2n23L052220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 16 Jul 2016 02:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302923 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 02:49:04 -0000 Author: markj Date: Sat Jul 16 02:49:02 2016 New Revision: 302923 URL: https://svnweb.freebsd.org/changeset/base/302923 Log: MFC r301212: Reset the page busy lock state after failing to insert into the object. Modified: stable/10/sys/vm/vm_page.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c ============================================================================== --- stable/10/sys/vm/vm_page.c Sat Jul 16 02:47:56 2016 (r302922) +++ stable/10/sys/vm/vm_page.c Sat Jul 16 02:49:02 2016 (r302923) @@ -1636,6 +1636,7 @@ vm_page_alloc(vm_object_t object, vm_pin } m->object = NULL; m->oflags = VPO_UNMANAGED; + m->busy_lock = VPB_UNBUSIED; vm_page_free(m); return (NULL); } @@ -1838,6 +1839,7 @@ retry: m->object = NULL; m->oflags |= VPO_UNMANAGED; } + m->busy_lock = VPB_UNBUSIED; vm_page_free(m); } return (NULL); From owner-svn-src-stable@freebsd.org Sat Jul 16 02:53:53 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 705FAB9A189; Sat, 16 Jul 2016 02:53:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39A871BD5; Sat, 16 Jul 2016 02:53:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6G2rq5I055643; Sat, 16 Jul 2016 02:53:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6G2rq6x055642; Sat, 16 Jul 2016 02:53:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607160253.u6G2rq6x055642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 16 Jul 2016 02:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302924 - stable/10/usr.bin/mkimg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 02:53:53 -0000 Author: markj Date: Sat Jul 16 02:53:52 2016 New Revision: 302924 URL: https://svnweb.freebsd.org/changeset/base/302924 Log: MFC r301090: mkimg: Indicate that input file pages are unlikely to be reused. Modified: stable/10/usr.bin/mkimg/image.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/image.c ============================================================================== --- stable/10/usr.bin/mkimg/image.c Sat Jul 16 02:49:02 2016 (r302923) +++ stable/10/usr.bin/mkimg/image.c Sat Jul 16 02:53:52 2016 (r302924) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -315,6 +316,8 @@ image_file_unmap(void *buffer, size_t sz unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; sz = (sz + unit - 1) & ~(unit - 1); + if (madvise(buffer, sz, MADV_DONTNEED) != 0) + warn("madvise"); munmap(buffer, sz); return (0); } From owner-svn-src-stable@freebsd.org Sat Jul 16 02:55:03 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C54F6B9A217; Sat, 16 Jul 2016 02:55:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B5C41D32; Sat, 16 Jul 2016 02:55:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6G2t2as055761; Sat, 16 Jul 2016 02:55:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6G2t22D055760; Sat, 16 Jul 2016 02:55:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607160255.u6G2t22D055760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 16 Jul 2016 02:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302925 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 02:55:03 -0000 Author: markj Date: Sat Jul 16 02:55:02 2016 New Revision: 302925 URL: https://svnweb.freebsd.org/changeset/base/302925 Log: MFC r302346: Ensure that spinlock sections are balanced even after a panic. Modified: stable/10/sys/kern/kern_mutex.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Sat Jul 16 02:53:52 2016 (r302924) +++ stable/10/sys/kern/kern_mutex.c Sat Jul 16 02:55:02 2016 (r302925) @@ -658,8 +658,15 @@ thread_lock_flags_(struct thread *td, in i = 0; tid = (uintptr_t)curthread; - if (SCHEDULER_STOPPED()) + if (SCHEDULER_STOPPED()) { + /* + * Ensure that spinlock sections are balanced even when the + * scheduler is stopped, since we may otherwise inadvertently + * re-enable interrupts while dumping core. + */ + spinlock_enter(); return; + } #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&td->td_lock->lock_object); From owner-svn-src-stable@freebsd.org Sat Jul 16 02:57:39 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B196B9A304; Sat, 16 Jul 2016 02:57:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF18F1ECC; Sat, 16 Jul 2016 02:57:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6G2vcUx055894; Sat, 16 Jul 2016 02:57:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6G2vcib055893; Sat, 16 Jul 2016 02:57:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607160257.u6G2vcib055893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 16 Jul 2016 02:57:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302926 - stable/10/sys/ofed/include/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 02:57:39 -0000 Author: markj Date: Sat Jul 16 02:57:37 2016 New Revision: 302926 URL: https://svnweb.freebsd.org/changeset/base/302926 Log: MFC r301877: Add a missing error check for a malloc() call in idr_get(). Modified: stable/10/sys/ofed/include/linux/linux_idr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/linux_idr.c ============================================================================== --- stable/10/sys/ofed/include/linux/linux_idr.c Sat Jul 16 02:55:02 2016 (r302925) +++ stable/10/sys/ofed/include/linux/linux_idr.c Sat Jul 16 02:57:37 2016 (r302926) @@ -267,7 +267,8 @@ idr_get(struct idr *idr) return (il); } il = malloc(sizeof(*il), M_IDR, M_ZERO | M_NOWAIT); - bitmap_fill(&il->bitmap, IDR_SIZE); + if (il != NULL) + bitmap_fill(&il->bitmap, IDR_SIZE); return (il); } From owner-svn-src-stable@freebsd.org Sat Jul 16 06:41:03 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5382BB99BD7; Sat, 16 Jul 2016 06:41:03 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 284A71682; Sat, 16 Jul 2016 06:41:03 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6G6f2j2038813; Sat, 16 Jul 2016 06:41:02 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6G6f2kT038812; Sat, 16 Jul 2016 06:41:02 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201607160641.u6G6f2kT038812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Sat, 16 Jul 2016 06:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302927 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 06:41:03 -0000 Author: truckman Date: Sat Jul 16 06:41:02 2016 New Revision: 302927 URL: https://svnweb.freebsd.org/changeset/base/302927 Log: MFC r302667 Fix problems in the FQ-PIE AQM cleanup code that could leak memory or cause a crash. Because dummynet calls pie_cleanup() while holding a mutex, pie_cleanup() is not able to use callout_drain() to make sure that all callouts are finished before it returns, and callout_stop() is not sufficient to make that guarantee. After pie_cleanup() returns, dummynet will free a structure that any remaining callouts will want to access. Fix these problems by allocating a separate structure to contain the data used by the callouts. In pie_cleanup(), call callout_reset_sbt() to replace the normal callout with a cleanup callout that does the cleanup work for each sub-queue. The instance of the cleanup callout that destroys the last flow will also free the extra allocated block of memory. Protect the reference count manipulation in the cleanup callout with DN_BH_WLOCK() to be consistent with all of the other usage of the reference count where this lock is held by the dummynet code. Submitted by: Rasool Al-Saadi Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7174 Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Sat Jul 16 02:57:37 2016 (r302926) +++ stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Sat Jul 16 06:41:02 2016 (r302927) @@ -111,7 +111,7 @@ struct fq_pie_flow { int deficit; int active; /* 1: flow is active (in a list) */ struct pie_status pst; /* pie status variables */ - struct fq_pie_si *psi; /* parent scheduler instance */ + struct fq_pie_si_extra *psi_extra; STAILQ_ENTRY(fq_pie_flow) flowchain; }; @@ -120,23 +120,30 @@ struct fq_pie_schk { struct dn_sch_fq_pie_parms cfg; }; + +/* fq_pie scheduler instance extra state vars. + * The purpose of separation this structure is to preserve number of active + * sub-queues and the flows array pointer even after the scheduler instance + * is destroyed. + * Preserving these varaiables allows freeing the allocated memory by + * fqpie_callout_cleanup() independently from fq_pie_free_sched(). + */ +struct fq_pie_si_extra { + uint32_t nr_active_q; /* number of active queues */ + struct fq_pie_flow *flows; /* array of flows (queues) */ + }; + /* fq_pie scheduler instance */ struct fq_pie_si { - struct dn_sch_inst _si; /* standard scheduler instance */ + struct dn_sch_inst _si; /* standard scheduler instance. SHOULD BE FIRST */ struct dn_queue main_q; /* main queue is after si directly */ - uint32_t nr_active_q; - struct fq_pie_flow *flows; /* array of flows (queues) */ uint32_t perturbation; /* random value */ struct fq_pie_list newflows; /* list of new queues */ struct fq_pie_list oldflows; /* list of old queues */ + struct fq_pie_si_extra *si_extra; /* extra state vars*/ }; -struct mem_to_free { - void *mem_flows; - void *mem_callout; -}; -static struct mtx freemem_mtx; static struct dn_alg fq_pie_desc; /* Default FQ-PIE parameters including PIE */ @@ -371,22 +378,6 @@ fq_calculate_drop_prob(void *x) int64_t p, prob, oldprob; aqm_time_t now; - /* dealing with race condition */ - if (callout_pending(&pst->aqm_pie_callout)) { - /* callout was reset */ - mtx_unlock(&pst->lock_mtx); - return; - } - - if (!callout_active(&pst->aqm_pie_callout)) { - /* callout was stopped */ - mtx_unlock(&pst->lock_mtx); - mtx_destroy(&pst->lock_mtx); - q->psi->nr_active_q--; - return; - } - callout_deactivate(&pst->aqm_pie_callout); - now = AQM_UNOW; pprms = pst->parms; prob = pst->drop_prob; @@ -524,20 +515,17 @@ fq_deactivate_pie(struct pie_status *pst * Initialize PIE for sub-queue 'q' */ static int -pie_init(struct fq_pie_flow *q) +pie_init(struct fq_pie_flow *q, struct fq_pie_schk *fqpie_schk) { struct pie_status *pst=&q->pst; struct dn_aqm_pie_parms *pprms = pst->parms; - struct fq_pie_schk *fqpie_schk; - - fqpie_schk = (struct fq_pie_schk *)(q->psi->_si.sched+1); - int err = 0; + int err = 0; if (!pprms){ D("AQM_PIE is not configured"); err = EINVAL; } else { - q->psi->nr_active_q++; + q->psi_extra->nr_active_q++; /* For speed optimization, we caculate 1/3 queue size once here */ // XXX limit divided by number of queues divided by 3 ??? @@ -553,8 +541,36 @@ pie_init(struct fq_pie_flow *q) } /* + * callout function to destroy PIE lock, and free fq_pie flows and fq_pie si + * extra memory when number of active sub-queues reaches zero. + * 'x' is a fq_pie_flow to be destroyed + */ +static void +fqpie_callout_cleanup(void *x) +{ + struct fq_pie_flow *q = x; + struct pie_status *pst = &q->pst; + struct fq_pie_si_extra *psi_extra; + + mtx_unlock(&pst->lock_mtx); + mtx_destroy(&pst->lock_mtx); + psi_extra = q->psi_extra; + + DN_BH_WLOCK(); + psi_extra->nr_active_q--; + + /* when all sub-queues are destroyed, free flows fq_pie extra vars memory */ + if (!psi_extra->nr_active_q) { + free(psi_extra->flows, M_DUMMYNET); + free(psi_extra, M_DUMMYNET); + fq_pie_desc.ref_count--; + } + DN_BH_WUNLOCK(); +} + +/* * Clean up PIE status for sub-queue 'q' - * Stop callout timer and destroy mtx + * Stop callout timer and destroy mtx using fqpie_callout_cleanup() callout. */ static int pie_cleanup(struct fq_pie_flow *q) @@ -562,14 +578,9 @@ pie_cleanup(struct fq_pie_flow *q) struct pie_status *pst = &q->pst; mtx_lock(&pst->lock_mtx); - if (callout_stop(&pst->aqm_pie_callout) || !(pst->sflags & PIE_ACTIVE)) { - mtx_unlock(&pst->lock_mtx); - mtx_destroy(&pst->lock_mtx); - q->psi->nr_active_q--; - } else { - mtx_unlock(&pst->lock_mtx); - return EBUSY; - } + callout_reset_sbt(&pst->aqm_pie_callout, + SBT_1US, 0, fqpie_callout_cleanup, q, 0); + mtx_unlock(&pst->lock_mtx); return 0; } @@ -831,10 +842,12 @@ fq_pie_enqueue(struct dn_sch_inst *_si, struct fq_pie_schk *schk; struct dn_sch_fq_pie_parms *param; struct dn_queue *mainq; + struct fq_pie_flow *flows; int idx, drop, i, maxidx; mainq = (struct dn_queue *)(_si + 1); si = (struct fq_pie_si *)_si; + flows = si->si_extra->flows; schk = (struct fq_pie_schk *)(si->_si.sched+1); param = &schk->cfg; @@ -844,7 +857,7 @@ fq_pie_enqueue(struct dn_sch_inst *_si, /* enqueue packet into appropriate queue using PIE AQM. * Note: 'pie_enqueue' function returns 1 only when it unable to * add timestamp to packet (no limit check)*/ - drop = pie_enqueue(&si->flows[idx], m, si); + drop = pie_enqueue(&flows[idx], m, si); /* pie unable to timestamp a packet */ if (drop) @@ -853,11 +866,11 @@ fq_pie_enqueue(struct dn_sch_inst *_si, /* If the flow (sub-queue) is not active ,then add it to tail of * new flows list, initialize and activate it. */ - if (!si->flows[idx].active) { - STAILQ_INSERT_TAIL(&si->newflows, &si->flows[idx], flowchain); - si->flows[idx].deficit = param->quantum; - fq_activate_pie(&si->flows[idx]); - si->flows[idx].active = 1; + if (!flows[idx].active) { + STAILQ_INSERT_TAIL(&si->newflows, &flows[idx], flowchain); + flows[idx].deficit = param->quantum; + fq_activate_pie(&flows[idx]); + flows[idx].active = 1; } /* check the limit for all queues and remove a packet from the @@ -866,15 +879,15 @@ fq_pie_enqueue(struct dn_sch_inst *_si, if (mainq->ni.length > schk->cfg.limit) { /* find first active flow */ for (maxidx = 0; maxidx < schk->cfg.flows_cnt; maxidx++) - if (si->flows[maxidx].active) + if (flows[maxidx].active) break; if (maxidx < schk->cfg.flows_cnt) { /* find the largest sub- queue */ for (i = maxidx + 1; i < schk->cfg.flows_cnt; i++) - if (si->flows[i].active && si->flows[i].stats.length > - si->flows[maxidx].stats.length) + if (flows[i].active && flows[i].stats.length > + flows[maxidx].stats.length) maxidx = i; - pie_drop_head(&si->flows[maxidx], si); + pie_drop_head(&flows[maxidx], si); drop = 1; } } @@ -974,12 +987,13 @@ fq_pie_new_sched(struct dn_sch_inst *_si struct fq_pie_si *si; struct dn_queue *q; struct fq_pie_schk *schk; + struct fq_pie_flow *flows; int i; si = (struct fq_pie_si *)_si; schk = (struct fq_pie_schk *)(_si->sched+1); - if(si->flows) { + if(si->si_extra) { D("si already configured!"); return 0; } @@ -990,17 +1004,27 @@ fq_pie_new_sched(struct dn_sch_inst *_si q->_si = _si; q->fs = _si->sched->fs; + /* allocate memory for scheduler instance extra vars */ + si->si_extra = malloc(sizeof(struct fq_pie_si_extra), + M_DUMMYNET, M_NOWAIT | M_ZERO); + if (si->si_extra == NULL) { + D("cannot allocate memory for fq_pie si extra vars"); + return ENOMEM ; + } /* allocate memory for flows array */ - si->flows = malloc(schk->cfg.flows_cnt * sizeof(struct fq_pie_flow), + si->si_extra->flows = malloc(schk->cfg.flows_cnt * sizeof(struct fq_pie_flow), M_DUMMYNET, M_NOWAIT | M_ZERO); - if (si->flows == NULL) { - D("cannot allocate memory for fq_pie configuration parameters"); + flows = si->si_extra->flows; + if (flows == NULL) { + free(si->si_extra, M_DUMMYNET); + si->si_extra = NULL; + D("cannot allocate memory for fq_pie flows"); return ENOMEM ; } /* init perturbation for this si */ si->perturbation = random(); - si->nr_active_q = 0; + si->si_extra->nr_active_q = 0; /* init the old and new flows lists */ STAILQ_INIT(&si->newflows); @@ -1008,45 +1032,16 @@ fq_pie_new_sched(struct dn_sch_inst *_si /* init the flows (sub-queues) */ for (i = 0; i < schk->cfg.flows_cnt; i++) { - si->flows[i].pst.parms = &schk->cfg.pcfg; - si->flows[i].psi = si; - pie_init(&si->flows[i]); - } - - /* init mtx lock and callout function for free memory */ - if (!fq_pie_desc.ref_count) { - mtx_init(&freemem_mtx, "mtx_pie", NULL, MTX_DEF); + flows[i].pst.parms = &schk->cfg.pcfg; + flows[i].psi_extra = si->si_extra; + pie_init(&flows[i], schk); } - mtx_lock(&freemem_mtx); fq_pie_desc.ref_count++; - mtx_unlock(&freemem_mtx); return 0; } -/* - * Free FQ-PIE flows memory callout function. - * This function is scheduled when a flow or more still active and - * the scheduer is about to be destroyed, to prevent memory leak. - */ -static void -free_flows(void *_mem) -{ - struct mem_to_free *mem = _mem; - - free(mem->mem_flows, M_DUMMYNET); - free(mem->mem_callout, M_DUMMYNET); - free(_mem, M_DUMMYNET); - - fq_pie_desc.ref_count--; - if (!fq_pie_desc.ref_count) { - mtx_unlock(&freemem_mtx); - mtx_destroy(&freemem_mtx); - } else - mtx_unlock(&freemem_mtx); - //D("mem freed ok!"); -} /* * Free fq_pie scheduler instance. @@ -1056,61 +1051,17 @@ fq_pie_free_sched(struct dn_sch_inst *_s { struct fq_pie_si *si; struct fq_pie_schk *schk; + struct fq_pie_flow *flows; int i; si = (struct fq_pie_si *)_si; schk = (struct fq_pie_schk *)(_si->sched+1); - + flows = si->si_extra->flows; for (i = 0; i < schk->cfg.flows_cnt; i++) { - pie_cleanup(&si->flows[i]); - } - - /* if there are still some queues have a callout going to start, - * we cannot free flows memory. If we do so, a panic can happen - * as prob calculate callout function uses flows memory. - */ - if (!si->nr_active_q) { - /* free the flows array */ - free(si->flows , M_DUMMYNET); - si->flows = NULL; - mtx_lock(&freemem_mtx); - fq_pie_desc.ref_count--; - if (!fq_pie_desc.ref_count) { - mtx_unlock(&freemem_mtx); - mtx_destroy(&freemem_mtx); - } else - mtx_unlock(&freemem_mtx); - //D("ok!"); - return 0; - } else { - /* memory leak happens here. So, we register a callout function to free - * flows memory later. - */ - D("unable to stop all fq_pie sub-queues!"); - mtx_lock(&freemem_mtx); - - struct callout *mem_callout; - struct mem_to_free *mem; - - mem = malloc(sizeof(*mem), M_DUMMYNET, - M_NOWAIT | M_ZERO); - mem_callout = malloc(sizeof(*mem_callout), M_DUMMYNET, - M_NOWAIT | M_ZERO); - - callout_init_mtx(mem_callout, &freemem_mtx, - CALLOUT_RETURNUNLOCKED); - - mem->mem_flows = si->flows; - mem->mem_callout = mem_callout; - callout_reset_sbt(mem_callout, - (uint64_t)(si->flows[0].pst.parms->tupdate + 1000) * SBT_1US, - 0, free_flows, mem, 0); - - si->flows = NULL; - mtx_unlock(&freemem_mtx); - - return EBUSY; + pie_cleanup(&flows[i]); } + si->si_extra = NULL; + return 0; } /* From owner-svn-src-stable@freebsd.org Sat Jul 16 08:17:15 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC170B993EF; Sat, 16 Jul 2016 08:17:15 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD4E81322; Sat, 16 Jul 2016 08:17:15 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6G8HE2O074230; Sat, 16 Jul 2016 08:17:14 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6G8HEHr074229; Sat, 16 Jul 2016 08:17:14 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201607160817.u6G8HEHr074229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 16 Jul 2016 08:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302931 - stable/10/release/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 08:17:16 -0000 Author: cperciva Date: Sat Jul 16 08:17:14 2016 New Revision: 302931 URL: https://svnweb.freebsd.org/changeset/base/302931 Log: MFH r301732, r302288 Updates to EC2 loader.conf: * Use console=comconsole (r301732) since EC2 now has a "VGA" console; * Enable blkif indirect segment I/O (r302288) since EC2 now consistently gets better disk performance with this option enabled. Modified: stable/10/release/tools/ec2.conf Modified: stable/10/release/tools/ec2.conf ============================================================================== --- stable/10/release/tools/ec2.conf Sat Jul 16 08:11:43 2016 (r302930) +++ stable/10/release/tools/ec2.conf Sat Jul 16 08:17:14 2016 (r302931) @@ -62,19 +62,16 @@ vm_extra_pre_umount() { echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf - # The EC2 console is an emulated serial port. - echo 'console="comconsole"' >> ${DESTDIR}/boot/loader.conf + # EC2 has two consoles: An emulated serial port ("system log"), + # which has been present since 2006; and a VGA console ("instance + # screenshot") which was introduced in 2016. + echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf # Some older EC2 hardware used a version of Xen with a bug in its # emulated serial port. It is not clear if EC2 still has any such # nodes, but apply the workaround just in case. echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf - # Some EC2 instances suffer a significant (~40%) reduction in - # throughput when using blkif indirect segment I/Os. Disable this - # by default for now. - echo 'hw.xbd.xbd_enable_indirect="0"' >> ${DESTDIR}/boot/loader.conf - # The first time the AMI boots, the installed "first boot" scripts # should be allowed to run: # * ec2_configinit (download and process EC2 user-data) From owner-svn-src-stable@freebsd.org Sat Jul 16 10:50:29 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D71D4B9B22B; Sat, 16 Jul 2016 10:50:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D84419C1; Sat, 16 Jul 2016 10:50:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6GAoS2L030175; Sat, 16 Jul 2016 10:50:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6GAoSMl030174; Sat, 16 Jul 2016 10:50:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201607161050.u6GAoSMl030174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Jul 2016 10:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302934 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 10:50:30 -0000 Author: dim Date: Sat Jul 16 10:50:28 2016 New Revision: 302934 URL: https://svnweb.freebsd.org/changeset/base/302934 Log: MFC r302784: Fix a page fault in ip6_setpktopt(), occurring when the pflog module is loaded, and syncthing is started, which uses setsockopt(IPV6_PKGINFO). This is because pflog interfaces do not normally have an IPv6 address, causing the ND_IFINFO() macro to dereference a NULL pointer. Approved by: re (kib) Reviewed by: ae PR: 210943 Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Sat Jul 16 09:44:31 2016 (r302933) +++ stable/11/sys/netinet6/ip6_output.c Sat Jul 16 10:50:28 2016 (r302934) @@ -2659,8 +2659,8 @@ ip6_setpktopt(int optname, u_char *buf, if (ifp == NULL) return (ENXIO); } - if (ifp != NULL && ( - ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) + if (ifp != NULL && (ifp->if_afdata[AF_INET6] == NULL || + (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) != 0)) return (ENETDOWN); if (ifp != NULL && From owner-svn-src-stable@freebsd.org Sat Jul 16 15:52:16 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 638A4B9B17C; Sat, 16 Jul 2016 15:52:16 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 095B11A91; Sat, 16 Jul 2016 15:52:15 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6GFqFVD042113; Sat, 16 Jul 2016 15:52:15 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6GFqFmY042112; Sat, 16 Jul 2016 15:52:15 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201607161552.u6GFqFmY042112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 16 Jul 2016 15:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302938 - stable/11/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2016 15:52:16 -0000 Author: vangyzen Date: Sat Jul 16 15:52:14 2016 New Revision: 302938 URL: https://svnweb.freebsd.org/changeset/base/302938 Log: MFC r302787 zpool(8): update Hot Spares section to mention zfsd(8) Approved by: re (gjb) Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sat Jul 16 13:26:18 2016 (r302937) +++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sat Jul 16 15:52:14 2016 (r302938) @@ -465,6 +465,15 @@ place in the configuration, and is remov pools. .Pp Spares cannot replace log devices. +.Pp +This feature requires a userland helper. +FreeBSD provides +.Xr zfsd 8 +for this purpose. +It must be manually enabled by adding +.Va zfsd_enable="YES" +to +.Pa /etc/rc.conf . .Ss Intent Log The .Tn ZFS @@ -2023,7 +2032,8 @@ Discarded approximately 29 seconds of tr .El .Sh SEE ALSO .Xr zpool-features 7 , -.Xr zfs 8 +.Xr zfs 8 , +.Xr zfsd 8 .Sh AUTHORS This manual page is a .Xr mdoc 7 @@ -2040,9 +2050,3 @@ The .Xr mdoc 7 implementation of this manual page was initially written by .An Martin Matuska Aq mm@FreeBSD.org . -.Sh CAVEATS -The -.Cm spare -feature requires a utility to detect zpool degradation and initiate -disk replacement within the zpool. -FreeBSD does not provide such a utility at this time.