From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 11:52:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE58E12A; Sun, 23 Dec 2012 11:52:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9175D8FC14; Sun, 23 Dec 2012 11:52:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNBqYg6085593; Sun, 23 Dec 2012 11:52:34 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNBqYgT085592; Sun, 23 Dec 2012 11:52:34 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231152.qBNBqYgT085592@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 11:52: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: r244609 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 11:52:34 -0000 Author: avg Date: Sun Dec 23 11:52:33 2012 New Revision: 244609 URL: http://svnweb.freebsd.org/changeset/base/244609 Log: MFC r243272,243499: assert_vop_locked should treat LK_EXCLOTHER as the not locked case Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Sun Dec 23 11:22:18 2012 (r244608) +++ stable/9/sys/kern/vfs_subr.c Sun Dec 23 11:52:33 2012 (r244609) @@ -3970,9 +3970,13 @@ assert_vi_unlocked(struct vnode *vp, con void assert_vop_locked(struct vnode *vp, const char *str) { + int locked; - if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0) - vfs_badlock("is not locked but should be", str, vp); + if (!IGNORE_LOCK(vp)) { + locked = VOP_ISLOCKED(vp); + if (locked == 0 || locked == LK_EXCLOTHER) + vfs_badlock("is not locked but should be", str, vp); + } } void From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 11:56:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0872418; Sun, 23 Dec 2012 11:56:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B25738FC12; Sun, 23 Dec 2012 11:56:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNBu8uV086184; Sun, 23 Dec 2012 11:56:08 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNBu8Gw086183; Sun, 23 Dec 2012 11:56:08 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231156.qBNBu8Gw086183@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 11:56:08 +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: r244611 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 11:56:08 -0000 Author: avg Date: Sun Dec 23 11:56:08 2012 New Revision: 244611 URL: http://svnweb.freebsd.org/changeset/base/244611 Log: MFC r243497: zfs: create devices/geoms from zvols after receiveing them PR: kern/167066 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 Sun Dec 23 11:52:46 2012 (r244610) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Dec 23 11:56:08 2012 (r244611) @@ -3817,6 +3817,12 @@ zfs_ioc_recv(zfs_cmd_t *zc) error = 1; } #endif + +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(tofs); +#endif + /* * On error, restore the original props. */ From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 11:58:09 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9624D6F3; Sun, 23 Dec 2012 11:58:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79ACA8FC0C; Sun, 23 Dec 2012 11:58:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNBw9DK086542; Sun, 23 Dec 2012 11:58:09 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNBw9QP086541; Sun, 23 Dec 2012 11:58:09 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231158.qBNBw9QP086541@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 11:58:09 +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: r244613 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 11:58:09 -0000 Author: avg Date: Sun Dec 23 11:58:08 2012 New Revision: 244613 URL: http://svnweb.freebsd.org/changeset/base/244613 Log: MFC r243519: zfs_fhtovp: there is no reason to amend lock flags with LK_RETRY here 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 Sun Dec 23 11:56:28 2012 (r244612) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Dec 23 11:58:08 2012 (r244613) @@ -2136,7 +2136,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int VN_HOLD(*vpp); } ZFS_EXIT(zfsvfs); - err = zfs_vnode_lock(*vpp, flags | LK_RETRY); + err = zfs_vnode_lock(*vpp, flags); if (err != 0) *vpp = NULL; return (err); From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 12:06:00 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD5D8ED5; Sun, 23 Dec 2012 12:06:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A128C8FC14; Sun, 23 Dec 2012 12:06:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNC6098088308; Sun, 23 Dec 2012 12:06:00 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNC60Eg088307; Sun, 23 Dec 2012 12:06:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231206.qBNC60Eg088307@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 12:06:00 +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: r244614 - stable/9/sys/dev/acpica 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 12:06:00 -0000 Author: avg Date: Sun Dec 23 12:06:00 2012 New Revision: 244614 URL: http://svnweb.freebsd.org/changeset/base/244614 Log: MFC r243760: acpi_cpu: change cpu_disable_idle to be a per-cpu flag Modified: stable/9/sys/dev/acpica/acpi_cpu.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Sun Dec 23 11:58:08 2012 (r244613) +++ stable/9/sys/dev/acpica/acpi_cpu.c Sun Dec 23 12:06:00 2012 (r244614) @@ -90,6 +90,7 @@ struct acpi_cpu_softc { struct sysctl_oid *cpu_sysctl_tree; int cpu_cx_lowest; int cpu_cx_lowest_lim; + int cpu_disable_idle; /* Disable entry to idle function */ char cpu_cx_supported[64]; int cpu_rid; }; @@ -137,9 +138,6 @@ static uint32_t cpu_smi_cmd; /* Value static uint8_t cpu_cst_cnt; /* Indicate we are _CST aware. */ static int cpu_quirks; /* Indicate any hardware bugs. */ -/* Runtime state. */ -static int cpu_disable_idle; /* Disable entry to idle function */ - /* Values for sysctl. */ static struct sysctl_ctx_list cpu_sysctl_ctx; static struct sysctl_oid *cpu_sysctl_tree; @@ -418,6 +416,39 @@ acpi_cpu_postattach(void *unused __unuse SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, acpi_cpu_postattach, NULL); +static void +disable_idle(struct acpi_cpu_softc *sc) +{ + cpuset_t cpuset; + + CPU_SETOF(sc->cpu_pcpu->pc_cpuid, &cpuset); + sc->cpu_disable_idle = TRUE; + + /* + * Ensure that the CPU is not in idle state or in acpi_cpu_idle(). + * Note that this code depends on the fact that the rendezvous IPI + * can not penetrate context where interrupts are disabled and acpi_cpu_idle + * is called and executed in such a context with interrupts being re-enabled + * right before return. + */ + smp_rendezvous_cpus(cpuset, smp_no_rendevous_barrier, NULL, + smp_no_rendevous_barrier, NULL); +} + +static void +enable_idle(struct acpi_cpu_softc *sc) +{ + + sc->cpu_disable_idle = FALSE; +} + +static int +is_idle_disabled(struct acpi_cpu_softc *sc) +{ + + return (sc->cpu_disable_idle); +} + /* * Disable any entry to the idle function during suspend and re-enable it * during resume. @@ -430,7 +461,7 @@ acpi_cpu_suspend(device_t dev) error = bus_generic_suspend(dev); if (error) return (error); - cpu_disable_idle = TRUE; + disable_idle(device_get_softc(dev)); return (0); } @@ -438,7 +469,7 @@ static int acpi_cpu_resume(device_t dev) { - cpu_disable_idle = FALSE; + enable_idle(device_get_softc(dev)); return (bus_generic_resume(dev)); } @@ -572,12 +603,14 @@ acpi_cpu_shutdown(device_t dev) bus_generic_shutdown(dev); /* - * Disable any entry to the idle function. There is a small race where - * an idle thread have passed this check but not gone to sleep. This - * is ok since device_shutdown() does not free the softc, otherwise - * we'd have to be sure all threads were evicted before returning. + * Disable any entry to the idle function. + */ + disable_idle(device_get_softc(dev)); + + /* + * CPU devices are not truely detached and remain referenced, + * so their resources are not freed. */ - cpu_disable_idle = TRUE; return_VALUE (0); } @@ -860,7 +893,10 @@ acpi_cpu_startup(void *arg) /* Take over idling from cpu_idle_default(). */ cpu_cx_lowest_lim = 0; - cpu_disable_idle = FALSE; + for (i = 0; i < cpu_ndevices; i++) { + sc = device_get_softc(cpu_devices[i]); + enable_idle(sc); + } cpu_idle_hook = acpi_cpu_idle; } @@ -926,12 +962,6 @@ acpi_cpu_idle() uint32_t start_time, end_time; int bm_active, cx_next_idx, i; - /* If disabled, return immediately. */ - if (cpu_disable_idle) { - ACPI_ENABLE_IRQS(); - return; - } - /* * Look up our CPU id to get our softc. If it's NULL, we'll use C1 * since there is no ACPI processor object for this CPU. This occurs @@ -943,6 +973,12 @@ acpi_cpu_idle() return; } + /* If disabled, return immediately. */ + if (is_idle_disabled(sc)) { + ACPI_ENABLE_IRQS(); + return; + } + /* Find the lowest state that has small enough latency. */ cx_next_idx = 0; if (cpu_disable_deep_sleep) From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 12:07:43 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1782D310; Sun, 23 Dec 2012 12:07:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D6B5A8FC0A; Sun, 23 Dec 2012 12:07:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNC7gRO088772; Sun, 23 Dec 2012 12:07:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNC7gAB088771; Sun, 23 Dec 2012 12:07:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231207.qBNC7gAB088771@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 12:07:42 +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: r244616 - stable/9/sys/dev/acpica 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 12:07:43 -0000 Author: avg Date: Sun Dec 23 12:07:42 2012 New Revision: 244616 URL: http://svnweb.freebsd.org/changeset/base/244616 Log: MFC r243761: acpi_cpu_notify: disable acpi_cpu_idle while updating C-state data Modified: stable/9/sys/dev/acpica/acpi_cpu.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Sun Dec 23 12:06:12 2012 (r244615) +++ stable/9/sys/dev/acpica/acpi_cpu.c Sun Dec 23 12:07:42 2012 (r244616) @@ -973,9 +973,9 @@ acpi_cpu_idle() return; } - /* If disabled, return immediately. */ + /* If disabled, take the safe path. */ if (is_idle_disabled(sc)) { - ACPI_ENABLE_IRQS(); + acpi_cpu_c1(); return; } @@ -1081,23 +1081,31 @@ acpi_cpu_idle() /* * Re-evaluate the _CST object when we are notified that it changed. - * - * XXX Re-evaluation disabled until locking is done. */ static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context) { struct acpi_cpu_softc *sc = (struct acpi_cpu_softc *)context; - + if (notify != ACPI_NOTIFY_CX_STATES) return; + /* + * C-state data for target CPU is going to be in flux while we execute + * acpi_cpu_cx_cst, so disable entering acpi_cpu_idle. + * Also, it may happen that multiple ACPI taskqueues may concurrently + * execute notifications for the same CPU. ACPI_SERIAL is used to + * protect against that. + */ + ACPI_SERIAL_BEGIN(cpu); + disable_idle(sc); + /* Update the list of Cx states. */ acpi_cpu_cx_cst(sc); acpi_cpu_cx_list(sc); - - ACPI_SERIAL_BEGIN(cpu); acpi_cpu_set_cx_lowest(sc); + + enable_idle(sc); ACPI_SERIAL_END(cpu); acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 12:09:42 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 51354608; Sun, 23 Dec 2012 12:09:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 365A98FC14; Sun, 23 Dec 2012 12:09:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNC9g2D089219; Sun, 23 Dec 2012 12:09:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNC9gkK089218; Sun, 23 Dec 2012 12:09:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231209.qBNC9gkK089218@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 12:09:42 +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: r244618 - stable/9/sys/dev/acpica 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 12:09:42 -0000 Author: avg Date: Sun Dec 23 12:09:41 2012 New Revision: 244618 URL: http://svnweb.freebsd.org/changeset/base/244618 Log: MFC r243404: acpi_cpu: use fixed resource ids for cx state i/o resources Modified: stable/9/sys/dev/acpica/acpi_cpu.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Sun Dec 23 12:07:52 2012 (r244617) +++ stable/9/sys/dev/acpica/acpi_cpu.c Sun Dec 23 12:09:41 2012 (r244618) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -68,6 +69,7 @@ struct acpi_cx { uint32_t trans_lat; /* Transition latency (usec). */ uint32_t power; /* Power consumed (mW). */ int res_type; /* Resource type for p_lvlx. */ + int res_rid; /* Resource ID for p_lvlx. */ }; #define MAX_CX_STATES 8 @@ -92,7 +94,6 @@ struct acpi_cpu_softc { int cpu_cx_lowest_lim; int cpu_disable_idle; /* Disable entry to idle function */ char cpu_cx_supported[64]; - int cpu_rid; }; struct acpi_cpu_device { @@ -681,10 +682,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp gas.BitWidth = 8; if (AcpiGbl_FADT.C2Latency <= 100) { gas.Address = sc->cpu_p_blk + 4; - acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid, + cx_ptr->res_rid = 0; + acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid, &gas, &cx_ptr->p_lvlx, RF_SHAREABLE); if (cx_ptr->p_lvlx != NULL) { - sc->cpu_rid++; cx_ptr->type = ACPI_STATE_C2; cx_ptr->trans_lat = AcpiGbl_FADT.C2Latency; cx_ptr++; @@ -698,10 +699,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp /* Validate and allocate resources for C3 (P_LVL3). */ if (AcpiGbl_FADT.C3Latency <= 1000 && !(cpu_quirks & CPU_QUIRK_NO_C3)) { gas.Address = sc->cpu_p_blk + 5; - acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid, &gas, - &cx_ptr->p_lvlx, RF_SHAREABLE); + cx_ptr->res_rid = 1; + acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid, + &gas, &cx_ptr->p_lvlx, RF_SHAREABLE); if (cx_ptr->p_lvlx != NULL) { - sc->cpu_rid++; cx_ptr->type = ACPI_STATE_C3; cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency; cx_ptr++; @@ -803,19 +804,18 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s break; } -#ifdef notyet /* Free up any previous register. */ if (cx_ptr->p_lvlx != NULL) { - bus_release_resource(sc->cpu_dev, 0, 0, cx_ptr->p_lvlx); + bus_release_resource(sc->cpu_dev, cx_ptr->res_type, cx_ptr->res_rid, + cx_ptr->p_lvlx); cx_ptr->p_lvlx = NULL; } -#endif /* Allocate the control register for C2 or C3. */ - acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, &sc->cpu_rid, + cx_ptr->res_rid = sc->cpu_cx_count; + acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, &cx_ptr->res_rid, &cx_ptr->p_lvlx, RF_SHAREABLE); if (cx_ptr->p_lvlx) { - sc->cpu_rid++; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "acpi_cpu%d: Got C%d - %d latency\n", device_get_unit(sc->cpu_dev), cx_ptr->type, From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 12:12:48 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 991168EE; Sun, 23 Dec 2012 12:12:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC498FC0A; Sun, 23 Dec 2012 12:12:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNCCmfa089908; Sun, 23 Dec 2012 12:12:48 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNCCmke089907; Sun, 23 Dec 2012 12:12:48 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231212.qBNCCmke089907@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 12:12:48 +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: r244620 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 12:12:48 -0000 Author: avg Date: Sun Dec 23 12:12:47 2012 New Revision: 244620 URL: http://svnweb.freebsd.org/changeset/base/244620 Log: MFC r243762: gfs_file_inactive: replace bad code with ugly code Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.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 Sun Dec 23 12:09:52 2012 (r244619) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Sun Dec 23 12:12:47 2012 (r244620) @@ -665,8 +665,10 @@ gfs_file_inactive(vnode_t *vp) ge = NULL; found: +#ifdef TODO if (vp->v_flag & V_XATTRDIR) VI_LOCK(fp->gfs_parent); +#endif VI_LOCK(vp); /* * Really remove this vnode @@ -687,16 +689,17 @@ found: if (fp->gfs_parent) { if (dp) gfs_dir_unlock(dp); - VI_LOCK(fp->gfs_parent); - fp->gfs_parent->v_usecount--; - VI_UNLOCK(fp->gfs_parent); + VOP_UNLOCK(vp, 0); + VN_RELE(fp->gfs_parent); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); } else { ASSERT(vp->v_vfsp != NULL); VFS_RELE(vp->v_vfsp); } +#ifdef TODO if (vp->v_flag & V_XATTRDIR) VI_UNLOCK(fp->gfs_parent); - +#endif return (data); } From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 12:16:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BB21BC1; Sun, 23 Dec 2012 12:16:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0FA628FC12; Sun, 23 Dec 2012 12:16:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNCGDks090527; Sun, 23 Dec 2012 12:16:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNCGDoA090525; Sun, 23 Dec 2012 12:16:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231216.qBNCGDoA090525@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 12:16:13 +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: r244622 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 12:16:14 -0000 Author: avg Date: Sun Dec 23 12:16:13 2012 New Revision: 244622 URL: http://svnweb.freebsd.org/changeset/base/244622 Log: MFC r243502: zfs roopool: add support for multi-vdev configurations Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.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/spa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Dec 23 12:13:07 2012 (r244621) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Dec 23 12:16:13 2012 (r244622) @@ -3739,54 +3739,120 @@ out: #else -extern int -vdev_geom_read_pool_label(const char *name, nvlist_t **config); +extern int vdev_geom_read_pool_label(const char *name, nvlist_t ***configs, + uint64_t *count); static nvlist_t * spa_generate_rootconf(const char *name) { + nvlist_t **configs, **tops; nvlist_t *config; - nvlist_t *nvtop, *nvroot; + nvlist_t *best_cfg, *nvtop, *nvroot; + uint64_t *holes; + uint64_t best_txg; uint64_t nchildren; uint64_t pgid; + uint64_t count; + uint64_t i; + uint_t nholes; - if (vdev_geom_read_pool_label(name, &config) != 0) + if (vdev_geom_read_pool_label(name, &configs, &count) != 0) return (NULL); + ASSERT3U(count, !=, 0); + best_txg = 0; + for (i = 0; i < count; i++) { + uint64_t txg; + + VERIFY(nvlist_lookup_uint64(configs[i], ZPOOL_CONFIG_POOL_TXG, + &txg) == 0); + if (txg > best_txg) { + best_txg = txg; + best_cfg = configs[i]; + } + } + /* * Multi-vdev root pool configuration discovery is not supported yet. */ nchildren = 0; - nvlist_lookup_uint64(config, ZPOOL_CONFIG_VDEV_CHILDREN, &nchildren); - if (nchildren != 1) { - nvlist_free(config); - return (NULL); + VERIFY(nvlist_lookup_uint64(best_cfg, ZPOOL_CONFIG_VDEV_CHILDREN, + &nchildren) == 0); + holes = NULL; + nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY, + &holes, &nholes); + + tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO); + for (i = 0; i < nchildren; i++) { + if (i >= count) + break; + if (configs[i] == NULL) + continue; + VERIFY(nvlist_lookup_nvlist(configs[i], ZPOOL_CONFIG_VDEV_TREE, + &nvtop) == 0); + nvlist_dup(nvtop, &tops[i], KM_SLEEP); + } + for (i = 0; holes != NULL && i < nholes; i++) { + if (i >= nchildren) + continue; + if (tops[holes[i]] != NULL) + continue; + nvlist_alloc(&tops[holes[i]], NV_UNIQUE_NAME, KM_SLEEP); + VERIFY(nvlist_add_string(tops[holes[i]], ZPOOL_CONFIG_TYPE, + VDEV_TYPE_HOLE) == 0); + VERIFY(nvlist_add_uint64(tops[holes[i]], ZPOOL_CONFIG_ID, + holes[i]) == 0); + VERIFY(nvlist_add_uint64(tops[holes[i]], ZPOOL_CONFIG_GUID, + 0) == 0); + } + for (i = 0; i < nchildren; i++) { + if (tops[i] != NULL) + continue; + nvlist_alloc(&tops[i], NV_UNIQUE_NAME, KM_SLEEP); + VERIFY(nvlist_add_string(tops[i], ZPOOL_CONFIG_TYPE, + VDEV_TYPE_MISSING) == 0); + VERIFY(nvlist_add_uint64(tops[i], ZPOOL_CONFIG_ID, + i) == 0); + VERIFY(nvlist_add_uint64(tops[i], ZPOOL_CONFIG_GUID, + 0) == 0); } /* - * Add this top-level vdev to the child array. + * Create pool config based on the best vdev config. */ - VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, - &nvtop) == 0); - VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, - &pgid) == 0); + nvlist_dup(best_cfg, &config, KM_SLEEP); /* * Put this pool's top-level vdevs into a root vdev. */ + VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, + &pgid) == 0); VERIFY(nvlist_alloc(&nvroot, NV_UNIQUE_NAME, KM_SLEEP) == 0); VERIFY(nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT) == 0); VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) == 0); VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid) == 0); VERIFY(nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, - &nvtop, 1) == 0); + tops, nchildren) == 0); /* * Replace the existing vdev_tree with the new root vdev in * this pool's configuration (remove the old, add the new). */ VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0); + + /* + * Drop vdev config elements that should not be present at pool level. + */ + nvlist_remove(config, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64); + nvlist_remove(config, ZPOOL_CONFIG_TOP_GUID, DATA_TYPE_UINT64); + + for (i = 0; i < count; i++) + nvlist_free(configs[i]); + kmem_free(configs, count * sizeof(void *)); + for (i = 0; i < nchildren; i++) + nvlist_free(tops[i]); + kmem_free(tops, nchildren * sizeof(void *)); nvlist_free(nvroot); return (config); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 23 12:13:07 2012 (r244621) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 23 12:16:13 2012 (r244622) @@ -289,27 +289,74 @@ vdev_geom_read_config(struct g_consumer return (*config == NULL ? ENOENT : 0); } -static int -vdev_geom_check_config(nvlist_t *config, const char *name, uint64_t *best_txg) +static void +resize_configs(nvlist_t ***configs, uint64_t *count, uint64_t id) { - uint64_t vdev_guid; - uint64_t txg; + nvlist_t **new_configs; + uint64_t i; + + if (id < *count) + return; + new_configs = kmem_alloc((id + 1) * sizeof(nvlist_t *), + KM_SLEEP | KM_ZERO); + for (i = 0; i < *count; i++) + new_configs[i] = (*configs)[i]; + if (*configs != NULL) + kmem_free(*configs, *count * sizeof(void *)); + *configs = new_configs; + *count = id + 1; +} + +static void +process_vdev_config(nvlist_t ***configs, uint64_t *count, nvlist_t *cfg, + const char *name, uint64_t* known_pool_guid) +{ + nvlist_t *vdev_tree; + uint64_t pool_guid; + uint64_t vdev_guid, known_guid; + uint64_t id, txg, known_txg; char *pname; + int i; - if (nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, &pname) != 0 || + if (nvlist_lookup_string(cfg, ZPOOL_CONFIG_POOL_NAME, &pname) != 0 || strcmp(pname, name) != 0) - return (ENOENT); + goto ignore; - ZFS_LOG(1, "found pool: %s", pname); + if (nvlist_lookup_uint64(cfg, ZPOOL_CONFIG_POOL_GUID, &pool_guid) != 0) + goto ignore; - txg = 0; - nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg); - if (txg <= *best_txg) - return (ENOENT); - *best_txg = txg; - ZFS_LOG(1, "txg: %ju", (uintmax_t)*best_txg); + if (nvlist_lookup_uint64(cfg, ZPOOL_CONFIG_TOP_GUID, &vdev_guid) != 0) + goto ignore; - return (0); + if (nvlist_lookup_nvlist(cfg, ZPOOL_CONFIG_VDEV_TREE, &vdev_tree) != 0) + goto ignore; + + if (nvlist_lookup_uint64(vdev_tree, ZPOOL_CONFIG_ID, &id) != 0) + goto ignore; + + VERIFY(nvlist_lookup_uint64(cfg, ZPOOL_CONFIG_POOL_TXG, &txg) == 0); + + if (*known_pool_guid != 0) { + if (pool_guid != *known_pool_guid) + goto ignore; + } else + *known_pool_guid = pool_guid; + + resize_configs(configs, count, id); + + if ((*configs)[id] != NULL) { + VERIFY(nvlist_lookup_uint64((*configs)[id], + ZPOOL_CONFIG_POOL_TXG, &known_txg) == 0); + if (txg <= known_txg) + goto ignore; + nvlist_free((*configs)[id]); + } + + (*configs)[id] = cfg; + return; + +ignore: + nvlist_free(cfg); } static int @@ -336,14 +383,15 @@ vdev_geom_detach_taster(struct g_consume } int -vdev_geom_read_pool_label(const char *name, nvlist_t **config) +vdev_geom_read_pool_label(const char *name, + nvlist_t ***configs, uint64_t *count) { struct g_class *mp; struct g_geom *gp, *zgp; struct g_provider *pp; struct g_consumer *zcp; nvlist_t *vdev_cfg; - uint64_t best_txg; + uint64_t pool_guid; int error; DROP_GIANT(); @@ -354,8 +402,9 @@ vdev_geom_read_pool_label(const char *na zgp->orphan = vdev_geom_taste_orphan; zcp = g_new_consumer(zgp); - best_txg = 0; - *config = NULL; + *configs = NULL; + *count = 0; + pool_guid = 0; LIST_FOREACH(mp, &g_classes, class) { if (mp == &zfs_vdev_class) continue; @@ -375,14 +424,8 @@ vdev_geom_read_pool_label(const char *na continue; ZFS_LOG(1, "successfully read vdev config"); - error = vdev_geom_check_config(vdev_cfg, name, - &best_txg); - if (error != 0) { - nvlist_free(vdev_cfg); - continue; - } - nvlist_free(*config); - *config = vdev_cfg; + process_vdev_config(configs, count, + vdev_cfg, name, &pool_guid); } } } @@ -391,7 +434,8 @@ vdev_geom_read_pool_label(const char *na g_destroy_geom(zgp); g_topology_unlock(); PICKUP_GIANT(); - return (*config == NULL ? ENOENT : 0); + + return (*count > 0 ? 0 : ENOENT); } static uint64_t From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 12:19:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B909F2F; Sun, 23 Dec 2012 12:19:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E2D348FC0A; Sun, 23 Dec 2012 12:19:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNCJ7a0091004; Sun, 23 Dec 2012 12:19:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNCJ78H091003; Sun, 23 Dec 2012 12:19:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231219.qBNCJ78H091003@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 12:19:07 +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: r244624 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 12:19:08 -0000 Author: avg Date: Sun Dec 23 12:19:07 2012 New Revision: 244624 URL: http://svnweb.freebsd.org/changeset/base/244624 Log: MFC r242567: zfs_mount: drop vfs.zfs.rootpool.prefer_cached_config tunable 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 Sun Dec 23 12:16:24 2012 (r244623) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Dec 23 12:19:07 2012 (r244624) @@ -1656,24 +1656,12 @@ zfs_mount(vfs_t *vfsp) if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 && (vfsp->vfs_flag & MNT_UPDATE) == 0) { char pname[MAXNAMELEN]; - spa_t *spa; - int prefer_cache; error = getpoolname(osname, pname); + if (error == 0) + error = spa_import_rootpool(pname); if (error) goto out; - - prefer_cache = 1; - TUNABLE_INT_FETCH("vfs.zfs.rootpool.prefer_cached_config", - &prefer_cache); - mutex_enter(&spa_namespace_lock); - spa = spa_lookup(pname); - mutex_exit(&spa_namespace_lock); - if (!prefer_cache || spa == NULL) { - error = spa_import_rootpool(pname); - if (error) - goto out; - } } DROP_GIANT(); error = zfs_domount(vfsp, osname); From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 12:46:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E3EA9A3; Sun, 23 Dec 2012 12:46:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4FA258FC0A; Sun, 23 Dec 2012 12:46:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNCkTKA094710; Sun, 23 Dec 2012 12:46:29 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNCkSqO094706; Sun, 23 Dec 2012 12:46:28 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212231246.qBNCkSqO094706@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 12:46: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: r244626 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 12:46:29 -0000 Author: avg Date: Sun Dec 23 12:46:28 2012 New Revision: 244626 URL: http://svnweb.freebsd.org/changeset/base/244626 Log: MFC r243520,243521: zfs: overhaul zfs-vfs glue for vnode life-cycle management Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h 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 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/sys/zfs_znode.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Sun Dec 23 12:19:22 2012 (r244625) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Sun Dec 23 12:46:28 2012 (r244626) @@ -207,8 +207,6 @@ typedef struct znode { list_node_t z_link_node; /* all znodes in fs link */ sa_handle_t *z_sa_hdl; /* handle to sa data */ boolean_t z_is_sa; /* are we native sa? */ - /* FreeBSD-specific field. */ - struct task z_task; } znode_t; 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 Sun Dec 23 12:19:22 2012 (r244625) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Dec 23 12:46:28 2012 (r244626) @@ -1848,18 +1848,6 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea zfsvfs->z_unmounted = B_TRUE; rrw_exit(&zfsvfs->z_teardown_lock, FTAG); rw_exit(&zfsvfs->z_teardown_inactive_lock); - -#ifdef __FreeBSD__ - /* - * Some znodes might not be fully reclaimed, wait for them. - */ - mutex_enter(&zfsvfs->z_znodes_lock); - while (list_head(&zfsvfs->z_all_znodes) != NULL) { - msleep(zfsvfs, &zfsvfs->z_znodes_lock, 0, - "zteardown", 0); - } - mutex_exit(&zfsvfs->z_znodes_lock); -#endif } /* 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 Sun Dec 23 12:19:22 2012 (r244625) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Dec 23 12:46:28 2012 (r244626) @@ -4578,14 +4578,22 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca * The fs has been unmounted, or we did a * suspend/resume and this file no longer exists. */ - VI_LOCK(vp); - ASSERT(vp->v_count <= 1); - vp->v_count = 0; - VI_UNLOCK(vp); + rw_exit(&zfsvfs->z_teardown_inactive_lock); vrecycle(vp, curthread); + return; + } + + mutex_enter(&zp->z_lock); + if (zp->z_unlinked) { + /* + * Fast path to recycle a vnode of a removed file. + */ + mutex_exit(&zp->z_lock); rw_exit(&zfsvfs->z_teardown_inactive_lock); + vrecycle(vp, curthread); return; } + mutex_exit(&zp->z_lock); if (zp->z_atime_dirty && zp->z_unlinked == 0) { dmu_tx_t *tx = dmu_tx_create(zfsvfs->z_os); @@ -4604,8 +4612,6 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca dmu_tx_commit(tx); } } - - zfs_zinactive(zp); rw_exit(&zfsvfs->z_teardown_inactive_lock); } @@ -6121,28 +6127,6 @@ zfs_freebsd_inactive(ap) return (0); } -static void -zfs_reclaim_complete(void *arg, int pending) -{ - znode_t *zp = arg; - zfsvfs_t *zfsvfs = zp->z_zfsvfs; - - rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); - if (zp->z_sa_hdl != NULL) { - ZFS_OBJ_HOLD_ENTER(zfsvfs, zp->z_id); - zfs_znode_dmu_fini(zp); - ZFS_OBJ_HOLD_EXIT(zfsvfs, zp->z_id); - } - zfs_znode_free(zp); - rw_exit(&zfsvfs->z_teardown_inactive_lock); - /* - * If the file system is being unmounted, there is a process waiting - * for us, wake it up. - */ - if (zfsvfs->z_unmounted) - wakeup_one(zfsvfs); -} - static int zfs_freebsd_reclaim(ap) struct vop_reclaim_args /* { @@ -6153,53 +6137,25 @@ zfs_freebsd_reclaim(ap) vnode_t *vp = ap->a_vp; znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; - boolean_t rlocked; - - rlocked = rw_tryenter(&zfsvfs->z_teardown_inactive_lock, RW_READER); ASSERT(zp != NULL); - /* - * Destroy the vm object and flush associated pages. - */ + /* Destroy the vm object and flush associated pages. */ vnode_destroy_vobject(vp); - mutex_enter(&zp->z_lock); - zp->z_vnode = NULL; - mutex_exit(&zp->z_lock); - - if (zp->z_unlinked) { - ; /* Do nothing. */ - } else if (!rlocked) { - TASK_INIT(&zp->z_task, 0, zfs_reclaim_complete, zp); - taskqueue_enqueue(taskqueue_thread, &zp->z_task); - } else if (zp->z_sa_hdl == NULL) { + /* + * z_teardown_inactive_lock protects from a race with + * zfs_znode_dmu_fini in zfsvfs_teardown during + * force unmount. + */ + rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); + if (zp->z_sa_hdl == NULL) zfs_znode_free(zp); - } else /* if (!zp->z_unlinked && zp->z_dbuf != NULL) */ { - int locked; + else + zfs_zinactive(zp); + rw_exit(&zfsvfs->z_teardown_inactive_lock); - locked = MUTEX_HELD(ZFS_OBJ_MUTEX(zfsvfs, zp->z_id)) ? 2 : - ZFS_OBJ_HOLD_TRYENTER(zfsvfs, zp->z_id); - if (locked == 0) { - /* - * Lock can't be obtained due to deadlock possibility, - * so defer znode destruction. - */ - TASK_INIT(&zp->z_task, 0, zfs_reclaim_complete, zp); - taskqueue_enqueue(taskqueue_thread, &zp->z_task); - } else { - zfs_znode_dmu_fini(zp); - if (locked == 1) - ZFS_OBJ_HOLD_EXIT(zfsvfs, zp->z_id); - zfs_znode_free(zp); - } - } - VI_LOCK(vp); vp->v_data = NULL; - ASSERT(vp->v_holdcnt >= 1); - VI_UNLOCK(vp); - if (rlocked) - rw_exit(&zfsvfs->z_teardown_inactive_lock); return (0); } 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 Sun Dec 23 12:19:22 2012 (r244625) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sun Dec 23 12:46:28 2012 (r244626) @@ -1147,14 +1147,16 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_ dmu_object_info_t doi; dmu_buf_t *db; znode_t *zp; - int err; + vnode_t *vp; sa_handle_t *hdl; - int first = 1; - - *zpp = NULL; + struct thread *td; + int locked; + int err; + td = curthread; getnewvnode_reserve(1); again: + *zpp = NULL; ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num); err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db); @@ -1193,48 +1195,38 @@ again: if (zp->z_unlinked) { err = ENOENT; } else { - vnode_t *vp; - int dying = 0; - vp = ZTOV(zp); - if (vp == NULL) - dying = 1; - else { - VN_HOLD(vp); - if ((vp->v_iflag & VI_DOOMED) != 0) { - dying = 1; - /* - * Don't VN_RELE() vnode here, because - * it can call vn_lock() which creates - * LOR between vnode lock and znode - * lock. We will VN_RELE() the vnode - * after droping znode lock. - */ - } - } - if (dying) { - if (first) { - ZFS_LOG(1, "dying znode detected (zp=%p)", zp); - first = 0; - } - /* - * znode is dying so we can't reuse it, we must - * wait until destruction is completed. - */ - sa_buf_rele(db, NULL); - mutex_exit(&zp->z_lock); - ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); - if (vp != NULL) - VN_RELE(vp); - tsleep(zp, 0, "zcollide", 1); - goto again; - } *zpp = zp; err = 0; } sa_buf_rele(db, NULL); + + /* Don't let the vnode disappear after ZFS_OBJ_HOLD_EXIT. */ + if (err == 0) + VN_HOLD(vp); + mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + + if (err == 0) { + locked = VOP_ISLOCKED(vp); + VI_LOCK(vp); + if ((vp->v_iflag & VI_DOOMED) != 0 && + locked != LK_EXCLUSIVE) { + /* + * The vnode is doomed and this thread doesn't + * hold the exclusive lock on it, so the vnode + * must be being reclaimed by another thread. + * Otherwise the doomed vnode is being reclaimed + * by this thread and zfs_zget is called from + * ZIL internals. + */ + VI_UNLOCK(vp); + VN_RELE(vp); + goto again; + } + VI_UNLOCK(vp); + } getnewvnode_drop_reserve(); return (err); } @@ -1400,10 +1392,8 @@ zfs_znode_delete(znode_t *zp, dmu_tx_t * void zfs_zinactive(znode_t *zp) { - vnode_t *vp = ZTOV(zp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t z_id = zp->z_id; - int vfslocked; ASSERT(zp->z_sa_hdl); @@ -1413,19 +1403,6 @@ zfs_zinactive(znode_t *zp) ZFS_OBJ_HOLD_ENTER(zfsvfs, z_id); mutex_enter(&zp->z_lock); - VI_LOCK(vp); - if (vp->v_count > 0) { - /* - * If the hold count is greater than zero, somebody has - * obtained a new reference on this znode while we were - * processing it here, so we are done. - */ - VI_UNLOCK(vp); - mutex_exit(&zp->z_lock); - ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); - return; - } - VI_UNLOCK(vp); /* * If this was the last reference to a file with no links, @@ -1434,16 +1411,14 @@ zfs_zinactive(znode_t *zp) if (zp->z_unlinked) { mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); - ASSERT(vp->v_count == 0); - vrecycle(vp, curthread); - vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); - VFS_UNLOCK_GIANT(vfslocked); return; } mutex_exit(&zp->z_lock); + zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); + zfs_znode_free(zp); } void @@ -1451,8 +1426,8 @@ zfs_znode_free(znode_t *zp) { zfsvfs_t *zfsvfs = zp->z_zfsvfs; - ASSERT(ZTOV(zp) == NULL); ASSERT(zp->z_sa_hdl == NULL); + zp->z_vnode = NULL; mutex_enter(&zfsvfs->z_znodes_lock); POINTER_INVALIDATE(&zp->z_zfsvfs); list_remove(&zfsvfs->z_all_znodes, zp); From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 20:03:11 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E684B20; Sun, 23 Dec 2012 20:03:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 57CEA8FC0A; Sun, 23 Dec 2012 20:03:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNK3BtD058390; Sun, 23 Dec 2012 20:03:11 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNK3BKY058388; Sun, 23 Dec 2012 20:03:11 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201212232003.qBNK3BKY058388@svn.freebsd.org> From: Andriy Gapon Date: Sun, 23 Dec 2012 20:03:10 +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: r244636 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 20:03:11 -0000 Author: avg Date: Sun Dec 23 20:03:10 2012 New Revision: 244636 URL: http://svnweb.freebsd.org/changeset/base/244636 Log: MFC r244635: zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.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/spa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Dec 23 19:58:41 2012 (r244635) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Dec 23 20:03:10 2012 (r244636) @@ -3782,7 +3782,7 @@ spa_generate_rootconf(const char *name) nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY, &holes, &nholes); - tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO); + tops = kmem_zalloc(nchildren * sizeof(void *), KM_SLEEP); for (i = 0; i < nchildren; i++) { if (i >= count) break; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 23 19:58:41 2012 (r244635) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 23 20:03:10 2012 (r244636) @@ -297,8 +297,8 @@ resize_configs(nvlist_t ***configs, uint if (id < *count) return; - new_configs = kmem_alloc((id + 1) * sizeof(nvlist_t *), - KM_SLEEP | KM_ZERO); + new_configs = kmem_zalloc((id + 1) * sizeof(nvlist_t *), + KM_SLEEP); for (i = 0; i < *count; i++) new_configs[i] = (*configs)[i]; if (*configs != NULL) From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 23 22:13:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50CF7C29; Sun, 23 Dec 2012 22:13:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3293C8FC0A; Sun, 23 Dec 2012 22:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNMDsIH077569; Sun, 23 Dec 2012 22:13:54 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNMDseh077568; Sun, 23 Dec 2012 22:13:54 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201212232213.qBNMDseh077568@svn.freebsd.org> From: Hiroki Sato Date: Sun, 23 Dec 2012 22:13:54 +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: r244641 - stable/9/release/doc/en_US.ISO8859-1/relnotes 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 22:13:54 -0000 Author: hrs Date: Sun Dec 23 22:13:53 2012 New Revision: 244641 URL: http://svnweb.freebsd.org/changeset/base/244641 Log: Add items for 9.1R relnotes: jail devfs/nullfs/zfs support and new params, kern.eventtimer.activetick, posix_fadvise(2) added, filemon(4) added, kern.stop_scheduler_on_panic=1 by default, linux_fadvice64() added, hw.memtest.tests=0 by default on VM, kern.msgbuf_show_timestamp added, null(4) and zero(4) non-blocking mode, ULE CPU selection for SMT improved, PREEMPTION on sparc64, security.bsd.unprivileged_idprio added, splash(4) TheDraw support, boot0cfg PXE support, /boot/config support, backup GPT handling change in gptboot, zfsboot/zfsloader device name/root storage pool format change, zfsboot on sparc64, abtn(4) on powerpc, AMD 10h/12h family errata, atibl(4) on powerpc, acpi_wmi(4) multiple instances, adm1030(4) on powerpc, cesa(4) on arm, PMC support for PowerPC G4, Sandy Bridge, software events, pcf8563(4) RTC, PWM fan control on PowerMac SMU, Atmel SAM9XE support on arm, kern.proc.* added, USB suspend/resume improved, xhci(4) USB 3.0 hub bugfix, viawd(4) watch dog timer driver, wbwd(4) watch dog timer driver, drm2(4) new Intel GPU driver, snd_hda(4) improved, snd_hdspe(4) added, snd_emu10kx(4), snd_maestro3(4), and snd_csa(4) GPL-free, ae(4) bugfix, axe(4) checksum offloading support, bce(4) improved, bge(4) improved, cxgb(4) and cxgbe(4) updated, dc(4) M5261/M5263 support added, et(4) bugfixes, igb(4) updated to 2.3.4, iwn(4) new device support, miibus(4) improved, msk(4) 64-bit DMA support, mxge(4) updated to 1.4.55, nsphyter(4) National DP83849 support, oce(4) for Emulex OneConnect 10Gbit Ethernet added, ral(4) Ralink RT2800 and RT3000 support, re(4) RTL8411 support, runfw(4) updated to 0.236, sfxge(4) for Solarflare SFC9000 added, smcphy(4) Seeq Technology 80220 PHY support, ti(4) ALTQ and PAE support, vge(4) link-state detection support, vr(4) flow control support, xnb(4) netback improved, if_bridge(4) link-state detection support, ipfw(4) table extended, ip6(4) performance improvement, multiple FIB, default route handling, IPV6_MULTICASE_HOPS fixed, NET_RT_IFLISTL added, netmap(4) added, sctp(4) improved, SO_PROTOCOL added, TCP_KEEP* options added, arcmsr(4) updated to 1.20.00.25, ahci(4) hw.ahci.force tunable added, hw.ata.ata_dma backward compatibility improved, cam(4) SEMB device support, cam(4) kern.cam.pmp.hide_special added, ctl(4) CAM Target Layer added, cd(4) now uses READ CD for Audio CD, da(4) BIO_DELETE support, GEOM_MIRROR BIO_DELETE support, GEOM_MULTIPATH improved, GEOM_PART_MBR supports Linux swap partition, GEOM_PART_LDM added, GEOM_RAID added to GENERIC, DDF format support, GEOM_UNCOMPRESS added, hpt27xx(4) for HighPoint RocketRAID 27xx added, isci(4) for Intel C600 (Patsburg) chipset added, isp(4) target mode bugfix, ixgbe(4) Intel X540 support, mfi(4) bugfix, MSI support, Drake Skinny and Thunderbolt support, mps(4) updated to 14.00.00.01-fbsd, mpt(4) bugfix, usb(4) storage device power saving mode support, NFS bugfix, positive name cache, vfs.nfsd.disable_checkutf8, tmpfs(5) vfs.tmpfs.memory_reserved, ZFS improvements, auth.conf(5) removed, camcontorl(8) fwdownload, dhclient(8) domain-search option support, dump(8) devicename length in /etc/dumpdates changed, fetch(1) %-encoding in user and password part, fdlopen(3) added, fopen(3) "x" mode, gcc(1) -ffast-math bugfix, hastd(8) pidfile, ifconfig(8) vlanhwcsum, ifconfig(8) IPv6 fix in an IPv4-only jail, ifconfig(8) carp state parameter, jail(8) configuration file support, kdump(1) -p pid, kenv(1) -v and -N, kldload(8) -n, libedit updated to 2009/12/28 snapshot, libmap.conf(5) include and includedir directive, libthr mutex performance improved, libcxxrt and libc++ import, limits(1) -P pid, pciconf(8) -le, procstat(1) superpage flag, -e, -x, -l, remquo(3) bugfix, rtld(1) GCC RELRO, GNU hash section, setbuf(1) and libstdbuf, top(1) per-thread I/O stat, unzip(1) -Z, xlocale(3) API import, periodic: daily_status_zfs_zpool_list_enable in 404.status-zfs, periodic: daily_scrub_zfs_default_threshold is now 35 days, rc.d/nfsd: vfs.nfsd.server_max_nfsvers handling change, backward compatibility: ipv6_enable=YES && ipv6_gateway_enable=YES, ISC BIND 9.8.3-P4, compiler-rt 147467, file 5.11, GNU gperf 3.0.3, libarchive 2.8.5, libpcap 1.2.1, libstdc++ 135556 on gcc-4_2-branch, LLVM 3.1, netcat 5.1, OpenSSL 0.9.8x, tcpdump 4.2.1, tcsh 6.18.01, tzdata2012a, zlib 1.2.7, and x11/kde4 4.8.4. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Dec 23 21:41:39 2012 (r244640) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Dec 23 22:13:53 2012 (r244641) @@ -8,104 +8,1232 @@ ]>
- - &os; &release.current; Release Notes + + &os; &release.current; Release Notes - The &os; Project + The &os; Project - $FreeBSD$ + $FreeBSD$ - - 2012 - The &os; Documentation Project - - - - &tm-attrib.freebsd; - &tm-attrib.ibm; - &tm-attrib.ieee; - &tm-attrib.intel; - &tm-attrib.sparc; - &tm-attrib.general; - - - - The release notes for &os; &release.current; contain a summary - of the changes made to the &os; base system on the - &release.branch; development line. - This document lists applicable security advisories that were issued since - the last release, as well as significant changes to the &os; - kernel and userland. - Some brief remarks on upgrading are also presented. - - - - - Introduction - - This document contains the release notes for &os; - &release.current;. It - describes recently added, changed, or deleted features of &os;. - It also provides some notes on upgrading - from previous versions of &os;. - - This distribution of &os; &release.current; is a - &release.type; distribution. It can be found at or any of its mirrors. More - information on obtaining this (or other) &release.type; - distributions of &os; can be found in the Obtaining - &os; appendix to the &os; - Handbook. - - All users are encouraged to consult the release errata before - installing &os;. The errata document is updated with - late-breaking information discovered late in the - release cycle or after the release. Typically, it contains - information on known bugs, security advisories, and corrections to - documentation. An up-to-date copy of the errata for &os; - &release.current; can be found on the &os; Web site. - - + + 2012 + The &os; Documentation Project + + + + &tm-attrib.freebsd; + &tm-attrib.ibm; + &tm-attrib.ieee; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + The release notes for &os; &release.current; contain a summary + of the changes made to the &os; base system on the + &release.branch; development line. + This document lists applicable security advisories that were issued since + the last release, as well as significant changes to the &os; + kernel and userland. + Some brief remarks on upgrading are also presented. + + + + + Introduction + + This document contains the release notes for &os; + &release.current;. It describes recently added, changed, or + deleted features of &os;. It also provides some notes on + upgrading from previous versions of &os;. + + This distribution of &os; &release.current; is a + &release.type; distribution. It can be found at or any of its mirrors. More + information on obtaining this (or other) &release.type; + distributions of &os; can be found in the Obtaining + &os; appendix to the &os; Handbook. + + All users are encouraged to consult the release errata before + installing &os;. The errata document is updated with + late-breaking information discovered late in the + release cycle or after the release. Typically, it contains + information on known bugs, security advisories, and corrections to + documentation. An up-to-date copy of the errata for &os; + &release.current; can be found on the &os; Web site. + - + What's New - The changes since the previous release can be found at - . - + This section describes the most user-visible new or changed + features in &os; since &release.prev;. + + Typical release note items document recent security + advisories issued after &release.prev;, new drivers or hardware + support, new commands or options, major bug fixes, or + contributed software upgrades. They may also list changes to + major ports/packages or release engineering practices. Clearly + the release notes cannot list every single change made to &os; + between releases; this document focuses primarily on security + advisories, user-visible changes, and major architectural + improvements. + + + Security Advisories + + Problems described in the following security advisories have + been fixed. For more information, consult the individual + advisories available from + . + + + + + + + + + Advisory + Date + Topic + + + + + + SA-12:01.openssl + 3 May 2012 + OpenSSL multiple vulnerabilities + + + + SA-12:02.crypt + 30 May 2012 + Incorrect crypt() hashing + + + + SA-12:03.bind + 12 June 2012 + Incorrect handling of zero-length RDATA fields in &man.named.8; + + + + SA-12:04.sysret + 12 June 2012 + Privilege escalation when returning from kernel + + + + SA-12:05.bind + 6 August 2012 + &man.named.8; DNSSEC validation Denial of Service + + + + SA-12:06.bind + 22 November 2012 + Multiple Denial of Service vulnerabilities with &man.named.8; + + + + SA-12:07.hostapd + 22 November 2012 + Insufficient message length validation for EAP-TLS messages + + + + SA-12:08.linux + 22 November 2012 + Linux compatibility layer input validation error + + + + + + + + Kernel Changes + + &os; Jail subsystem now supports + mounting &man.devfs.5;, &man.nullfs.5;, and ZFS filesystem + inside a jail. New &man.jail.8; parameters + allow.mount.devfs, + allow.mount.nullfs, and + allow.mount.zfs to control the per-jail + capabilities have been added. All of them are disabled by + default. + + A new &man.loader.8; tunable + kern.eventtimer.activetick has been added. + This tunable is to specify whether each hardclock tick should + be run on every active CPU or only one. Setting it to + 0, the number of interrupts can be reduced + on SMP machines. The default value is + 1. + + The &man.posix.fadvise.2; system call + has been implemented. This is a function similar to + &man.madvise.2; except that it operates on a file descriptor + instead of a memory region. + + The &man.filemon.4; pseudo device has + been added. This allows a process to collect file operations + data of its children. + + The &man.sysctl.8; variable + kern.stop_scheduler_on_panic is now set to + 1 by default. + + &os;/powerpc64 now + supports kernel profiling by using &man.kgmon.8;. + + The &os; Linux ABI compatiblity layer + now supports linux_fadvice64() and + linux_fadvice64_64() system call. + + The default value of the &man.loader.8; + tunable hw.memtest.tests is now + automatically set to 0 when &os; is running + on a virtual machine. + + A new &man.loader.8; tunable + kern.msgbuf_show_timestamp has been added. + When this is enabled, timestamp is added to each line of the + system message buffer. The default value is + 0 (disabled). + + The &man.null.4; and &man.zero.4; pseudo + device driver now supports non-blocking mode via &man.fcntl.2; + system call. + + The &os; &man.sched.ule.4; scheduler has + been improved on CPU load balancing of SMT (Simultaneous + MultiThreading) CPUs. It gives 10-15% performance improvement + when the number of threads is lesser than the number of + logical CPUs. + + PREEMPTION kernel option is + now enabled in GENERIC kernel. + + A new &man.sysctl.8; variable + security.bsd.unprivileged_idprio has been + added. This variable controls whether non-root users can set + an idle priority or not. This is disabled by default. + + The &man.splash.4; screen interface now + supports ASCII art in TheDraw + format. + + + Boot Loader Changes + + The &man.boot0cfg.8; utility now + supports configuration of PXE boot via + boot0 boot block temporarily on the + next boot. The slice number 6 or a + keyword PXE can be specified to enable + PXE boot in the option. + + The &os; &man.boot.8; block now + supports /boot/config in addition to + /boot.config as the boot block + parameter file. When both of them exist, the former will be + used. + + The gptboot boot + block now reads the backup GPT header from the last LBA only + when the primary GPT header and tables are invalid. This + mitigates interoperability issues with some &man.geom.4; + providers like MIRROR which use the last + LBA for the metadata. + + The zfsboot boot + block and zfsloader supports + filesystems within a ZFS storage pool. In + zfsloader, ZFS device name format now + is + zfs:pool/fs + and fully qualified file path is + zfs:pool/fs:/path/to/file. + The zfsboot accepts kernel/loader name + in a format + pool:fs:path/to/file + or, as before, + pool:path/to/file. + In the latter case a default filesystem is used (the pool + root or bootfs property). The + zfsboot passes GUIDs of the selected + storage pool and dataset to zfsloader + to be used as its defaults. + + The &os;/sparc64 now + supports booting from ZFS via zfsboot boot block and + zfsloader. For example, the following commands create a + mirrored storage pool rpool consisting of + da0a and da0b and + configure the storage pool as the root filesystem: + + &prompt.root; gpart create -s vtoc8 da0 +&prompt.root; gpart add -t freebsd-zfs -s 10g da0 +&prompt.root; gpart add -t freebsd-swap -s 10g da0 +&prompt.root; gpart add -t freebsd-zfs -s 10g da0 +&prompt.root; zpool create rpool mirror da0a da0b +&prompt.root; zpool set bootfs=rpool rpool +&prompt.root; zpool export rpool +&prompt.root; gpart bootcode -p /boot/zfsboot da0 +&prompt.root; sysctl kern.geom.debugflags=0x10 +&prompt.root; dd if=/boot/zfsloader of=/dev/da0a bs=512 oseek=1024 conv=notrunc +&prompt.root; dd if=/boot/zfsloader of=/dev/da0b bs=512 oseek=1024 conv=notrunc +&prompt.root; zpool import rpool +&prompt.root; cp -p /boot/zfs/zpool.cache /rpool/boot/zfs/zpool.cache +&prompt.root; zfs set mountpoint=/ rpool + + + + Hardware Support + + The &man.abtn.4; + driver, which supports ADB keyboards found on Apple laptops, + has been added. + + A workaround for Erratum + 721 for AMD Processor Family 10h and 12h has been + implemented. Under a highly specific and detailed set of + internal timing conditions, the processor may incorrectly + update the stack pointer after a long series of push and/or + near-call instructions, or a long series of pop and/or + near-return instructions. + + The atibl(4) driver, + which supports backlight control of ATI graphics chips on + PowerBooks and iBooks, has been added. + + The &man.acpi.wmi.4; driver now + supports attaching multiple instances. + + The adm1030(4) driver + for G4 MDD fan now shows its PWM parameter in the device + &man.sysctl.8; variable. + + The cesa(4) driver for + Marvell crypto engine and security accelerator has been + added. + + The &man.hwpmc.4; + driver now supports PowerPC G4+ (MPC745x/MPC744x). + + The &man.hwpmc.4; + driver now supports Intel Sandy Bridge + microarchitecture. + + The &man.hwpmc.4; driver now supports + software events. Simultaneous usage of software PMC and + hardware PMC is allowed. + + The pcf8563(4) driver for NXP + (Philips) PCF8563 RTC has been added. + + &os;/powerpc now + supports PWM-controlled fans found on PowerMac SMU (System + Management Unit). + + &os;/arm now supports Atmel + SAM9XE family of microcontrollers. + + The following &man.sysctl.8; + variables have been added: kern.proc.env + for environment strings, kern.proc.auxv + for ELF auxiliary vectors from a process stack, + kern.proc.groups for process groups, + kern.proc.rlimit for process resource + limits, and kern.proc.ps_strings for + ps_strings location, kern.proc.osrel for + osreldate for process binary. + + The &man.usb.4; driver now + handles suspend and resume correctly with no need of reloading + the kernel module. + + A bug in the &man.xhci.4; (USB 3.0) + driver has been fixed. It did not work with USB 3.0 + hubs. + + The &man.viawd.4; driver, which + supports watchdog timer found in VIA south bridge (VT8251, + CX700, VX800, VX855, VX900), has been added. + + The &man.wbwd.4; driver, which + supports watchdog timer found in Winbond Super I/O chips, + has been added. + + + Multimedia Support + + The drm2(4) Intel GPU driver, + which supports GEM, KMS, and works with new generations of + GPUs such as IronLake, SandyBridge, and IvyBridge, has been + added. The &man.agp.4; dirver now supports SandyBridge + and IvyBridge CPU northbridges. + + The &man.snd.hda.4; driver has been + updated. It now supports HDMI, new volume control, + automatic recording source selection, runtime + reconfigureation, more then 4 PCM devices on a controller, + multichannel recording, additional playback/record + streams, higher bandwidth, and more informative device + names. + + The &man.snd.hdspe.4; driver has + been added. This supports RME HDSPe AIO and RayDAT sound + cards. + + GPL-licensed + headers in the &man.snd.emu10kx.4;, &man.snd.maestro3.4;, + and &man.snd.csa.4; drivers have been replaced with + BSD-licensed one. These drivers are now fully + BSD-licensed and included in GENERIC + kernel on &os;/amd64 and &os;/i386. + + + + Network Interface Support + + A bug in &man.ae.4; driver which could + prevent from working under certain conditions has been + fixed. + + The &man.axe.4; driver now supports + TX/RX checksum offloading support for ASIX AX88772B + controller. + + The &man.bce.4; driver has been improved: + + + + Unnecessary link up/down has + been eliminated. + + + + A bug has been fixed. It could + prevent IPMI from working when the interface was + marked as down. + + + + It now supports remote PHYs, + which allow the controller to perform MDIO type accesses + to a remote transceiver by using message pages defined + through MRBE (MultiRate Backplane Ethernet). This is + found on machines such as Dell PowerEdge M610 + Blade. + + + + The &man.bge.4; and brgphy(4) driver have been + improved: + + + + A bug which could prevent the + DMA functionality from working correctly, has been + fixed. + + + + It now works with PCI-X BCM 5704 + controller that connected to AMD-8131 PCI-X bridge. + + + + It now supports + BCM 5720 and BCM 5720C PHY, and BCM 57780 1000BASE-T + media interface. + + + + It now supports a &man.loader.8; + tunable + dev.bge.N.msi + to control the use of MSI. The default value is + 1 (enabled). + + + + The &man.cxgbe.4; and + &man.cxgb.4; driver has been updated to firmware version + 1.5.2.0. This now supports device configuration via a + plain text configration file, IPv6 hardware checksumming, + IPv6 TSO and LRO, loadfw command in the + cxgbetool(8) utility which allows to install a firmware to + the card, &man.sysctl.8; variables under + dev.t4nex.N.misc + for various information. + + The &man.dc.4; driver now supports + NVIDIA (ULi) M5261/M5263 PCI FastEthernet controllers, which + are found on ULi M1563 South Bridge and M1689 Bridge. + + The &man.et.4; driver + now works on all platfomrs. A bug which could prevent + &man.altq.4; support from working has been fixed. A new + &man.sysctl.8; variables under + dev.et.N.stats + have been added for hardware MAC statistics. + + The &man.igb.4; driver has been + updated to version 2.3.4. It now supports newer i210/i211 + devices. + + The &man.iwn.4; driver now + supports Intel Centrino Wireless-N + WiMAX 6150 and + Wireless-N 100/130 series. + + The &man.miibus.4; bus driver now + supports device hints + hint.miibus.N.phymask + for PHY addresses being probed. This is useful to manually + probe PHYs which do not implement basic register set of + IEEE 802.3. Also, the &man.miibus.4; driver has been + changed to a hinted bus, allowing to add child devices via + hints and to set their attach arguments in addition to + automatically-probed PHYs. + + The &man.msk.4; driver now uses 64-bit + DMA addressing on 64-bit platforms. + + The &man.mxge.4; driver has been + updated to firmware version 1.4.55 from Myricom. + + The nsphyter(4) driver now supports + National DP83849. + + The &man.oce.4; driver, which + supports Emulex OneConnect 10Gbit Ethernet card, has been + added. + + The &man.ral.4; driver now supports + Ralink RT2800 and RT3000 chipsets. + + The &man.re.4; driver now + supports RTL8411 PCIe Gigabit Ethernet controller. A bug + which could prevent WoL (Wake-on-LAN) from working on + RTL8168E has been fixed. + + The &man.runfw.4; firmware has been + updated to version 0.236. + + The &man.sfxge.4; driver, which + supports 10Gb Ethernet adapters based on Solarflare SFC9000 + family controllers, has been added. + + The smcphy(4); driver now supports + Seeq Technology 80220 PHY. This is found on Adaptec + AIC-6915 Starfire ethernet controller supported by the + &man.sf.4; driver. + + The &man.ti.4; driver now + supports &man.altq.4; framework, reporting link-state + change, and &man.sysctl.8; variables under + dev.ti.N for + the interrupt moderation parameters. + + A bug in &man.ti.4; driver which could + prevent it from working correctly with PAE + kernel option, has been fixed. + + The &man.vge.4; driver has been + updated to improve its link establishment and link-state + detection. + + The &man.vr.4; driver now enables + flow control capability in the PHY drivers. + + The &man.xnb.4; Xen Paravirtualized + Backend Ethernet Driver (netback) has been updated. This is + attached via newbus framework and works properly in both + HVM and PVM mode. + + + + + Network Protocols + + The &man.if.bridge.4; pseudo interface + now supports reporting link-state change depending on status + of the member interfaces. + + The table argument + in the &man.ipfw.4; packet filter rule syntax now supports + IP address, interface name, port number, and jail ID. The + following syntax is valid: + + skipto tablearg ip from any to any via table(42) in + + &os; &man.ip6.4; protocol stack now has been improved in terms + of its performance. Benchmarking can be found at . + + &os; &man.ip6.4; protocol stack now + supports multiple FIB. + + An IPv6 default route configured via + Router Advertisement messages is now reinstalled correctly + when the default route is manually removed and then another + same RA message is received. + + A bug which could return an incorrect + value of IPV6_MULTICASE_HOPS socket option + has been fixed. + + A new &man.sysctl.8; + NET_RT_IFLISTL has been added. This + queries the address list and works on extended and + extensible structures if_msghdrl and + ifa_msghdrl without breaking the + ABI. + + The &man.netmap.4; fast packet + I/O framework has been added. The &man.em.4;, lem(4), + &man.igb.4;. and &man.re.4; drivers now support this + framework. The technical details can be found at . + + &os; &man.sctp.4; protocol stack now + supports a new &man.sysctl.8; variable + net.inet.sctp.blackhole. If this is set + to 1, no ABORT is sent + back in response to an incoming INIT. If + this is set to 2, no + ABORT is sent back in response to an out + of the blue packet. If set to 0 + (the default), ABORTs are sent. + + A bug which could cause a system panic + when SCTP_RECVINFO or + SCTP_NXTINFO is specified to + &man.getsockopt.2; system call, has been fixed. + + &os; &man.sctp.4; protocol stack now + supports SCTP_REMOTE_UDP_ENCAPS_PORT + socket option. + + SO_PROTOCOL and + SO_PROTOTYPE socket options have been + added. These returns the socket protocol number. + + TCP_KEEPINIT, + TCP_KEEPIDLE, + TCP_KEEPINTVL, and + TCP_KEEPCNT socket options have been + added. These allow to control initial timeout, idle time, + idle resend interval, and idle send count in a per-socket + basis. + + + + Disks and Storage + + The &man.arcmsr.4; driver has been + updated to version 1.20.00.25. + + The &man.ahci.4; driver now supports a + new &man.loader.8; tunable hw.ahci.force. + This controls whether it attempts to attach an AHCI-capable + device even if it is configured to use legacy emulation. + This is enabled by default. + + The new &man.cam.4;-based &man.ata.4; + driver now supports old &man.loader.8; tunables, + hw.ata.ata_dma and + hw.ata.atapi_dma, for backward + compatibility. + + The &man.cam.4; driver now supports + SEMB (SATA Enclosure Management Bridge) devices, which are + equivalent to the SCSI SES/SAF-TE devices. + + A new &man.sysctl.8; variable + kern.cam.pmp.hide_special has been added. + This controls whether special PMP ports such as PMP (Port + MultiPlier) configuration or SEMB (SATA Enclosure Management + Bridge) will be exposed or hidden. The default value is + 1 (hidden). + + The ctl(4) driver, which supports + &man.cam.4; Target Layer and &man.ctladm.8;, a userland + control utility, have been added. ctl(4) is a disk and + processor device emulation subsystem supporting tagged + queueing, SCSI task attribute, SCSI implicit command + ordering, full task management, multiple ports, multiple + simultaneous initiators, multiple simultaneous backing + stores, mode sense/select, and error injection + support. + + The &man.cd.4; driver now supports + Audio CDs in the same way as &man.acd.4; did. It will + report 2352-byte sector to &man.geom.4; subsystem and use + READ CD command for reading the data. + This fixes an interoperability issue with multimedia/vlc. + + The &man.da.4; driver now supports + BIO_DELETE. To select the method, a new + &man.sysctl.8; variable + kern.cam.da.N.delete_method + has been added for each device instance. The following + values are supported: + + + + + + Value + Method + + + + + + NONE + no provisioning support reported by the device + + + + DISABLE + provisioning support was disabled because of errors + + + + ZERO + WRITE SAME (10) command to write zeroes + + + + WS10 + WRITE SAME (10) command with UNMAP bit set + + + + WS16 + use WRITE SAME (16) command with UNMAP bit set + + + + UNMAP + use UNMAP command (equivalent of the ATA DSM TRIM command) + + + + + + When it was NONE, the device did not + report the logical block provisioning support via respective + VPD pages. One can set a specific method for testing and it + will be disabled automatically when not supported on the + device. + + The MIRROR + &man.geom.4; class now supports + BIO_DELETE. This means + TRIM command will be issued on the + supported devices when deleting data. + + The + MULTIPATH &man.geom.4; class has + been updated. It now supports Active/Active mode, + Active/Read mode as hybrid of Active/Active and + Active/Passive, keeping a failed path without removing the + geom provider, manual configuration without on-disk + metadata, and add, + remove, fail, + restore, configure + subcommands in &man.gmultipath.8; utility to manage the + configured paths. + + The + PART_LDM &man.geom.4; class has + been added. This partition scheme supports for Logical Disk + Manager, which is also known as dynamic volumes in Microsoft + Windows NT. Note that JBOD, RAID0, and RAID5 volumes are + not supported yet. + + PART_MBR + &man.geom.4; class now allows a primary or extended Linux + swap partition to be used as the system dump device. + + The + RAID &man.geom.4; class is now + included in GENERIC kernel. + + The RAID + &man.geom.4; class now supports disks with over 2TB capacity + for Intel metadata format. + + The RAID + &man.geom.4; class now supports DDF metadata format, which + is defined in the SNIA Common RAID Disk Data Format + Specification v2.0. + + The + UNCOMPRESS &man.geom.4; class and + the &man.mkulzma.8; utility have been added. This class + supports lzma compressed images like + UZIP &man.geom.4; class and the + &man.mkuzip.8; utility. + + The &man.hpt27xx.4; + dirver has been added. This supports HighPoint RocketRAID + 27xx-based SAS 6Gb/s HBA. + + The &man.isci.4; + driver, which supports the integrated SAS controller in the + Intel C600 (Patsburg) chipset, has been added. + + Bugs in &man.isp.4; target mode have + been fixed. + + The &man.ixgbe.4; driver now supports + Intel X540 adapter. + + A bug in &man.mfi.4; driver has been + fixed. It could cause some inconsistency due to missing of + interrupt acknowledge and output the following log + message: + + mfi0: COMMAND 0xffffffXXXXXXXXXX TIMEOUT AFTER XX SECONDS + + The &man.mfi.4; driver now + supports single-message MSI, and Drake Skinny and + ThunderBolt cards. The &man.loader.8; tunable + hw.mfi.msi has been added and it is + enabled by default. + + The &man.mps.4; driver + has been updated to version 14.00.00.01-fbsd. This now + supports Integrated RAID, WarpDrive controllers, WRITE12 and + READ12 for direct I/O, SCSI protection information (EEDP), + Transport Level Retries (TLR) for tape drives, and LSI's + userland utility. + + A bug in the &man.mpt.4; driver has + been fixed. It could attempt to attach MegaRAID cards which + should be handled by the &man.mfi.4; driver. + + The &man.usb.4; storage device driver + now enables power save mode by default. + + + + File Systems + + The &os; NFS filesystem has been improved: + + + + It now supports a timeout on + positive name cache entries on the client side. A new + mount option nametimeo has been added + and set to 60 (in second) by + default. + + + + A memory leak when a ZFS volume is + exported via the &os; NFS server has been fixed. + + + + A bug has been fixed. When a + process writes to an mmap-backed file on an NFS + filesystem, flushing changes to the data could fail + under some circumstances such as errors due to + permission mismatch and this failure could not detected + as an error. A new &man.sysctl.8; variable + vfs.nfs.nfs_keep_dirty_on_error has + been added to control the behavior on the client side + related to this issue. When this is set to + 1, the pages where a write operation + failed are kept dirty. The default value is set to + 0. + + + + The &man.nfsv4.4; filesystem now + supports a new &man.sysctl.8; variable + vfs.nfsd.disable_checkutf8. This + disables the check for a UTF-8 compliance in the + filenames. This is disabled by default. Note that + enabling this may help some interoperability issue but + results in an NFSv4 server that is non-RFC 3530 + compliant. + + + + The &man.tmpfs.5; filesystem is not an + experimental implementation anymore. + + The &man.tmpfs.5; filesystem now + supports a new &man.sysctl.8; variable + vfs.tmpfs.memory_reserved to set amount + of required free pages when &man.tmpfs.5; attempts to + allocate a new node. + + &os; ZFS filesystem has been + updated by merging improvements in illumos project. The + following changes are made: + + + New properties, clones and + written, have been added. + + &man.zfs.8; send command + now reports estimated size of the stream. + + &man.zfs.8; destroy command + now reports estimatated space which would be reclaimed when + flag is specified. + + &man.zfs.8; get command now + supports + flag to specify the data type. + + + A simple script + zfsboottest.sh has been added to the + source tree. This checks if the system is configured + correctly when using ZFS as the root filesystem. The script + is located at + /usr/src/tools/tools/zfsboottest.sh and + it uses zfsboottest binary program in the + same directory. + + The binary program can be built and installed by the + following command: + + &prompt.root; cd /usr/src/tools/tools/zfsboottest +&prompt.root; make +&prompt.root; make install + + After that, the following cmmand can be used to check the + system. poolname is the ZFS + storage pool name to boot: + + &prompt.root; sh /usr/src/tools/tools/zfsboottest/zfsboottest.sh poolname + + The &man.sysctl.8; variable + vfs.zfs.txg.timeout has been changed from + read-only to writable one. + + + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 00:08:59 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17CC2DB2; Mon, 24 Dec 2012 00:08:59 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E7C4C8FC14; Mon, 24 Dec 2012 00:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBO08wDe094306; Mon, 24 Dec 2012 00:08:58 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBO08wnD094305; Mon, 24 Dec 2012 00:08:58 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201212240008.qBO08wnD094305@svn.freebsd.org> From: Hiroki Sato Date: Mon, 24 Dec 2012 00:08:58 +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: r244645 - stable/9/release/doc/en_US.ISO8859-1/relnotes 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 00:08:59 -0000 Author: hrs Date: Mon Dec 24 00:08:58 2012 New Revision: 244645 URL: http://svnweb.freebsd.org/changeset/base/244645 Log: Fix typos. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Dec 23 23:03:45 2012 (r244644) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 24 00:08:58 2012 (r244645) @@ -200,7 +200,7 @@ &os;/powerpc64 now supports kernel profiling by using &man.kgmon.8;. - The &os; Linux ABI compatiblity layer + The &os; Linux ABI compatibility layer now supports linux_fadvice64() and linux_fadvice64_64() system call. @@ -386,13 +386,13 @@ The drm2(4) Intel GPU driver, which supports GEM, KMS, and works with new generations of GPUs such as IronLake, SandyBridge, and IvyBridge, has been - added. The &man.agp.4; dirver now supports SandyBridge + added. The &man.agp.4; driver now supports SandyBridge and IvyBridge CPU northbridges. The &man.snd.hda.4; driver has been updated. It now supports HDMI, new volume control, automatic recording source selection, runtime - reconfigureation, more then 4 PCM devices on a controller, + reconfiguration, more then 4 PCM devices on a controller, multichannel recording, additional playback/record streams, higher bandwidth, and more informative device names. @@ -477,7 +477,7 @@ The &man.cxgbe.4; and &man.cxgb.4; driver has been updated to firmware version 1.5.2.0. This now supports device configuration via a - plain text configration file, IPv6 hardware checksumming, + plain text configuration file, IPv6 hardware checksumming, IPv6 TSO and LRO, loadfw command in the cxgbetool(8) utility which allows to install a firmware to the card, &man.sysctl.8; variables under @@ -489,7 +489,7 @@ are found on ULi M1563 South Bridge and M1689 Bridge. The &man.et.4; driver - now works on all platfomrs. A bug which could prevent + now works on all platforms. A bug which could prevent &man.altq.4; support from working has been fixed. A new &man.sysctl.8; variables under dev.et.N.stats @@ -543,7 +543,7 @@ The smcphy(4); driver now supports Seeq Technology 80220 PHY. This is found on Adaptec - AIC-6915 Starfire ethernet controller supported by the + AIC-6915 Starfire Ethernet controller supported by the &man.sf.4; driver. The &man.ti.4; driver now @@ -678,7 +678,7 @@ &man.cam.4; Target Layer and &man.ctladm.8;, a userland control utility, have been added. ctl(4) is a disk and processor device emulation subsystem supporting tagged - queueing, SCSI task attribute, SCSI implicit command + queuing, SCSI task attribute, SCSI implicit command ordering, full task management, multiple ports, multiple simultaneous initiators, multiple simultaneous backing stores, mode sense/select, and error injection @@ -797,7 +797,7 @@ &man.mkuzip.8; utility. The &man.hpt27xx.4; - dirver has been added. This supports HighPoint RocketRAID + driver has been added. This supports HighPoint RocketRAID 27xx-based SAS 6Gb/s HBA. The &man.isci.4; @@ -819,7 +819,7 @@ The &man.mfi.4; driver now supports single-message MSI, and Drake Skinny and - ThunderBolt cards. The &man.loader.8; tunable + Thunderbolt cards. The &man.loader.8; tunable hw.mfi.msi has been added and it is enabled by default. @@ -905,7 +905,7 @@ now reports estimated size of the stream. &man.zfs.8; destroy command - now reports estimatated space which would be reclaimed when + now reports estimated space which would be reclaimed when flag is specified. &man.zfs.8; get command now @@ -929,7 +929,7 @@ &prompt.root; make &prompt.root; make install - After that, the following cmmand can be used to check the + After that, the following command can be used to check the system. poolname is the ZFS storage pool name to boot: @@ -1239,7 +1239,7 @@ User-visible incompatibilities - FreeBSD 9.0 and later have several incompatiblities in + FreeBSD 9.0 and later have several incompatibilities in system configuration which you might want to know before upgrading your system. Please read this section and the Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 764AA2EC; Mon, 24 Dec 2012 00:40:22 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 517508FC0C; Mon, 24 Dec 2012 00:40:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBO0eMC0098897; Mon, 24 Dec 2012 00:40:22 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBO0eM2h098896; Mon, 24 Dec 2012 00:40:22 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201212240040.qBO0eM2h098896@svn.freebsd.org> From: Hiroki Sato Date: Mon, 24 Dec 2012 00:40:22 +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: r244646 - stable/9/release 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 00:40:22 -0000 Author: hrs Date: Mon Dec 24 00:40:21 2012 New Revision: 244646 URL: http://svnweb.freebsd.org/changeset/base/244646 Log: MFC: r232679: - Clean up extra ${.OBJDIR}. - Add ${IMAGE} for the supported image files. This fixes the install target on FreeBSD/pc98. - Use "mkdir -p" instead of "-mkdir" consistently. Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Mon Dec 24 00:08:58 2012 (r244645) +++ stable/9/release/Makefile Mon Dec 24 00:40:21 2012 (r244646) @@ -32,7 +32,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} TARGET_ARCH?= ${TARGET} .endif IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} -DISTDIR= ${.OBJDIR}/dist +DISTDIR= dist .if !exists(${DOCDIR}) NODOC= true @@ -53,38 +53,41 @@ EXTRA_PACKAGES+= reldoc .endif RELEASE_TARGETS= ftp +IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom +IMAGES+= release.iso bootonly.iso .endif .if exists(${.CURDIR}/${TARGET}/make-memstick.sh) RELEASE_TARGETS+= memstick +IMAGES+= memstick .endif .include base.txz: - -mkdir ${DISTDIR} - cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${DISTDIR} + mkdir -p ${DISTDIR} + cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ - "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${DISTDIR}/base" + "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" # Package all components - cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${DISTDIR} - mv ${DISTDIR}/*.txz ${.OBJDIR} + cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} + mv ${DISTDIR}/*.txz . kernel.txz: - -mkdir ${DISTDIR} - cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${DISTDIR} - mv ${DISTDIR}/kernel*.txz ${.OBJDIR} + mkdir -p ${DISTDIR} + cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} + mv ${DISTDIR}/kernel*.txz . src.txz: - -mkdir -p ${DISTDIR}/usr + mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn --exclude .zfs \ --exclude CVS --exclude @ --exclude usr/src/release/dist usr/src ports.txz: - -mkdir -p ${DISTDIR}/usr + mkdir -p ${DISTDIR}/usr ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \ --exclude CVS --exclude .svn \ @@ -94,38 +97,35 @@ ports.txz: reldoc: cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \ INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc - -mkdir ${.OBJDIR}/reldoc + mkdir -p reldoc .for i in hardware readme relnotes errata - ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.txt \ - ${.OBJDIR}/reldoc/${i:U}.TXT - ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.html \ - ${.OBJDIR}/reldoc/${i:U}.HTM + ln -f rdoc/${RELNOTES_LANG}/${i}/article.txt reldoc/${i:U}.TXT + ln -f rdoc/${RELNOTES_LANG}/${i}/article.html reldoc/${i:U}.HTM .endfor - cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css ${.OBJDIR}/reldoc + cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc system: packagesystem # Install system - -mkdir ${.OBJDIR}/release + mkdir -p release cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ DESTDIR=${.OBJDIR}/release WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1 # Copy distfiles - mkdir ${.OBJDIR}/release/usr/freebsd-dist - cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST \ - ${.OBJDIR}/release/usr/freebsd-dist + mkdir -p release/usr/freebsd-dist + cp *.txz MANIFEST release/usr/freebsd-dist # Copy documentation, if generated .if !defined(NODOC) - cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release + cp reldoc/* release .endif # Set up installation environment - ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/release/etc/resolv.conf - echo sendmail_enable=\"NONE\" > ${.OBJDIR}/release/etc/rc.conf - echo hostid_enable=\"NO\" >> ${.OBJDIR}/release/etc/rc.conf - cp ${.CURDIR}/rc.local ${.OBJDIR}/release/etc - touch ${.OBJDIR}/${.TARGET} + ln -s /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf + echo sendmail_enable=\"NONE\" > release/etc/rc.conf + echo hostid_enable=\"NO\" >> release/etc/rc.conf + cp ${.CURDIR}/rc.local release/etc + touch ${.TARGET} bootonly: packagesystem # Install system - mkdir ${.OBJDIR}/bootonly + mkdir -p bootonly cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ DESTDIR=${.OBJDIR}/bootonly WITHOUT_AMD=1 WITHOUT_AT=1 \ WITHOUT_BIND_DNSSEC=1 WITHOUT_BIND_ETC=1 WITHOUT_BIND_MTREE=1 \ @@ -135,35 +135,35 @@ bootonly: packagesystem WITHOUT_INSTALLIB=1 WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ WITHOUT_KERNEL_SYMBOLS=1 # Copy manifest only (no distfiles) to get checksums - mkdir ${.OBJDIR}/bootonly/usr/freebsd-dist - cp ${.OBJDIR}/MANIFEST ${.OBJDIR}/bootonly/usr/freebsd-dist + mkdir -p bootonly/usr/freebsd-dist + cp MANIFEST bootonly/usr/freebsd-dist # Copy documentation, if generated .if !defined(NODOC) - cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/bootonly + cp reldoc/* bootonly .endif # Set up installation environment - ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/bootonly/etc/resolv.conf - echo sendmail_enable=\"NONE\" > ${.OBJDIR}/bootonly/etc/rc.conf - echo hostid_enable=\"NO\" >> ${.OBJDIR}/bootonly/etc/rc.conf - cp ${.CURDIR}/rc.local ${.OBJDIR}/bootonly/etc + ln -s /tmp/bsdinstall_etc/resolv.conf bootonly/etc/resolv.conf + echo sendmail_enable=\"NONE\" > bootonly/etc/rc.conf + echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf + cp ${.CURDIR}/rc.local bootonly/etc release.iso: system - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.OBJDIR}/release.iso ${.OBJDIR}/release + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release bootonly.iso: bootonly - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.OBJDIR}/bootonly.iso ${.OBJDIR}/bootonly + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly memstick: system - sh ${.CURDIR}/${TARGET}/make-memstick.sh ${.OBJDIR}/release ${.OBJDIR}/memstick + sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET} packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} - sh ${.CURDIR}/scripts/make-manifest.sh ${.OBJDIR}/*.txz > ${.OBJDIR}/MANIFEST + sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} cdrom: release.iso bootonly.iso ftp: packagesystem rm -rf ftp - mkdir ftp + mkdir -p ftp cp *.txz MANIFEST ftp release: @@ -171,7 +171,7 @@ release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} clean: - chflags -R noschg ${.OBJDIR} + chflags -R noschg . rm -rf dist ftp rm -f packagesystem rm -f *.txz MANIFEST @@ -180,6 +180,7 @@ clean: rm -f release.iso bootonly.iso memstick install: - -mkdir ${DESTDIR} - cp -a *.iso memstick ftp ${DESTDIR}/ - +.if defined(DESTDIR) && !empty(DESTDIR) + mkdir -p ${DESTDIR} +.endif + cp -a ${IMAGES} ftp ${DESTDIR}/ From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 00:45:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 565D8480; Mon, 24 Dec 2012 00:45:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 21EAD8FC16; Mon, 24 Dec 2012 00:45:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBO0jtip099676; Mon, 24 Dec 2012 00:45:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBO0jsB0099675; Mon, 24 Dec 2012 00:45:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201212240045.qBO0jsB0099675@svn.freebsd.org> From: Xin LI Date: Mon, 24 Dec 2012 00:45:54 +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: r244647 - stable/9/etc 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 00:45:55 -0000 Author: delphij Date: Mon Dec 24 00:45:54 2012 New Revision: 244647 URL: http://svnweb.freebsd.org/changeset/base/244647 Log: MFC r244096: Sync pf.os with OpenBSD. Modified: stable/9/etc/pf.os Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/pf.os ============================================================================== --- stable/9/etc/pf.os Mon Dec 24 00:40:21 2012 (r244646) +++ stable/9/etc/pf.os Mon Dec 24 00:45:54 2012 (r244647) @@ -1,5 +1,5 @@ # $FreeBSD$ -# $OpenBSD: pf.os,v 1.25 2010/10/18 15:55:27 deraadt Exp $ +# $OpenBSD: pf.os,v 1.26 2012/08/03 12:25:16 jsg Exp $ # passive OS fingerprinting # ------------------------- # @@ -226,7 +226,13 @@ S2:64:1:60:M*,S,T,N,W0: Linux:2.4::Linu S3:64:1:60:M*,S,T,N,W0: Linux:2.4:.18-21:Linux 2.4.18 and newer S4:64:1:60:M*,S,T,N,W0: Linux:2.4::Linux 2.4/2.6 <= 2.6.7 S4:64:1:60:M*,S,T,N,W0: Linux:2.6:.1-7:Linux 2.4/2.6 <= 2.6.7 -S4:64:1:60:M*,S,T,N,W7: Linux:2.6:8:Linux 2.6.8 and newer (?) + +S4:64:1:60:M*,S,T,N,W5: Linux:2.6::Linux 2.6 (newer, 1) +S4:64:1:60:M*,S,T,N,W6: Linux:2.6::Linux 2.6 (newer, 2) +S4:64:1:60:M*,S,T,N,W7: Linux:2.6::Linux 2.6 (newer, 3) +T4:64:1:60:M*,S,T,N,W7: Linux:2.6::Linux 2.6 (newer, 4) + +S10:64:1:60:M*,S,T,N,W4: Linux:3.0::Linux 3.0 S3:64:1:60:M*,S,T,N,W1: Linux:2.5::Linux 2.5 (sometimes 2.4) S4:64:1:60:M*,S,T,N,W1: Linux:2.5-2.6::Linux 2.5/2.6 @@ -429,6 +435,8 @@ S44:128:1:48:M*,N,N,S: Windows:XP:SP1: 32767:128:1:48:M*,N,N,S: Windows:2000:SP4:Windows SP1, 2000 SP4 32767:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows SP1, 2000 SP4 +8192:128:1:52:M*,N,W2,N,N,S: Windows:Vista::Windows Vista/7 + # Odds, ends, mods: S52:128:1:48:M1260,N,N,S: Windows:2000:cisco:Windows XP/2000 via Cisco From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 12:54:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE070D16; Mon, 24 Dec 2012 12:54:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C21F98FC0A; Mon, 24 Dec 2012 12:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOCsCQr007826; Mon, 24 Dec 2012 12:54:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBOCsCdE007824; Mon, 24 Dec 2012 12:54:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241254.qBOCsCdE007824@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 12:54: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: r244651 - in stable/9/sys: kern 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 12:54:13 -0000 Author: kib Date: Mon Dec 24 12:54:12 2012 New Revision: 244651 URL: http://svnweb.freebsd.org/changeset/base/244651 Log: MFC r240283: Add MNTK_LOOKUP_EXCL_DOTDOT struct mount flag, which specifies to the lookup code that dotdot lookups shall override any shared lock requests with the exclusive one. The flag is useful for filesystems which sometimes need to upgrade shared lock to exclusive inside the VOP_LOOKUP or later, which cannot be done safely for dotdot, due to dvp also locked and causing LOR. Modified: stable/9/sys/kern/vfs_lookup.c stable/9/sys/sys/mount.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_lookup.c ============================================================================== --- stable/9/sys/kern/vfs_lookup.c Mon Dec 24 10:10:18 2012 (r244650) +++ stable/9/sys/kern/vfs_lookup.c Mon Dec 24 12:54:12 2012 (r244651) @@ -393,11 +393,13 @@ namei(struct nameidata *ndp) } static int -compute_cn_lkflags(struct mount *mp, int lkflags) +compute_cn_lkflags(struct mount *mp, int lkflags, int cnflags) { - if (mp == NULL || - ((lkflags & LK_SHARED) && !(mp->mnt_kern_flag & MNTK_LOOKUP_SHARED))) { + if (mp == NULL || ((lkflags & LK_SHARED) && + (!(mp->mnt_kern_flag & MNTK_LOOKUP_SHARED) || + ((cnflags & ISDOTDOT) && + (mp->mnt_kern_flag & MNTK_LOOKUP_EXCL_DOTDOT))))) { lkflags &= ~LK_SHARED; lkflags |= LK_EXCLUSIVE; } @@ -526,7 +528,8 @@ lookup(struct nameidata *ndp) dp = ndp->ni_startdir; ndp->ni_startdir = NULLVP; vn_lock(dp, - compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | LK_RETRY)); + compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | LK_RETRY, + cnp->cn_flags)); dirloop: /* @@ -683,7 +686,7 @@ dirloop: VFS_UNLOCK_GIANT(tvfslocked); vn_lock(dp, compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | - LK_RETRY)); + LK_RETRY, ISDOTDOT)); } } @@ -721,7 +724,8 @@ unionlookup: vprint("lookup in", dp); #endif lkflags_save = cnp->cn_lkflags; - cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags); + cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags, + cnp->cn_flags); if ((error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp)) != 0) { cnp->cn_lkflags = lkflags_save; KASSERT(ndp->ni_vp == NULL, ("leaf should be empty")); @@ -740,7 +744,7 @@ unionlookup: VFS_UNLOCK_GIANT(tvfslocked); vn_lock(dp, compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | - LK_RETRY)); + LK_RETRY, cnp->cn_flags)); goto unionlookup; } @@ -812,8 +816,8 @@ unionlookup: dvfslocked = 0; vref(vp_crossmp); ndp->ni_dvp = vp_crossmp; - error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags), - &tdp); + error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags, + cnp->cn_flags), &tdp); vfs_unbusy(mp); if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) panic("vp_crossmp exclusively locked or reclaimed"); Modified: stable/9/sys/sys/mount.h ============================================================================== --- stable/9/sys/sys/mount.h Mon Dec 24 10:10:18 2012 (r244650) +++ stable/9/sys/sys/mount.h Mon Dec 24 12:54:12 2012 (r244651) @@ -369,6 +369,7 @@ void __mnt_vnode_markerfree(str #define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads and writes. Filesystem shall properly handle i/o state on EFAULT. */ +#define MNTK_LOOKUP_EXCL_DOTDOT 0x00000800 #define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 13:01:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D979AEC4; Mon, 24 Dec 2012 13:01:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B5B8D8FC0A; Mon, 24 Dec 2012 13:01:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOD18Ma008929; Mon, 24 Dec 2012 13:01:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBOD18Xh008926; Mon, 24 Dec 2012 13:01:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241301.qBOD18Xh008926@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 13:01:08 +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: r244652 - in stable/9/sys: kern 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 13:01:08 -0000 Author: kib Date: Mon Dec 24 13:01:07 2012 New Revision: 244652 URL: http://svnweb.freebsd.org/changeset/base/244652 Log: MFC r240284: Add a facility for vgone() to inform the set of subscribed mounts about vnode reclamation. Typical use is for the bypass mounts like nullfs to get a notification about lower vnode going away. MFC r241225 (by avg): mount.h: MNTK_VGONE_UPPER and MNTK_VGONE_WAITER were supposed to be different Modified: stable/9/sys/kern/vfs_mount.c stable/9/sys/kern/vfs_subr.c stable/9/sys/sys/mount.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Mon Dec 24 12:54:12 2012 (r244651) +++ stable/9/sys/kern/vfs_mount.c Mon Dec 24 13:01:07 2012 (r244652) @@ -479,6 +479,7 @@ vfs_mount_alloc(struct vnode *vp, struct mac_mount_create(cred, mp); #endif arc4rand(&mp->mnt_hashseed, sizeof mp->mnt_hashseed, 0); + TAILQ_INIT(&mp->mnt_uppers); return (mp); } @@ -512,6 +513,7 @@ vfs_mount_destroy(struct mount *mp) vprint("", vp); panic("unmount: dangling vnode"); } + KASSERT(TAILQ_EMPTY(&mp->mnt_uppers), ("mnt_uppers")); if (mp->mnt_nvnodelistsize != 0) panic("vfs_mount_destroy: nonzero nvnodelistsize"); if (mp->mnt_activevnodelistsize != 0) @@ -1259,7 +1261,8 @@ dounmount(mp, flags, td) } MNT_ILOCK(mp); - if (mp->mnt_kern_flag & MNTK_UNMOUNT) { + if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 || + !TAILQ_EMPTY(&mp->mnt_uppers)) { MNT_IUNLOCK(mp); if (coveredvp) VOP_UNLOCK(coveredvp, 0); Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Mon Dec 24 12:54:12 2012 (r244651) +++ stable/9/sys/kern/vfs_subr.c Mon Dec 24 13:01:07 2012 (r244652) @@ -2741,6 +2741,58 @@ vgone(struct vnode *vp) VI_UNLOCK(vp); } +static void +vgonel_reclaim_lowervp_vfs(struct mount *mp __unused, + struct vnode *lowervp __unused) +{ +} + +/* + * Notify upper mounts about reclaimed vnode. + */ +static void +vgonel_reclaim_lowervp(struct vnode *vp) +{ + static struct vfsops vgonel_vfsops = { + .vfs_reclaim_lowervp = vgonel_reclaim_lowervp_vfs + }; + struct mount *mp, *ump, *mmp; + + mp = vp->v_mount; + if (mp == NULL) + return; + + MNT_ILOCK(mp); + if (TAILQ_EMPTY(&mp->mnt_uppers)) + goto unlock; + MNT_IUNLOCK(mp); + mmp = malloc(sizeof(struct mount), M_TEMP, M_WAITOK | M_ZERO); + mmp->mnt_op = &vgonel_vfsops; + mmp->mnt_kern_flag |= MNTK_MARKER; + MNT_ILOCK(mp); + mp->mnt_kern_flag |= MNTK_VGONE_UPPER; + for (ump = TAILQ_FIRST(&mp->mnt_uppers); ump != NULL;) { + if ((ump->mnt_kern_flag & MNTK_MARKER) != 0) { + ump = TAILQ_NEXT(ump, mnt_upper_link); + continue; + } + TAILQ_INSERT_AFTER(&mp->mnt_uppers, ump, mmp, mnt_upper_link); + MNT_IUNLOCK(mp); + VFS_RECLAIM_LOWERVP(ump, vp); + MNT_ILOCK(mp); + ump = TAILQ_NEXT(mmp, mnt_upper_link); + TAILQ_REMOVE(&mp->mnt_uppers, mmp, mnt_upper_link); + } + free(mmp, M_TEMP); + mp->mnt_kern_flag &= ~MNTK_VGONE_UPPER; + if ((mp->mnt_kern_flag & MNTK_VGONE_WAITER) != 0) { + mp->mnt_kern_flag &= ~MNTK_VGONE_WAITER; + wakeup(&mp->mnt_uppers); + } +unlock: + MNT_IUNLOCK(mp); +} + /* * vgone, with the vp interlock held. */ @@ -2765,6 +2817,7 @@ vgonel(struct vnode *vp) if (vp->v_iflag & VI_DOOMED) return; vp->v_iflag |= VI_DOOMED; + /* * Check to see if the vnode is in use. If so, we have to call * VOP_CLOSE() and VOP_INACTIVE(). @@ -2772,6 +2825,8 @@ vgonel(struct vnode *vp) active = vp->v_usecount; oweinact = (vp->v_iflag & VI_OWEINACT); VI_UNLOCK(vp); + vgonel_reclaim_lowervp(vp); + /* * Clean out any buffers associated with the vnode. * If the flush fails, just toss the buffers. Modified: stable/9/sys/sys/mount.h ============================================================================== --- stable/9/sys/sys/mount.h Mon Dec 24 12:54:12 2012 (r244651) +++ stable/9/sys/sys/mount.h Mon Dec 24 13:01:07 2012 (r244652) @@ -189,6 +189,8 @@ struct mount { #define mnt_endzero mnt_gjprovider char *mnt_gjprovider; /* gjournal provider name */ struct lock mnt_explock; /* vfs_export walkers lock */ + TAILQ_ENTRY(mount) mnt_upper_link; /* (m) we in the all uppers */ + TAILQ_HEAD(, mount) mnt_uppers; /* (m) upper mounts over us*/ }; /* @@ -369,7 +371,10 @@ void __mnt_vnode_markerfree(str #define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads and writes. Filesystem shall properly handle i/o state on EFAULT. */ +#define MNTK_VGONE_UPPER 0x00000200 +#define MNTK_VGONE_WAITER 0x00000400 #define MNTK_LOOKUP_EXCL_DOTDOT 0x00000800 +#define MNTK_MARKER 0x00001000 #define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ @@ -625,6 +630,7 @@ typedef int vfs_mount_t(struct mount *mp typedef int vfs_sysctl_t(struct mount *mp, fsctlop_t op, struct sysctl_req *req); typedef void vfs_susp_clean_t(struct mount *mp); +typedef void vfs_reclaim_lowervp_t(struct mount *mp, struct vnode *lowervp); struct vfsops { vfs_mount_t *vfs_mount; @@ -642,6 +648,7 @@ struct vfsops { vfs_extattrctl_t *vfs_extattrctl; vfs_sysctl_t *vfs_sysctl; vfs_susp_clean_t *vfs_susp_clean; + vfs_reclaim_lowervp_t *vfs_reclaim_lowervp; }; vfs_statfs_t __vfs_statfs; @@ -667,6 +674,9 @@ vfs_statfs_t __vfs_statfs; #define VFS_SUSP_CLEAN(MP) \ ({if (*(MP)->mnt_op->vfs_susp_clean != NULL) \ (*(MP)->mnt_op->vfs_susp_clean)(MP); }) +#define VFS_RECLAIM_LOWERVP(MP, VP) \ + ({if (*(MP)->mnt_op->vfs_reclaim_lowervp != NULL) \ + (*(MP)->mnt_op->vfs_reclaim_lowervp)((MP), (VP)); }) #define VFS_NEEDSGIANT_(MP) \ ((MP) != NULL && ((MP)->mnt_kern_flag & MNTK_MPSAFE) == 0) From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 13:05:28 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20C0F216; Mon, 24 Dec 2012 13:05:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0618E8FC12; Mon, 24 Dec 2012 13:05:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOD5RAE009805; Mon, 24 Dec 2012 13:05:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBOD5Rjg009804; Mon, 24 Dec 2012 13:05:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241305.qBOD5Rjg009804@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 13: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: r244653 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 13:05:28 -0000 Author: kib Date: Mon Dec 24 13:05:27 2012 New Revision: 244653 URL: http://svnweb.freebsd.org/changeset/base/244653 Log: MFC r242560: Add decoding of the missed MNTK_ flags to ddb "show mount" command. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Mon Dec 24 13:01:07 2012 (r244652) +++ stable/9/sys/kern/vfs_subr.c Mon Dec 24 13:05:27 2012 (r244653) @@ -3140,6 +3140,11 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_KERN_FLAG(MNTK_REFEXPIRE); MNT_KERN_FLAG(MNTK_EXTENDED_SHARED); MNT_KERN_FLAG(MNTK_SHARED_WRITES); + MNT_KERN_FLAG(MNTK_NO_IOPF); + MNT_KERN_FLAG(MNTK_VGONE_UPPER); + MNT_KERN_FLAG(MNTK_VGONE_WAITER); + MNT_KERN_FLAG(MNTK_LOOKUP_EXCL_DOTDOT); + MNT_KERN_FLAG(MNTK_MARKER); MNT_KERN_FLAG(MNTK_NOASYNC); MNT_KERN_FLAG(MNTK_UNMOUNT); MNT_KERN_FLAG(MNTK_MWAIT); From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 13:14:40 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 21B80502; Mon, 24 Dec 2012 13:14:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F0D978FC0A; Mon, 24 Dec 2012 13:14:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBODEdxZ011393; Mon, 24 Dec 2012 13:14:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBODEdqL011389; Mon, 24 Dec 2012 13:14:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241314.qBODEdqL011389@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 13:14:39 +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: r244654 - stable/9/sys/fs/nullfs 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 13:14:40 -0000 Author: kib Date: Mon Dec 24 13:14:38 2012 New Revision: 244654 URL: http://svnweb.freebsd.org/changeset/base/244654 Log: MFC r240285: Allow shared lookups for nullfs mounts, if lower filesystem supports it. MFC r241548: Replace the XXX comment with the proper description. MFC r241554: Grammar fixes. Modified: stable/9/sys/fs/nullfs/null.h stable/9/sys/fs/nullfs/null_subr.c stable/9/sys/fs/nullfs/null_vfsops.c stable/9/sys/fs/nullfs/null_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nullfs/null.h ============================================================================== --- stable/9/sys/fs/nullfs/null.h Mon Dec 24 13:05:27 2012 (r244653) +++ stable/9/sys/fs/nullfs/null.h Mon Dec 24 13:14:38 2012 (r244654) @@ -56,6 +56,7 @@ struct null_node { int nullfs_init(struct vfsconf *vfsp); int nullfs_uninit(struct vfsconf *vfsp); int null_nodeget(struct mount *mp, struct vnode *target, struct vnode **vpp); +struct vnode *null_hashget(struct mount *mp, struct vnode *lowervp); void null_hashrem(struct null_node *xp); int null_bypass(struct vop_generic_args *ap); Modified: stable/9/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/9/sys/fs/nullfs/null_subr.c Mon Dec 24 13:05:27 2012 (r244653) +++ stable/9/sys/fs/nullfs/null_subr.c Mon Dec 24 13:14:38 2012 (r244654) @@ -67,7 +67,6 @@ struct mtx null_hashmtx; static MALLOC_DEFINE(M_NULLFSHASH, "nullfs_hash", "NULLFS hash table"); MALLOC_DEFINE(M_NULLFSNODE, "nullfs_node", "NULLFS vnode private part"); -static struct vnode * null_hashget(struct mount *, struct vnode *); static struct vnode * null_hashins(struct mount *, struct null_node *); /* @@ -98,7 +97,7 @@ nullfs_uninit(vfsp) * Return a VREF'ed alias for lower vnode if already exists, else 0. * Lower vnode should be locked on entry and will be left locked on exit. */ -static struct vnode * +struct vnode * null_hashget(mp, lowervp) struct mount *mp; struct vnode *lowervp; @@ -209,14 +208,10 @@ null_nodeget(mp, lowervp, vpp) struct vnode *vp; int error; - /* - * The insmntque1() call below requires the exclusive lock on - * the nullfs vnode. - */ - ASSERT_VOP_ELOCKED(lowervp, "lowervp"); - KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p\n", lowervp)); + ASSERT_VOP_LOCKED(lowervp, "lowervp"); + KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p", lowervp)); - /* Lookup the hash firstly */ + /* Lookup the hash firstly. */ *vpp = null_hashget(mp, lowervp); if (*vpp != NULL) { vrele(lowervp); @@ -224,6 +219,19 @@ null_nodeget(mp, lowervp, vpp) } /* + * The insmntque1() call below requires the exclusive lock on + * the nullfs vnode. Upgrade the lock now if hash failed to + * provide ready to use vnode. + */ + if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) { + vn_lock(lowervp, LK_UPGRADE | LK_RETRY); + if ((lowervp->v_iflag & VI_DOOMED) != 0) { + vput(lowervp); + return (ENOENT); + } + } + + /* * We do not serialize vnode creation, instead we will check for * duplicates later, when adding new vnode to hash. * Note that duplicate can only appear in hash if the lowervp is @@ -233,8 +241,7 @@ null_nodeget(mp, lowervp, vpp) * might cause a bogus v_data pointer to get dereferenced * elsewhere if MALLOC should block. */ - xp = malloc(sizeof(struct null_node), - M_NULLFSNODE, M_WAITOK); + xp = malloc(sizeof(struct null_node), M_NULLFSNODE, M_WAITOK); error = getnewvnode("null", mp, &null_vnodeops, &vp); if (error) { Modified: stable/9/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vfsops.c Mon Dec 24 13:05:27 2012 (r244653) +++ stable/9/sys/fs/nullfs/null_vfsops.c Mon Dec 24 13:14:38 2012 (r244654) @@ -65,6 +65,7 @@ static vfs_statfs_t nullfs_statfs; static vfs_unmount_t nullfs_unmount; static vfs_vget_t nullfs_vget; static vfs_extattrctl_t nullfs_extattrctl; +static vfs_reclaim_lowervp_t nullfs_reclaim_lowervp; /* * Mount null layer @@ -121,8 +122,10 @@ nullfs_mount(struct mount *mp) */ NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target, curthread); error = namei(ndp); + /* * Re-lock vnode. + * XXXKIB This is deadlock-prone as well. */ if (isvnunlocked) vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY); @@ -146,7 +149,7 @@ nullfs_mount(struct mount *mp) } xmp = (struct null_mount *) malloc(sizeof(struct null_mount), - M_NULLFSMNT, M_WAITOK); /* XXX */ + M_NULLFSMNT, M_WAITOK); /* * Save reference to underlying FS @@ -186,10 +189,15 @@ nullfs_mount(struct mount *mp) } MNT_ILOCK(mp); mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & - (MNTK_MPSAFE | MNTK_SHARED_WRITES); + (MNTK_MPSAFE | MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | + MNTK_EXTENDED_SHARED); + mp->mnt_kern_flag |= MNTK_LOOKUP_EXCL_DOTDOT; MNT_IUNLOCK(mp); mp->mnt_data = xmp; vfs_getnewfsid(mp); + MNT_ILOCK(xmp->nullm_vfs); + TAILQ_INSERT_TAIL(&xmp->nullm_vfs->mnt_uppers, mp, mnt_upper_link); + MNT_IUNLOCK(xmp->nullm_vfs); vfs_mountedfrom(mp, target); @@ -206,14 +214,16 @@ nullfs_unmount(mp, mntflags) struct mount *mp; int mntflags; { - void *mntdata; - int error; - int flags = 0; + struct null_mount *mntdata; + struct mount *ump; + int error, flags; NULLFSDEBUG("nullfs_unmount: mp = %p\n", (void *)mp); if (mntflags & MNT_FORCE) - flags |= FORCECLOSE; + flags = FORCECLOSE; + else + flags = 0; /* There is 1 extra root vnode reference (nullm_rootvp). */ error = vflush(mp, 1, flags, curthread); @@ -224,9 +234,17 @@ nullfs_unmount(mp, mntflags) * Finally, throw away the null_mount structure */ mntdata = mp->mnt_data; - mp->mnt_data = 0; + ump = mntdata->nullm_vfs; + MNT_ILOCK(ump); + while ((ump->mnt_kern_flag & MNTK_VGONE_UPPER) != 0) { + ump->mnt_kern_flag |= MNTK_VGONE_WAITER; + msleep(&ump->mnt_uppers, &ump->mnt_mtx, 0, "vgnupw", 0); + } + TAILQ_REMOVE(&ump->mnt_uppers, mp, mnt_upper_link); + MNT_IUNLOCK(ump); + mp->mnt_data = NULL; free(mntdata, M_NULLFSMNT); - return 0; + return (0); } static int @@ -316,13 +334,10 @@ nullfs_vget(mp, ino, flags, vpp) KASSERT((flags & LK_TYPE_MASK) != 0, ("nullfs_vget: no lock requested")); - flags &= ~LK_TYPE_MASK; - flags |= LK_EXCLUSIVE; error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp); - if (error) + if (error != 0) return (error); - return (null_nodeget(mp, *vpp, vpp)); } @@ -334,11 +349,11 @@ nullfs_fhtovp(mp, fidp, flags, vpp) struct vnode **vpp; { int error; - error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, LK_EXCLUSIVE, + + error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, flags, vpp); - if (error) + if (error != 0) return (error); - return (null_nodeget(mp, *vpp, vpp)); } @@ -350,10 +365,22 @@ nullfs_extattrctl(mp, cmd, filename_vp, int namespace; const char *attrname; { - return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, filename_vp, - namespace, attrname); + + return (VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, + filename_vp, namespace, attrname)); } +static void +nullfs_reclaim_lowervp(struct mount *mp, struct vnode *lowervp) +{ + struct vnode *vp; + + vp = null_hashget(mp, lowervp); + if (vp == NULL) + return; + vgone(vp); + vn_lock(lowervp, LK_EXCLUSIVE | LK_RETRY); +} static struct vfsops null_vfsops = { .vfs_extattrctl = nullfs_extattrctl, @@ -367,6 +394,7 @@ static struct vfsops null_vfsops = { .vfs_uninit = nullfs_uninit, .vfs_unmount = nullfs_unmount, .vfs_vget = nullfs_vget, + .vfs_reclaim_lowervp = nullfs_reclaim_lowervp, }; VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK | VFCF_JAIL); Modified: stable/9/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vnops.c Mon Dec 24 13:05:27 2012 (r244653) +++ stable/9/sys/fs/nullfs/null_vnops.c Mon Dec 24 13:14:38 2012 (r244654) @@ -665,34 +665,20 @@ null_unlock(struct vop_unlock_args *ap) } /* - * There is no way to tell that someone issued remove/rmdir operation - * on the underlying filesystem. For now we just have to release lowervp - * as soon as possible. - * - * Note, we can't release any resources nor remove vnode from hash before - * appropriate VXLOCK stuff is done because other process can find this - * vnode in hash during inactivation and may be sitting in vget() and waiting - * for null_inactive to unlock vnode. Thus we will do all those in VOP_RECLAIM. + * Do not allow the VOP_INACTIVE to be passed to the lower layer, + * since the reference count on the lower vnode is not related to + * ours. */ static int -null_inactive(struct vop_inactive_args *ap) +null_inactive(struct vop_inactive_args *ap __unused) { - struct vnode *vp = ap->a_vp; - struct thread *td = ap->a_td; - - vp->v_object = NULL; - - /* - * If this is the last reference, then free up the vnode - * so as not to tie up the lower vnodes. - */ - vrecycle(vp, td); return (0); } /* - * Now, the VXLOCK is in force and we're free to destroy the null vnode. + * Now, the nullfs vnode and, due to the sharing lock, the lower + * vnode, are exclusively locked, and we shall destroy the null vnode. */ static int null_reclaim(struct vop_reclaim_args *ap) From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 13:17:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0999C666; Mon, 24 Dec 2012 13:17:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DEB318FC0C; Mon, 24 Dec 2012 13:17:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBODHMlF011802; Mon, 24 Dec 2012 13:17:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBODHM1M011801; Mon, 24 Dec 2012 13:17:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241317.qBODHM1M011801@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 13:17:22 +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: r244655 - stable/9/sys/fs/nullfs 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 13:17:23 -0000 Author: kib Date: Mon Dec 24 13:17:22 2012 New Revision: 244655 URL: http://svnweb.freebsd.org/changeset/base/244655 Log: MFC r243340: Remove the check and panic for an impossible condition. Modified: stable/9/sys/fs/nullfs/null_subr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/9/sys/fs/nullfs/null_subr.c Mon Dec 24 13:14:38 2012 (r244654) +++ stable/9/sys/fs/nullfs/null_subr.c Mon Dec 24 13:17:22 2012 (r244655) @@ -255,8 +255,6 @@ null_nodeget(mp, lowervp, vpp) vp->v_type = lowervp->v_type; vp->v_data = xp; vp->v_vnlock = lowervp->v_vnlock; - if (vp->v_vnlock == NULL) - panic("null_nodeget: Passed a NULL vnlock.\n"); error = insmntque1(vp, mp, null_insmntque_dtr, xp); if (error != 0) return (error); From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 13:22:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE895A1C; Mon, 24 Dec 2012 13:22:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A3ACA8FC12; Mon, 24 Dec 2012 13:22:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBODMYu0012647; Mon, 24 Dec 2012 13:22:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBODMWtQ012631; Mon, 24 Dec 2012 13:22:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241322.qBODMWtQ012631@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 13:22: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: r244658 - in stable/9/sys: compat/linux fs/coda fs/nfsserver kern nfsserver vm 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 13:22:34 -0000 Author: kib Date: Mon Dec 24 13:22:32 2012 New Revision: 244658 URL: http://svnweb.freebsd.org/changeset/base/244658 Log: MFC r241025: Fix the mis-handling of the VV_TEXT on the nullfs vnodes. Add a set of VOPs for the VV_TEXT query, set and clear operations, which are correctly bypassed to lower vnode. Modified: stable/9/sys/compat/linux/linux_misc.c stable/9/sys/fs/coda/coda_subr.c stable/9/sys/fs/nfsserver/nfs_nfsdport.c stable/9/sys/kern/imgact_elf.c stable/9/sys/kern/kern_exec.c stable/9/sys/kern/vfs_default.c stable/9/sys/kern/vfs_vnops.c stable/9/sys/kern/vnode_if.src stable/9/sys/nfsserver/nfs_serv.c stable/9/sys/vm/vm_object.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/compat/linux/linux_misc.c ============================================================================== --- stable/9/sys/compat/linux/linux_misc.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/compat/linux/linux_misc.c Mon Dec 24 13:22:32 2012 (r244658) @@ -372,7 +372,7 @@ linux_uselib(struct thread *td, struct l * XXX: Note that if any of the VM operations fail below we don't * clear this flag. */ - vp->v_vflag |= VV_TEXT; + VOP_SET_TEXT(vp); /* * Lock no longer needed Modified: stable/9/sys/fs/coda/coda_subr.c ============================================================================== --- stable/9/sys/fs/coda/coda_subr.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/fs/coda/coda_subr.c Mon Dec 24 13:22:32 2012 (r244658) @@ -486,7 +486,7 @@ handleDownCall(struct coda_mntinfo *mnt, cache_purge(CTOV(cp)); cp->c_flags &= ~(C_VATTR | C_ACCCACHE); ASSERT_VOP_LOCKED(CTOV(cp), "coda HandleDownCall"); - if (CTOV(cp)->v_vflag & VV_TEXT) + if (VOP_IS_TEXT(CTOV(cp))) error = coda_vmflush(cp); CODADEBUG(CODA_ZAPFILE, myprintf(("zapfile: fid = %s, refcnt = %d, error = " @@ -532,7 +532,7 @@ handleDownCall(struct coda_mntinfo *mnt, cp->c_flags &= ~(C_VATTR | C_ACCCACHE); ASSERT_VOP_LOCKED(CTOV(cp), "coda HandleDownCall"); if (!(IS_DIR(out->coda_purgefid.Fid)) - && (CTOV(cp)->v_vflag & VV_TEXT)) + && VOP_IS_TEXT(CTOV(cp))) error = coda_vmflush(cp); CODADEBUG(CODA_PURGEFID, myprintf(("purgefid: fid " "= %s, refcnt = %d, error = %d\n", Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Mon Dec 24 13:22:32 2012 (r244658) @@ -253,7 +253,7 @@ nfsvno_accchk(struct vnode *vp, accmode_ * the inode, try to free it up once. If * we fail, we can't allow writing. */ - if ((vp->v_vflag & VV_TEXT) != 0 && error == 0) + if (VOP_IS_TEXT(vp) && error == 0) error = ETXTBSY; } if (error != 0) { Modified: stable/9/sys/kern/imgact_elf.c ============================================================================== --- stable/9/sys/kern/imgact_elf.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/kern/imgact_elf.c Mon Dec 24 13:22:32 2012 (r244658) @@ -646,7 +646,7 @@ __elfN(load_file)(struct proc *p, const * Also make certain that the interpreter stays the same, so set * its VV_TEXT flag, too. */ - nd->ni_vp->v_vflag |= VV_TEXT; + VOP_SET_TEXT(nd->ni_vp); imgp->object = nd->ni_vp->v_object; Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/kern/kern_exec.c Mon Dec 24 13:22:32 2012 (r244658) @@ -473,9 +473,8 @@ interpret: * Remember if this was set before and unset it in case this is not * actually an executable image. */ - textset = imgp->vp->v_vflag & VV_TEXT; - ASSERT_VOP_ELOCKED(imgp->vp, "vv_text"); - imgp->vp->v_vflag |= VV_TEXT; + textset = VOP_IS_TEXT(imgp->vp); + VOP_SET_TEXT(imgp->vp); error = exec_map_first_page(imgp); if (error) @@ -506,10 +505,8 @@ interpret: if (error) { if (error == -1) { - if (textset == 0) { - ASSERT_VOP_ELOCKED(imgp->vp, "vv_text"); - imgp->vp->v_vflag &= ~VV_TEXT; - } + if (textset == 0) + VOP_UNSET_TEXT(imgp->vp); error = ENOEXEC; } goto exec_fail_dealloc; @@ -527,7 +524,7 @@ interpret: * VV_TEXT will be set. The vnode lock is held over this * entire period so nothing should illegitimately be blocked. */ - imgp->vp->v_vflag &= ~VV_TEXT; + VOP_UNSET_TEXT(imgp->vp); /* free name buffer and old vnode */ if (args->fname != NULL) NDFREE(&nd, NDF_ONLY_PNBUF); Modified: stable/9/sys/kern/vfs_default.c ============================================================================== --- stable/9/sys/kern/vfs_default.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/kern/vfs_default.c Mon Dec 24 13:22:32 2012 (r244658) @@ -78,6 +78,10 @@ static int dirent_exists(struct vnode *v #define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) +static int vop_stdis_text(struct vop_is_text_args *ap); +static int vop_stdset_text(struct vop_set_text_args *ap); +static int vop_stdunset_text(struct vop_unset_text_args *ap); + /* * This vnode table stores what we want to do if the filesystem doesn't * implement a particular VOP. @@ -126,6 +130,9 @@ struct vop_vector default_vnodeops = { .vop_unp_bind = vop_stdunp_bind, .vop_unp_connect = vop_stdunp_connect, .vop_unp_detach = vop_stdunp_detach, + .vop_is_text = vop_stdis_text, + .vop_set_text = vop_stdset_text, + .vop_unset_text = vop_stdunset_text, }; /* @@ -1073,6 +1080,29 @@ vop_stdunp_detach(struct vop_unp_detach_ return (0); } +static int +vop_stdis_text(struct vop_is_text_args *ap) +{ + + return ((ap->a_vp->v_vflag & VV_TEXT) != 0); +} + +static int +vop_stdset_text(struct vop_set_text_args *ap) +{ + + ap->a_vp->v_vflag |= VV_TEXT; + return (0); +} + +static int +vop_stdunset_text(struct vop_unset_text_args *ap) +{ + + ap->a_vp->v_vflag &= ~VV_TEXT; + return (0); +} + /* * vfs default ops * used to fill the vfs function table to get reasonable default return values. Modified: stable/9/sys/kern/vfs_vnops.c ============================================================================== --- stable/9/sys/kern/vfs_vnops.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/kern/vfs_vnops.c Mon Dec 24 13:22:32 2012 (r244658) @@ -282,7 +282,7 @@ vn_writechk(vp) * the vnode, try to free it up once. If * we fail, we can't allow writing. */ - if (vp->v_vflag & VV_TEXT) + if (VOP_IS_TEXT(vp)) return (ETXTBSY); return (0); Modified: stable/9/sys/kern/vnode_if.src ============================================================================== --- stable/9/sys/kern/vnode_if.src Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/kern/vnode_if.src Mon Dec 24 13:22:32 2012 (r244658) @@ -658,6 +658,24 @@ vop_unp_detach { IN struct vnode *vp; }; +%% is_text vp L L L + +vop_is_text { + IN struct vnode *vp; +}; + +%% set_text vp E E E + +vop_set_text { + IN struct vnode *vp; +}; + +%% vop_unset_text vp E E E + +vop_unset_text { + IN struct vnode *vp; +}; + # The VOPs below are spares at the end of the table to allow new VOPs to be # added in stable branches without breaking the KBI. New VOPs in HEAD should # be added above these spares. When merging a new VOP to a stable branch, Modified: stable/9/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/9/sys/nfsserver/nfs_serv.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/nfsserver/nfs_serv.c Mon Dec 24 13:22:32 2012 (r244658) @@ -3891,7 +3891,7 @@ nfsrv_access(struct vnode *vp, accmode_t * If there's shared text associated with * the inode, we can't allow writing. */ - if (vp->v_vflag & VV_TEXT) + if (VOP_IS_TEXT(vp)) return (ETXTBSY); } Modified: stable/9/sys/vm/vm_object.c ============================================================================== --- stable/9/sys/vm/vm_object.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/vm/vm_object.c Mon Dec 24 13:22:32 2012 (r244658) @@ -455,7 +455,7 @@ vm_object_vndeallocate(vm_object_t objec VOP_UNLOCK(vp, 0); } else { if (object->ref_count == 0) - vp->v_vflag &= ~VV_TEXT; + VOP_UNSET_TEXT(vp); VM_OBJECT_UNLOCK(object); vput(vp); } Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Mon Dec 24 13:22:22 2012 (r244657) +++ stable/9/sys/vm/vnode_pager.c Mon Dec 24 13:22:32 2012 (r244658) @@ -275,7 +275,7 @@ vnode_pager_dealloc(object) vp->v_writecount--; } vp->v_object = NULL; - vp->v_vflag &= ~VV_TEXT; + VOP_UNSET_TEXT(vp); VM_OBJECT_UNLOCK(object); while (refs-- > 0) vunref(vp); From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 13:29:24 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 926AFF6C; Mon, 24 Dec 2012 13:29:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 732138FC0A; Mon, 24 Dec 2012 13:29:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBODTOPD013714; Mon, 24 Dec 2012 13:29:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBODTMq7013701; Mon, 24 Dec 2012 13:29:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241329.qBODTMq7013701@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 13:29:22 +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: r244660 - in stable/9/sys: compat/linux fs/nullfs fs/unionfs i386/ibcs2 kern ufs/ufs vm 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 13:29:24 -0000 Author: kib Date: Mon Dec 24 13:29:22 2012 New Revision: 244660 URL: http://svnweb.freebsd.org/changeset/base/244660 Log: MFC r242476: The r241025 fixed the case when a binary, executed from nullfs mount, was still possible to open for write from the lower filesystem. There is a symmetric situation where the binary could already has file descriptors opened for write, but it can be executed from the nullfs overlay. Handle the issue by passing one v_writecount reference to the lower vnode if nullfs vnode has non-zero v_writecount. Modified: stable/9/sys/compat/linux/linux_misc.c stable/9/sys/fs/nullfs/null_vnops.c stable/9/sys/fs/unionfs/union_subr.c stable/9/sys/i386/ibcs2/imgact_coff.c stable/9/sys/kern/kern_exec.c stable/9/sys/kern/vfs_default.c stable/9/sys/kern/vfs_vnops.c stable/9/sys/kern/vnode_if.src stable/9/sys/ufs/ufs/ufs_extattr.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/compat/linux/linux_misc.c ============================================================================== --- stable/9/sys/compat/linux/linux_misc.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/compat/linux/linux_misc.c Mon Dec 24 13:29:22 2012 (r244660) @@ -232,8 +232,7 @@ linux_uselib(struct thread *td, struct l unsigned long bss_size; char *library; ssize_t aresid; - int error; - int locked, vfslocked; + int error, locked, vfslocked, writecount; LCONVPATHEXIST(td, args->library, &library); @@ -265,7 +264,10 @@ linux_uselib(struct thread *td, struct l locked = 1; /* Writable? */ - if (vp->v_writecount) { + error = VOP_GET_WRITECOUNT(vp, &writecount); + if (error != 0) + goto cleanup; + if (writecount != 0) { error = ETXTBSY; goto cleanup; } Modified: stable/9/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vnops.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/fs/nullfs/null_vnops.c Mon Dec 24 13:29:22 2012 (r244660) @@ -329,6 +329,26 @@ null_bypass(struct vop_generic_args *ap) return (error); } +static int +null_add_writecount(struct vop_add_writecount_args *ap) +{ + struct vnode *lvp, *vp; + int error; + + vp = ap->a_vp; + lvp = NULLVPTOLOWERVP(vp); + KASSERT(vp->v_writecount + ap->a_inc >= 0, ("wrong writecount inc")); + if (vp->v_writecount > 0 && vp->v_writecount + ap->a_inc == 0) + error = VOP_ADD_WRITECOUNT(lvp, -1); + else if (vp->v_writecount == 0 && vp->v_writecount + ap->a_inc > 0) + error = VOP_ADD_WRITECOUNT(lvp, 1); + else + error = 0; + if (error == 0) + vp->v_writecount += ap->a_inc; + return (error); +} + /* * We have to carry on the locking protocol on the null layer vnodes * as we progress through the tree. We also have to enforce read-only @@ -826,4 +846,5 @@ struct vop_vector null_vnodeops = { .vop_unlock = null_unlock, .vop_vptocnp = null_vptocnp, .vop_vptofh = null_vptofh, + .vop_add_writecount = null_add_writecount, }; Modified: stable/9/sys/fs/unionfs/union_subr.c ============================================================================== --- stable/9/sys/fs/unionfs/union_subr.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/fs/unionfs/union_subr.c Mon Dec 24 13:29:22 2012 (r244660) @@ -954,7 +954,7 @@ unionfs_vn_create_on_upper(struct vnode vput(vp); goto unionfs_vn_create_on_upper_free_out1; } - vp->v_writecount++; + VOP_ADD_WRITECOUNT(vp, 1); *vpp = vp; unionfs_vn_create_on_upper_free_out1: @@ -1089,7 +1089,7 @@ unionfs_copyfile(struct unionfs_node *un } } VOP_CLOSE(uvp, FWRITE, cred, td); - uvp->v_writecount--; + VOP_ADD_WRITECOUNT(uvp, -1); vn_finished_write(mp); Modified: stable/9/sys/i386/ibcs2/imgact_coff.c ============================================================================== --- stable/9/sys/i386/ibcs2/imgact_coff.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/i386/ibcs2/imgact_coff.c Mon Dec 24 13:29:22 2012 (r244660) @@ -168,7 +168,7 @@ coff_load_file(struct thread *td, char * unsigned long text_offset = 0, text_address = 0, text_size = 0; unsigned long data_offset = 0, data_address = 0, data_size = 0; unsigned long bss_size = 0; - int i; + int i, writecount; NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME, UIO_SYSSPACE, name, td); @@ -181,7 +181,10 @@ coff_load_file(struct thread *td, char * if (vp == NULL) return ENOEXEC; - if (vp->v_writecount) { + error = VOP_GET_WRITECOUNT(vp, &writecount); + if (error != 0) + goto fail; + if (writecount != 0) { error = ETXTBSY; goto fail; } Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/kern/kern_exec.c Mon Dec 24 13:29:22 2012 (r244660) @@ -1393,7 +1393,7 @@ exec_check_permissions(imgp) struct vnode *vp = imgp->vp; struct vattr *attr = imgp->attr; struct thread *td; - int error; + int error, writecount; td = curthread; @@ -1438,7 +1438,10 @@ exec_check_permissions(imgp) * Check number of open-for-writes on the file and deny execution * if there are any. */ - if (vp->v_writecount) + error = VOP_GET_WRITECOUNT(vp, &writecount); + if (error != 0) + return (error); + if (writecount != 0) return (ETXTBSY); /* Modified: stable/9/sys/kern/vfs_default.c ============================================================================== --- stable/9/sys/kern/vfs_default.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/kern/vfs_default.c Mon Dec 24 13:29:22 2012 (r244660) @@ -81,6 +81,8 @@ static int dirent_exists(struct vnode *v static int vop_stdis_text(struct vop_is_text_args *ap); static int vop_stdset_text(struct vop_set_text_args *ap); static int vop_stdunset_text(struct vop_unset_text_args *ap); +static int vop_stdget_writecount(struct vop_get_writecount_args *ap); +static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); /* * This vnode table stores what we want to do if the filesystem doesn't @@ -133,6 +135,8 @@ struct vop_vector default_vnodeops = { .vop_is_text = vop_stdis_text, .vop_set_text = vop_stdset_text, .vop_unset_text = vop_stdunset_text, + .vop_get_writecount = vop_stdget_writecount, + .vop_add_writecount = vop_stdadd_writecount, }; /* @@ -1103,6 +1107,22 @@ vop_stdunset_text(struct vop_unset_text_ return (0); } +static int +vop_stdget_writecount(struct vop_get_writecount_args *ap) +{ + + *ap->a_writecount = ap->a_vp->v_writecount; + return (0); +} + +static int +vop_stdadd_writecount(struct vop_add_writecount_args *ap) +{ + + ap->a_vp->v_writecount += ap->a_inc; + return (0); +} + /* * vfs default ops * used to fill the vfs function table to get reasonable default return values. Modified: stable/9/sys/kern/vfs_vnops.c ============================================================================== --- stable/9/sys/kern/vfs_vnops.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/kern/vfs_vnops.c Mon Dec 24 13:29:22 2012 (r244660) @@ -252,7 +252,7 @@ restart: goto bad; if (fmode & FWRITE) - vp->v_writecount++; + VOP_ADD_WRITECOUNT(vp, 1); *flagp = fmode; ASSERT_VOP_LOCKED(vp, "vn_open_cred"); if (!mpsafe) @@ -314,7 +314,7 @@ vn_close(vp, flags, file_cred, td) if (flags & FWRITE) { VNASSERT(vp->v_writecount > 0, vp, ("vn_close: negative writecount")); - vp->v_writecount--; + VOP_ADD_WRITECOUNT(vp, -1); } error = VOP_CLOSE(vp, flags, file_cred, td); vput(vp); Modified: stable/9/sys/kern/vnode_if.src ============================================================================== --- stable/9/sys/kern/vnode_if.src Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/kern/vnode_if.src Mon Dec 24 13:29:22 2012 (r244660) @@ -676,6 +676,20 @@ vop_unset_text { IN struct vnode *vp; }; +%% get_writecount vp L L L + +vop_get_writecount { + IN struct vnode *vp; + OUT int *writecount; +}; + +%% add_writecount vp E E E + +vop_add_writecount { + IN struct vnode *vp; + IN int inc; +}; + # The VOPs below are spares at the end of the table to allow new VOPs to be # added in stable branches without breaking the KBI. New VOPs in HEAD should # be added above these spares. When merging a new VOP to a stable branch, Modified: stable/9/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_extattr.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/ufs/ufs/ufs_extattr.c Mon Dec 24 13:29:22 2012 (r244660) @@ -334,7 +334,7 @@ ufs_extattr_enable_with_open(struct ufsm return (error); } - vp->v_writecount++; + VOP_ADD_WRITECOUNT(vp, 1); vref(vp); Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Mon Dec 24 13:24:55 2012 (r244659) +++ stable/9/sys/vm/vnode_pager.c Mon Dec 24 13:29:22 2012 (r244660) @@ -272,7 +272,7 @@ vnode_pager_dealloc(object) ASSERT_VOP_ELOCKED(vp, "vnode_pager_dealloc"); if (object->un_pager.vnp.writemappings > 0) { object->un_pager.vnp.writemappings = 0; - vp->v_writecount--; + VOP_ADD_WRITECOUNT(vp, -1); } vp->v_object = NULL; VOP_UNSET_TEXT(vp); @@ -1216,10 +1216,10 @@ vnode_pager_update_writecount(vm_object_ vp = object->handle; if (old_wm == 0 && object->un_pager.vnp.writemappings != 0) { ASSERT_VOP_ELOCKED(vp, "v_writecount inc"); - vp->v_writecount++; + VOP_ADD_WRITECOUNT(vp, 1); } else if (old_wm != 0 && object->un_pager.vnp.writemappings == 0) { ASSERT_VOP_ELOCKED(vp, "v_writecount dec"); - vp->v_writecount--; + VOP_ADD_WRITECOUNT(vp, -1); } VM_OBJECT_UNLOCK(object); } From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 14:22:53 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 673C5C97; Mon, 24 Dec 2012 14:22:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 49ED28FC0C; Mon, 24 Dec 2012 14:22:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOEMreU021633; Mon, 24 Dec 2012 14:22:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBOEMrcF021632; Mon, 24 Dec 2012 14:22:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212241422.qBOEMrcF021632@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Dec 2012 14:22:53 +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: r244663 - stable/9 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 14:22:53 -0000 Author: kib Date: Mon Dec 24 14:22:52 2012 New Revision: 244663 URL: http://svnweb.freebsd.org/changeset/base/244663 Log: Note that filesystem modules must be recompiled. Modified: stable/9/UPDATING Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Mon Dec 24 14:12:43 2012 (r244662) +++ stable/9/UPDATING Mon Dec 24 14:22:52 2012 (r244663) @@ -11,6 +11,11 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20121224: + The VFS KBI was changed with the merge of several nullfs + optimizations and fixes. All filesystem modules must be + recompiled. + 20121218: With the addition of auditdistd(8), a new auditdistd user is now depended on during installworld. "mergemaster -p" can be used to add From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 19:25:00 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 026AF640; Mon, 24 Dec 2012 19:25:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by mx1.freebsd.org (Postfix) with ESMTP id CB1E68FC12; Mon, 24 Dec 2012 19:24:58 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id e12so3364336wge.10 for ; Mon, 24 Dec 2012 11:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ZEamTsNZcMc5Y1RH72je9WU8mQFbYcaT70hpp9sy1W8=; b=jXt6DhAHr/K44NlvIbbTA52y1sO841Yyfa2CpvmqfN9ndGnl1oLIa6zUA5i0Ysj1R5 rYh8NRXlX+ZOWMlOuwCAr8nYX16yPTT141kRf184C6ZySvtpUGnzQ+dN3rTYmQIU2SDP Vhb1hDvMBeH6mb9OGxyyqSirMjWzdcAG3xrismlGJYY2kjHdqZWzacamDEzzWJctJcUN YMSt6X6UOym1NQQHVQPQ2lEB+sWLkFaopflnL+I94z/BdXzbTPngihgoI3S1305mptus 2EXCasqJWtV3kQFSG/hny7OgdFqlGD/2eY4LheXu3PnSrVw8+oPDOKK00cMPab37DOUA BASQ== MIME-Version: 1.0 Received: by 10.194.93.40 with SMTP id cr8mr37237283wjb.16.1356377092086; Mon, 24 Dec 2012 11:24:52 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Mon, 24 Dec 2012 11:24:51 -0800 (PST) In-Reply-To: <201212241422.qBOEMrcF021632@svn.freebsd.org> References: <201212241422.qBOEMrcF021632@svn.freebsd.org> Date: Mon, 24 Dec 2012 11:24:51 -0800 X-Google-Sender-Auth: f97EKupXbHwyg23-0Lyr58IvvyQ Message-ID: Subject: Re: svn commit: r244663 - stable/9 From: Adrian Chadd To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 19:25:00 -0000 ... why'd we break the KBI in a stable branch? Adrian On 24 December 2012 06:22, Konstantin Belousov wrote: > Author: kib > Date: Mon Dec 24 14:22:52 2012 > New Revision: 244663 > URL: http://svnweb.freebsd.org/changeset/base/244663 > > Log: > Note that filesystem modules must be recompiled. > > Modified: > stable/9/UPDATING > > Modified: stable/9/UPDATING > ============================================================================== > --- stable/9/UPDATING Mon Dec 24 14:12:43 2012 (r244662) > +++ stable/9/UPDATING Mon Dec 24 14:22:52 2012 (r244663) > @@ -11,6 +11,11 @@ handbook: > Items affecting the ports and packages system can be found in > /usr/ports/UPDATING. Please read that file before running portupgrade. > > +20121224: > + The VFS KBI was changed with the merge of several nullfs > + optimizations and fixes. All filesystem modules must be > + recompiled. > + > 20121218: > With the addition of auditdistd(8), a new auditdistd user is now > depended on during installworld. "mergemaster -p" can be used to add From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 20:03:57 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 472F6BA1; Mon, 24 Dec 2012 20:03:57 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF778FC0A; Mon, 24 Dec 2012 20:03:56 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 5D56A1A3C2B; Mon, 24 Dec 2012 12:03:56 -0800 (PST) Message-ID: <50D8B533.8080507@mu.org> Date: Mon, 24 Dec 2012 12:04:03 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r244663 - stable/9 References: <201212241422.qBOEMrcF021632@svn.freebsd.org> In-Reply-To: Content-Type: multipart/mixed; boundary="------------060807030005000102040907" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov , svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 20:03:57 -0000 This is a multi-part message in MIME format. --------------060807030005000102040907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 12/24/12 11:24 AM, Adrian Chadd wrote: > ... why'd we break the KBI in a stable branch? > I am not sure either. I think a single VOP for nullfs (while ugly) would have sufficed. I have a partial patch here that shows the direction I was going. What's left is to: shim #defines for -stable to route the "new" vops from -current (VOP_ISTEXT, VOP_WRITECOUNT..) into just plain #defines inside of vnode.h to call into VOP_NULLFS_CALLTHROUGH with the proper VOP_NULLFS_IS_TEXT/VOP_NULLFS_SET_TEXT and remap stuff around into struct vop_nullfs_callthrough_args. best way to do this would be to just copy the code from the -current vnode_if.h into sys/vnode.h and hack it up for that it maps properly. Partial patch attached. -Alfred > > Adrian > > > On 24 December 2012 06:22, Konstantin Belousov wrote: >> Author: kib >> Date: Mon Dec 24 14:22:52 2012 >> New Revision: 244663 >> URL: http://svnweb.freebsd.org/changeset/base/244663 >> >> Log: >> Note that filesystem modules must be recompiled. >> >> Modified: >> stable/9/UPDATING >> >> Modified: stable/9/UPDATING >> ============================================================================== >> --- stable/9/UPDATING Mon Dec 24 14:12:43 2012 (r244662) >> +++ stable/9/UPDATING Mon Dec 24 14:22:52 2012 (r244663) >> @@ -11,6 +11,11 @@ handbook: >> Items affecting the ports and packages system can be found in >> /usr/ports/UPDATING. Please read that file before running portupgrade. >> >> +20121224: >> + The VFS KBI was changed with the merge of several nullfs >> + optimizations and fixes. All filesystem modules must be >> + recompiled. >> + >> 20121218: >> With the addition of auditdistd(8), a new auditdistd user is now >> depended on during installworld. "mergemaster -p" can be used to add --------------060807030005000102040907 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="fskpi_fix1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fskpi_fix1.diff" diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index fd2437b..f109bc8 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -78,6 +78,8 @@ static int dirent_exists(struct vnode *vp, const char *dirname, #define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) +static int vop_nullfs_callthrough(struct vop_nullfs_callthrough_args *ap); + static int vop_stdis_text(struct vop_is_text_args *ap); static int vop_stdset_text(struct vop_set_text_args *ap); static int vop_stdunset_text(struct vop_unset_text_args *ap); @@ -132,11 +134,7 @@ struct vop_vector default_vnodeops = { .vop_unp_bind = vop_stdunp_bind, .vop_unp_connect = vop_stdunp_connect, .vop_unp_detach = vop_stdunp_detach, - .vop_is_text = vop_stdis_text, - .vop_set_text = vop_stdset_text, - .vop_unset_text = vop_stdunset_text, - .vop_get_writecount = vop_stdget_writecount, - .vop_add_writecount = vop_stdadd_writecount, + .vop_nullfs_callthrough = vop_stdnullfs_callthrough, }; /* @@ -1085,6 +1083,54 @@ vop_stdunp_detach(struct vop_unp_detach_args *ap) } static int +vop_stdnullfs_callthrough(struct vop_nullfs_callthrough_args *ap) +{ + + switch (ap->a_op) { + case VOP_NULLFS_IS_TEXT: + { + struct vop_is_text_args ap2; + ap2.a_vp = ap->a_vp; + return vop_stdis_text(&ap2); + } + case VOP_NULLFS_SET_TEXT: + { + struct vop_set_text_args ap2; + ap2.a_vp = ap->a_vp; + return vop_stdset_text(&ap2); + } + case VOP_NULLFS_UNSET_TEXT: + { + struct vop_unset_text_args ap2; + ap2.a_vp = ap->a_vp; + return vop_stdunset_text(&ap2); + } + case VOP_NULLFS_GET_WRITECOUNT: + { + struct vop_get_writecount_args ap2; + int error; + int writecount; + + ap2.a_vp = ap->a_vp; + ap2.a_writecount = &writecount; + error = vop_stdget_writecount(&ap2); + *((int *)ap->a_out0) = writecount; + return (error); + } + case VOP_NULLFS_ADD_WRITECOUNT: + { + struct vop_add_writecount_args ap2; + + ap2.a_vp = ap->a_vp; + ap2.a_inc = ap->a_in0; + return vop_stdadd_writecount(&ap2); + } + default: + return (EOPNOTSUPP); + } +} + +static int vop_stdis_text(struct vop_is_text_args *ap) { diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 194e9f8..2bcc80a 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -658,36 +658,12 @@ vop_unp_detach { IN struct vnode *vp; }; -%% is_text vp L L L +%% nullfs_callthrough vp = = = -vop_is_text { +vop_nullfs_callthrough { IN struct vnode *vp; -}; - -%% set_text vp E E E - -vop_set_text { - IN struct vnode *vp; -}; - -%% vop_unset_text vp E E E - -vop_unset_text { - IN struct vnode *vp; -}; - -%% get_writecount vp L L L - -vop_get_writecount { - IN struct vnode *vp; - OUT int *writecount; -}; - -%% add_writecount vp E E E - -vop_add_writecount { - IN struct vnode *vp; - IN int inc; + IN uintptr_t in0; + OUT uintptr_t *out0; }; # The VOPs below are spares at the end of the table to allow new VOPs to be @@ -695,10 +671,6 @@ vop_add_writecount { # be added above these spares. When merging a new VOP to a stable branch, # the new VOP should replace one of the spares. -vop_spare4 { - IN struct vnode *vp; -}; - vop_spare5 { IN struct vnode *vp; }; --------------060807030005000102040907-- From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 24 20:33:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50605E7A; Mon, 24 Dec 2012 20:33:38 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 32D7A8FC0A; Mon, 24 Dec 2012 20:33:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOKXcFn075909; Mon, 24 Dec 2012 20:33:38 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBOKXcms075908; Mon, 24 Dec 2012 20:33:38 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201212242033.qBOKXcms075908@svn.freebsd.org> From: Hiroki Sato Date: Mon, 24 Dec 2012 20:33: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: r244664 - stable/9/release/doc/en_US.ISO8859-1/relnotes 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 20:33:38 -0000 Author: hrs Date: Mon Dec 24 20:33:37 2012 New Revision: 244664 URL: http://svnweb.freebsd.org/changeset/base/244664 Log: Fix various grammatical errors. Submitted by: bjk Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 24 14:22:52 2012 (r244663) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 24 20:33:37 2012 (r244664) @@ -167,7 +167,7 @@ Kernel Changes - &os; Jail subsystem now supports + The &os; Jail subsystem now supports mounting &man.devfs.5;, &man.nullfs.5;, and ZFS filesystem inside a jail. New &man.jail.8; parameters allow.mount.devfs, @@ -178,9 +178,9 @@ A new &man.loader.8; tunable kern.eventtimer.activetick has been added. - This tunable is to specify whether each hardclock tick should - be run on every active CPU or only one. Setting it to - 0, the number of interrupts can be reduced + This tunable specifies whether each hardclock tick should + be run on every active CPU or only one. By setting it to + 0, the total number of interrupts can be reduced on SMP machines. The default value is 1. @@ -189,7 +189,7 @@ &man.madvise.2; except that it operates on a file descriptor instead of a memory region. - The &man.filemon.4; pseudo device has + The &man.filemon.4; pseudo-device has been added. This allows a process to collect file operations data of its children. @@ -201,8 +201,8 @@ supports kernel profiling by using &man.kgmon.8;. The &os; Linux ABI compatibility layer - now supports linux_fadvice64() and - linux_fadvice64_64() system call. + now supports the linux_fadvise64() and + linux_fadvise64_64() system calls. The default value of the &man.loader.8; tunable hw.memtest.tests is now @@ -211,23 +211,23 @@ A new &man.loader.8; tunable kern.msgbuf_show_timestamp has been added. - When this is enabled, timestamp is added to each line of the + When it is enabled, a timestamp is added to each line of the system message buffer. The default value is 0 (disabled). The &man.null.4; and &man.zero.4; pseudo - device driver now supports non-blocking mode via &man.fcntl.2; + device driver now supports non-blocking mode via the &man.fcntl.2; system call. The &os; &man.sched.ule.4; scheduler has - been improved on CPU load balancing of SMT (Simultaneous - MultiThreading) CPUs. It gives 10-15% performance improvement + been improved for CPU load balancing on SMT (Simultaneous + MultiThreading) CPUs. It gives a 10-15% performance improvement when the number of threads is lesser than the number of logical CPUs. PREEMPTION kernel option is - now enabled in GENERIC kernel. + arch="sparc64">The PREEMPTION kernel option is + now enabled in the GENERIC kernel. A new &man.sysctl.8; variable security.bsd.unprivileged_idprio has been @@ -242,11 +242,11 @@ Boot Loader Changes The &man.boot0cfg.8; utility now - supports configuration of PXE boot via + supports configuration of PXE boot via the boot0 boot block temporarily on the next boot. The slice number 6 or a keyword PXE can be specified to enable - PXE boot in the option. + PXE boot using the option. The &os; &man.boot.8; block now supports /boot/config in addition to @@ -262,27 +262,27 @@ LBA for the metadata. The zfsboot boot - block and zfsloader supports + block and zfsloader support filesystems within a ZFS storage pool. In - zfsloader, ZFS device name format now - is + zfsloader, the ZFS device name format is now zfs:pool/fs - and fully qualified file path is + and the fully qualified file path format is zfs:pool/fs:/path/to/file. - The zfsboot accepts kernel/loader name - in a format + The zfsboot boot block accepts the + kernel/loader name in the format pool:fs:path/to/file or, as before, pool:path/to/file. In the latter case a default filesystem is used (the pool - root or bootfs property). The - zfsboot passes GUIDs of the selected + root or a filesystem with the bootfs property). The + zfsboot boot block passes + the GUIDs of the selected storage pool and dataset to zfsloader to be used as its defaults. - The &os;/sparc64 now - supports booting from ZFS via zfsboot boot block and - zfsloader. For example, the following commands create a + &os;/sparc64 now + supports booting from ZFS via the zfsboot boot block and + zfsloader. For example, the following commands create a mirrored storage pool rpool consisting of da0a and da0b and configure the storage pool as the root filesystem: @@ -326,10 +326,10 @@ supports attaching multiple instances. The adm1030(4) driver - for G4 MDD fan now shows its PWM parameter in the device + for G4 MDD fans now shows its PWM parameter in the device's &man.sysctl.8; variable. - The cesa(4) driver for + The cesa(4) driver for the Marvell crypto engine and security accelerator has been added. @@ -337,35 +337,35 @@ driver now supports PowerPC G4+ (MPC745x/MPC744x). The &man.hwpmc.4; - driver now supports Intel Sandy Bridge + driver now supports the Intel Sandy Bridge microarchitecture. The &man.hwpmc.4; driver now supports software events. Simultaneous usage of software PMC and hardware PMC is allowed. - The pcf8563(4) driver for NXP + The pcf8563(4) driver for the NXP (Philips) PCF8563 RTC has been added. &os;/powerpc now - supports PWM-controlled fans found on PowerMac SMU (System + supports the PWM-controlled fans found on the PowerMac SMU (System Management Unit). - &os;/arm now supports Atmel + &os;/arm now supports the Atmel SAM9XE family of microcontrollers. The following &man.sysctl.8; variables have been added: kern.proc.env for environment strings, kern.proc.auxv - for ELF auxiliary vectors from a process stack, + for ELF auxiliary vectors from a process's stack, kern.proc.groups for process groups, kern.proc.rlimit for process resource - limits, and kern.proc.ps_strings for - ps_strings location, kern.proc.osrel for - osreldate for process binary. + limits, kern.proc.ps_strings for the + ps_strings location, and kern.proc.osrel for + the osreldate of the process's binary. The &man.usb.4; driver now - handles suspend and resume correctly with no need of reloading + handles suspend and resume correctly with no need to reload the kernel module. A bug in the &man.xhci.4; (USB 3.0) @@ -373,24 +373,24 @@ hubs. The &man.viawd.4; driver, which - supports watchdog timer found in VIA south bridge (VT8251, + supports the watchdog timer found in VIA south bridges (VT8251, CX700, VX800, VX855, VX900), has been added. The &man.wbwd.4; driver, which - supports watchdog timer found in Winbond Super I/O chips, + supports the watchdog timer found in Winbond Super I/O chips, has been added. Multimedia Support The drm2(4) Intel GPU driver, - which supports GEM, KMS, and works with new generations of + which supports GEM and KMS and works with new generations of GPUs such as IronLake, SandyBridge, and IvyBridge, has been added. The &man.agp.4; driver now supports SandyBridge and IvyBridge CPU northbridges. The &man.snd.hda.4; driver has been - updated. It now supports HDMI, new volume control, + updated. It now supports and provides HDMI, new volume control, automatic recording source selection, runtime reconfiguration, more then 4 PCM devices on a controller, multichannel recording, additional playback/record @@ -405,19 +405,19 @@ headers in the &man.snd.emu10kx.4;, &man.snd.maestro3.4;, and &man.snd.csa.4; drivers have been replaced with BSD-licensed one. These drivers are now fully - BSD-licensed and included in GENERIC + BSD-licensed and included in the GENERIC kernel on &os;/amd64 and &os;/i386. Network Interface Support - A bug in &man.ae.4; driver which could - prevent from working under certain conditions has been + A bug in the &man.ae.4; driver which could + prevent it from working under certain conditions has been fixed. The &man.axe.4; driver now supports - TX/RX checksum offloading support for ASIX AX88772B + TX/RX checksum offloading support for the ASIX AX88772B controller. The &man.bce.4; driver has been improved: @@ -429,7 +429,7 @@ - A bug has been fixed. It could + A bug has been fixed which could prevent IPMI from working when the interface was marked as down. @@ -439,29 +439,29 @@ which allow the controller to perform MDIO type accesses to a remote transceiver by using message pages defined through MRBE (MultiRate Backplane Ethernet). This is - found on machines such as Dell PowerEdge M610 + found on machines such as the Dell PowerEdge M610 Blade. - The &man.bge.4; and brgphy(4) driver have been + The &man.bge.4; and brgphy(4) drivers have been improved: - A bug which could prevent the - DMA functionality from working correctly, has been + A bug which could prevent + DMA functionality from working correctly has been fixed. - It now works with PCI-X BCM 5704 - controller that connected to AMD-8131 PCI-X bridge. + It now works with a PCI-X BCM 5704 + controller that is connected to AMD-8131 PCI-X bridge. It now supports - BCM 5720 and BCM 5720C PHY, and BCM 57780 1000BASE-T + the BCM 5720 and BCM 5720C PHY, and the BCM 57780 1000BASE-T media interface. @@ -475,25 +475,25 @@ The &man.cxgbe.4; and - &man.cxgb.4; driver has been updated to firmware version - 1.5.2.0. This now supports device configuration via a + &man.cxgb.4; drivers have been updated to firmware version + 1.5.2.0. They now support device configuration via a plain text configuration file, IPv6 hardware checksumming, - IPv6 TSO and LRO, loadfw command in the - cxgbetool(8) utility which allows to install a firmware to - the card, &man.sysctl.8; variables under + IPv6 TSO and LRO, a loadfw command in the + cxgbetool(8) utility which allows installing a firmware to + the card, and &man.sysctl.8; variables under dev.t4nex.N.misc for various information. The &man.dc.4; driver now supports NVIDIA (ULi) M5261/M5263 PCI FastEthernet controllers, which - are found on ULi M1563 South Bridge and M1689 Bridge. + are found on the ULi M1563 South Bridge and M1689 Bridge. The &man.et.4; driver now works on all platforms. A bug which could prevent &man.altq.4; support from working has been fixed. A new - &man.sysctl.8; variables under + &man.sysctl.8; variable under dev.et.N.stats - have been added for hardware MAC statistics. + has been added for hardware MAC statistics. The &man.igb.4; driver has been updated to version 2.3.4. It now supports newer i210/i211 @@ -507,7 +507,7 @@ supports device hints hint.miibus.N.phymask for PHY addresses being probed. This is useful to manually - probe PHYs which do not implement basic register set of + probe PHYs which do not implement basic the register set of IEEE 802.3. Also, the &man.miibus.4; driver has been changed to a hinted bus, allowing to add child devices via hints and to set their attach arguments in addition to @@ -523,14 +523,14 @@ National DP83849. The &man.oce.4; driver, which - supports Emulex OneConnect 10Gbit Ethernet card, has been + supports Emulex OneConnect 10Gbit Ethernet cards, has been added. The &man.ral.4; driver now supports Ralink RT2800 and RT3000 chipsets. The &man.re.4; driver now - supports RTL8411 PCIe Gigabit Ethernet controller. A bug + supports the RTL8411 PCIe Gigabit Ethernet controller. A bug which could prevent WoL (Wake-on-LAN) from working on RTL8168E has been fixed. @@ -541,20 +541,20 @@ supports 10Gb Ethernet adapters based on Solarflare SFC9000 family controllers, has been added. - The smcphy(4); driver now supports + The smcphy(4) driver now supports the Seeq Technology 80220 PHY. This is found on Adaptec - AIC-6915 Starfire Ethernet controller supported by the + AIC-6915 Starfire Ethernet controllers supported by the &man.sf.4; driver. The &man.ti.4; driver now - supports &man.altq.4; framework, reporting link-state - change, and &man.sysctl.8; variables under + supports the &man.altq.4; framework, reporting link-state + changes, and &man.sysctl.8; variables under dev.ti.N for - the interrupt moderation parameters. + interrupt moderation parameters. - A bug in &man.ti.4; driver which could - prevent it from working correctly with PAE - kernel option, has been fixed. + A bug in the &man.ti.4; driver which could + prevent it from working correctly with the PAE + kernel option has been fixed. The &man.vge.4; driver has been updated to improve its link establishment and link-state @@ -565,7 +565,7 @@ The &man.xnb.4; Xen Paravirtualized Backend Ethernet Driver (netback) has been updated. This is - attached via newbus framework and works properly in both + attached via the newbus framework and works properly in both HVM and PVM mode. @@ -573,8 +573,8 @@ Network Protocols - The &man.if.bridge.4; pseudo interface - now supports reporting link-state change depending on status + The &man.if.bridge.4; pseudo-interface + now supports reporting link-state changes depending on the status of the member interfaces. The table argument @@ -584,23 +584,23 @@ skipto tablearg ip from any to any via table(42) in - &os; &man.ip6.4; protocol stack now has been improved in terms + The &os; &man.ip6.4; protocol stack has been improved in terms of its performance. Benchmarking can be found at . - &os; &man.ip6.4; protocol stack now - supports multiple FIB. + The &os; &man.ip6.4; protocol stack now + supports multiple FIBs. An IPv6 default route configured via Router Advertisement messages is now reinstalled correctly when the default route is manually removed and then another - same RA message is received. + RA message is received for the same route. A bug which could return an incorrect - value of IPV6_MULTICASE_HOPS socket option + value for the IPV6_MULTICASE_HOPS socket option has been fixed. - A new &man.sysctl.8; + A new &man.sysctl.3; name NET_RT_IFLISTL has been added. This queries the address list and works on extended and extensible structures if_msghdrl and @@ -609,39 +609,39 @@ The &man.netmap.4; fast packet I/O framework has been added. The &man.em.4;, lem(4), - &man.igb.4;. and &man.re.4; drivers now support this + &man.igb.4;, and &man.re.4; drivers now support this framework. The technical details can be found at . - &os; &man.sctp.4; protocol stack now + The &os; &man.sctp.4; protocol stack now supports a new &man.sysctl.8; variable net.inet.sctp.blackhole. If this is set to 1, no ABORT is sent back in response to an incoming INIT. If this is set to 2, no - ABORT is sent back in response to an out - of the blue packet. If set to 0 + ABORT is sent back in response to an + out-of-the-blue packet. If set to 0 (the default), ABORTs are sent. A bug which could cause a system panic when SCTP_RECVINFO or - SCTP_NXTINFO is specified to - &man.getsockopt.2; system call, has been fixed. + SCTP_NXTINFO is specified to the + &man.getsockopt.2; system call has been fixed. - &os; &man.sctp.4; protocol stack now - supports SCTP_REMOTE_UDP_ENCAPS_PORT + The &os; &man.sctp.4; protocol stack now + supports the SCTP_REMOTE_UDP_ENCAPS_PORT socket option. - SO_PROTOCOL and + The SO_PROTOCOL and SO_PROTOTYPE socket options have been - added. These returns the socket protocol number. + added. These return the socket protocol number. - TCP_KEEPINIT, + The TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL, and TCP_KEEPCNT socket options have been - added. These allow to control initial timeout, idle time, - idle resend interval, and idle send count in a per-socket + added. These allow controlling initial timeout, idle time, + idle resend interval, and idle send count on a per-socket basis. @@ -658,7 +658,7 @@ This is enabled by default. The new &man.cam.4;-based &man.ata.4; - driver now supports old &man.loader.8; tunables, + driver now supports old &man.loader.8; tunables hw.ata.ata_dma and hw.ata.atapi_dma, for backward compatibility. @@ -686,8 +686,8 @@ The &man.cd.4; driver now supports Audio CDs in the same way as &man.acd.4; did. It will - report 2352-byte sector to &man.geom.4; subsystem and use - READ CD command for reading the data. + report a 2352-byte sector size to the &man.geom.4; subsystem and use + the READ CD command for reading the data. This fixes an interoperability issue with multimedia/vlc. @@ -742,15 +742,15 @@ When it was NONE, the device did not - report the logical block provisioning support via respective + report logical block provisioning support via respective VPD pages. One can set a specific method for testing and it will be disabled automatically when not supported on the device. The MIRROR &man.geom.4; class now supports - BIO_DELETE. This means - TRIM command will be issued on the + BIO_DELETE. This means the + TRIM command will be issued on supported devices when deleting data. The @@ -762,37 +762,37 @@ metadata, and add, remove, fail, restore, configure - subcommands in &man.gmultipath.8; utility to manage the + subcommands in the &man.gmultipath.8; utility to manage the configured paths. The PART_LDM &man.geom.4; class has - been added. This partition scheme supports for Logical Disk + been added. This partition scheme has support for Logical Disk Manager, which is also known as dynamic volumes in Microsoft Windows NT. Note that JBOD, RAID0, and RAID5 volumes are not supported yet. - PART_MBR + The PART_MBR &man.geom.4; class now allows a primary or extended Linux swap partition to be used as the system dump device. The RAID &man.geom.4; class is now - included in GENERIC kernel. + included in the GENERIC kernel. The RAID &man.geom.4; class now supports disks with over 2TB capacity - for Intel metadata format. + for the Intel metadata format. The RAID - &man.geom.4; class now supports DDF metadata format, which + &man.geom.4; class now supports the DDF metadata format, which is defined in the SNIA Common RAID Disk Data Format Specification v2.0. The UNCOMPRESS &man.geom.4; class and the &man.mkulzma.8; utility have been added. This class - supports lzma compressed images like + supports lzma compressed images like the UZIP &man.geom.4; class and the &man.mkuzip.8; utility. @@ -808,11 +808,11 @@ been fixed. The &man.ixgbe.4; driver now supports - Intel X540 adapter. + the Intel X540 adapter. - A bug in &man.mfi.4; driver has been - fixed. It could cause some inconsistency due to missing of - interrupt acknowledge and output the following log + A bug in the &man.mfi.4; driver has been + fixed. It could cause some inconsistencies due to missed + interrupt acknowledgements and output the following log message: mfi0: COMMAND 0xffffffXXXXXXXXXX TIMEOUT AFTER XX SECONDS @@ -848,7 +848,7 @@ It now supports a timeout on positive name cache entries on the client side. A new mount option nametimeo has been added - and set to 60 (in second) by + and set to 60 (in seconds) by default. @@ -862,7 +862,7 @@ process writes to an mmap-backed file on an NFS filesystem, flushing changes to the data could fail under some circumstances such as errors due to - permission mismatch and this failure could not detected + permission mismatch, and this failure could not be detected as an error. A new &man.sysctl.8; variable vfs.nfs.nfs_keep_dirty_on_error has been added to control the behavior on the client side @@ -874,12 +874,12 @@ The &man.nfsv4.4; filesystem now - supports a new &man.sysctl.8; variable + supports a &man.sysctl.8; variable vfs.nfsd.disable_checkutf8. This - disables the check for a UTF-8 compliance in the + disables the check for UTF-8 compliance in filenames. This is disabled by default. Note that - enabling this may help some interoperability issue but - results in an NFSv4 server that is non-RFC 3530 + enabling this may help wht some interoperability issues but + results in an NFSv4 server that is not RFC 3530 compliant. @@ -888,28 +888,28 @@ experimental implementation anymore. The &man.tmpfs.5; filesystem now - supports a new &man.sysctl.8; variable - vfs.tmpfs.memory_reserved to set amount + supports a &man.sysctl.8; variable + vfs.tmpfs.memory_reserved to set the amount of required free pages when &man.tmpfs.5; attempts to allocate a new node. - &os; ZFS filesystem has been - updated by merging improvements in illumos project. The + &os;'s ZFS filesystem has been + updated by merging improvements from the illumos project. The following changes are made: New properties, clones and written, have been added. - &man.zfs.8; send command - now reports estimated size of the stream. + The &man.zfs.8; send command + now reports an estimated size of the stream. - &man.zfs.8; destroy command - now reports estimated space which would be reclaimed when - flag is specified. + The &man.zfs.8; destroy command + now reports an estimate of the space which would be reclaimed, + when is specified. - &man.zfs.8; get command now - supports + The &man.zfs.8; get command now + supports the flag to specify the data type. @@ -919,7 +919,7 @@ correctly when using ZFS as the root filesystem. The script is located at /usr/src/tools/tools/zfsboottest.sh and - it uses zfsboottest binary program in the + it uses the zfsboottest binary program in the same directory. The binary program can be built and installed by the @@ -937,7 +937,7 @@ The &man.sysctl.8; variable vfs.zfs.txg.timeout has been changed from - read-only to writable one. + read-only to writable. @@ -948,7 +948,7 @@ because it was deprecated years ago. The &man.camcontrol.8; utility now - supports fwdownload subcommand for firmware + supports a fwdownload subcommand for firmware update on SCSI devices from Hitachi, HP, IBM, Plextor, Quantum, and Seagate. This subcommand will reprogram the firmware on devices connected over an ATA/SATA transport. @@ -963,11 +963,11 @@ The &man.dump.8; utility now uses 53 characters for the device names in - /etc/dumpdates. This was limited to 32 + /etc/dumpdates. This was previously limited to 32 characters. The &man.fetch.1; utility now correctly - supports percent-encoded user and password part in a + supports a percent-encoded user and password part in a URL. The &man.fdlopen.3; function has been @@ -975,50 +975,50 @@ shared object by file descriptor. The &man.fopen.3; function now supports - (an exclusive create-and-open mode) option - in ISO/IEC 9899:2011, C11 standard. + the (an exclusive create-and-open mode) option + in the ISO/IEC 9899:2011 and C11 standards. A bug in the &man.gcc.1; compiler has been fixed. It could lead to incorrect calculations when - flag is specified. + is specified. - The &man.hastd.8; daemon now supports to - specify filename of the process ID file in + The &man.hastd.8; daemon now supports + specifying the filename of its process ID file in &man.hast.conf.5;. The &man.ifconfig.8; utility now - supports vlanhwcsum parameter to set or + supports a vlanhwcsum parameter to set or reset checksum offloading capability on VLANs. A bug in the &man.ifconfig.8; utility which could display an error message in a jail with no IPv6 - support, has been fixed. + support has been fixed. The &man.ifconfig.8; utility now - supports carp + supports a carp state parameter to set the state to backup or master forcibly. - The &man.jail.8; utility now supports + The &man.jail.8; utility now supports a configuration file (&man.jail.conf.5;) for complex configurations. - The &man.kdump.1; utility now supports + The &man.kdump.1; utility now supports a option to accept either a process ID or a thread ID. - The &man.kenv.1; utility now supports + The &man.kenv.1; utility now supports a flag to display an entry in - name=value format, and + name=value format, and a flag to display only the name. - The &man.kldload.8; utility now supports + The &man.kldload.8; utility now supports a flag to ignore the error status when the specified module is already loaded. libedit has - been updated to NetBSD snapshot as of 28 December, + been updated to a NetBSD snapshot as of 28 December, 2009. &man.libmap.conf.5; now supports @@ -1046,15 +1046,15 @@ a option to control limits for the specified process. - The &man.pciconf.8; utility now supports - flag to display PCI error details in the + The &man.pciconf.8; utility now supports a + flag to display PCI error details in listing mode. When this is specified, the status of any error bits in the PCI status register and PCI-express device status register will be displayed. It also lists any errors indicated by version 1 of PCI-express Advanced Error Reporting (AER). - The &man.procstat.1; utility now shows + The &man.procstat.1; utility now shows the superpage mapping flag when displaying process virtual memory mappings. @@ -1065,7 +1065,7 @@ display resource limits. A bug in the &man.remquo.3; functions - that the quotient did not always have the correct sign when + where the quotient did not always have the correct sign when the remainder was 0, and another bug that the remainder and quotient were both off by a bit in certain cases involving subnormal remainders, have been fixed. Note @@ -1073,11 +1073,11 @@ i386. The &man.rtld.1; run-time linker now - supports GCC's RELRO (RElocation Read-Only). This prevents + supports GCC's RELRO (RElocation Read-Only). This prevents the GOT (Global Offset Table) from being overwritten. The &man.rtld.1; run-time linker now - supports GNU hash section (DT_GNU_HASH), + supports a GNU hash section (DT_GNU_HASH), which is a replacement of optional ELF hash section. The &man.setbuf.1; utility and @@ -1086,10 +1086,10 @@ stdio streams. The &man.top.1; utility now correctly - supports per-thread I/O statistics of ZFS in option. - The &man.unzip.1; utility now supports + The &man.unzip.1; utility now supports a option for zipinfo. The &man.xlocale.3; API has been @@ -1105,7 +1105,7 @@ A new variable daily_status_zfs_zpool_list_enable has - been added. It controls whether listing all of the ZFS + been added. It controls whether or not to list all of the ZFS pools in periodic/daily/404.status-zfs. The default value is YES. @@ -1118,13 +1118,13 @@ &man.rc.8; Scripts - rc.d/nfsd script - now sets vfs.nfsd.server_max_nfsvers + The rc.d/nfsd script + now sets the vfs.nfsd.server_max_nfsvers &man.sysctl.8; variable to 4 when nfsv4_server_enable is set to YES. - A backward compatibility issue when + A backwards compatibility issue when both ipv6_enable=YES and ipv6_gateway_enable=YES are defined at the same time has been fixed. @@ -1153,12 +1153,12 @@ &man.bsdtar.1;, and &man.cpio.1; have been updated to version 2.8.5. - libpcap - library have been updated to 1.2.1. + The libpcap + library has been updated to 1.2.1. libstdc++ - have been updated to rev 135556 of - gcc-4_2-branch (LGPLv2-licensed + has been updated to revision 135556 of the + gcc-4_2-branch (the last LGPLv2-licensed version). The LLVM @@ -1171,10 +1171,10 @@ has been updated to version 5.1. OpenSSL has - been updated to 0.9.8x. + been updated to version 0.9.8x. - tcpdump - (&man.tcpdump.1;) utility has been updated to 4.2.1. + The tcpdump + (&man.tcpdump.1;) utility has been updated to version 4.2.1. The TENEX C shell (&man.tcsh.1;) has been updated to version @@ -1184,8 +1184,8 @@ database has been updated to the tzdata2012a release. - zlib - library have been updated to 1.2.7. + The zlib + library has been updated to version 1.2.7. @@ -1196,9 +1196,9 @@ role="package">x11/kde4) has been updated to 4.8.4. - Issues that &os; - installation CDROM image caused a panic, and did not - recognized on OpenBIOS-based environment like QEMU, have been + Issues where the &os; + installation CDROM image caused a panic, and was not + recognized on OpenBIOS-based environments like QEMU, have been fixed. @@ -1207,22 +1207,22 @@ Upgrading from previous releases of &os; - Upgrading using freebsd-update(8) or a source-based + <title>Upgrading using &man.freebsd-update.8; or a source-based procedure Beginning with &os; 6.2-RELEASE, binary upgrades between RELEASE versions (and snapshots of the various security branches) are supported using the &man.freebsd-update.8; utility. The binary upgrade procedure - will update unmodified userland utilities, as well as a - unmodified GENERIC kernel distributed as a part of an official - &os; release. The &man.freebsd-update.8; utility requires - that the host being upgraded have Internet - connectivity. + will update unmodified userland utilities, as well as an + unmodified GENERIC kernel, distributed as + a part of an official &os; release. The + &man.freebsd-update.8; utility requires that the host being + upgraded have Internet connectivity. Source-based upgrades (those based on recompiling the &os; base system from source code) from previous versions are - supported, according to the instructions in + supported using to the instructions in /usr/src/UPDATING. For more specific information about upgrading From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 00:24:44 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E764CB8; Tue, 25 Dec 2012 00:24:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80EE48FC13; Tue, 25 Dec 2012 00:24:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBP0OiSn019474; Tue, 25 Dec 2012 00:24:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBP0OiVj019473; Tue, 25 Dec 2012 00:24:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201212250024.qBP0OiVj019473@svn.freebsd.org> From: Xin LI Date: Tue, 25 Dec 2012 00:24: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: r244669 - stable/9/sbin/sysctl 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 00:24:44 -0000 Author: delphij Date: Tue Dec 25 00:24:43 2012 New Revision: 244669 URL: http://svnweb.freebsd.org/changeset/base/244669 Log: MFC r244104: In parse(): - Only operate on copy, don't operate on source. - Eliminate home-rolled strsep(). - Constify the parameter. Modified: stable/9/sbin/sysctl/sysctl.c Directory Properties: stable/9/sbin/sysctl/ (props changed) Modified: stable/9/sbin/sysctl/sysctl.c ============================================================================== --- stable/9/sbin/sysctl/sysctl.c Mon Dec 24 22:28:52 2012 (r244668) +++ stable/9/sbin/sysctl/sysctl.c Tue Dec 25 00:24:43 2012 (r244669) @@ -62,7 +62,7 @@ static int aflag, bflag, dflag, eflag, h static int Nflag, nflag, oflag, qflag, xflag, warncount; static int oidfmt(int *, int, char *, u_int *); -static void parse(char *); +static void parse(const char *); static int show_var(int *, int); static int sysctl_all(int *oid, int len); static int name2oid(char *, int *); @@ -161,7 +161,7 @@ main(int argc, char **argv) * Set a new value if requested. */ static void -parse(char *string) +parse(const char *string) { int len, i, j; void *newval = 0; @@ -176,12 +176,11 @@ parse(char *string) char *cp, *bufp, buf[BUFSIZ], *endptr, fmt[BUFSIZ]; u_int kind; - bufp = buf; + cp = buf; if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ) errx(1, "oid too long: '%s'", string); - if ((cp = strchr(string, '=')) != NULL) { - *strchr(buf, '=') = '\0'; - *cp++ = '\0'; + bufp = strsep(&cp, "="); + if (cp != NULL) { while (isspace(*cp)) cp++; newval = cp; From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 06:07:35 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67C20566; Tue, 25 Dec 2012 06:07:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4743F8FC0A; Tue, 25 Dec 2012 06:07:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBP67ZIH098406; Tue, 25 Dec 2012 06:07:35 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBP67ZFg098405; Tue, 25 Dec 2012 06:07:35 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201212250607.qBP67ZFg098405@svn.freebsd.org> From: Hiroki Sato Date: Tue, 25 Dec 2012 06:07:35 +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: r244671 - stable/9/release/doc/en_US.ISO8859-1/errata 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 06:07:35 -0000 Author: hrs Date: Tue Dec 25 06:07:34 2012 New Revision: 244671 URL: http://svnweb.freebsd.org/changeset/base/244671 Log: Add Errata items: - mfi(4) driver overflow issue, - typos in Installation Instructions. Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Dec 25 00:25:22 2012 (r244670) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Dec 25 06:07:34 2012 (r244671) @@ -205,6 +205,33 @@ Late-Breaking News - No news. + [November 2, 2012] The current &man.mfi.4; driver has an + overflow bug when handling disks larger than 2^32 sectors in + SYSPD volumes, also known as JBODs, which will cause data + corruption. This bug has been fixed on this &os;-CURRENT but + was too late for inclusion in this release. An Errata Notice + for &release.current; is planned. + + [December 25, 2012] The Installtion Instructions had the + following wrong information about upgrading procedure. All of + them have been fixed in the online version. + + + + The link URL of upgrading section in the Release + Notes, branch names where upcoming Security + Advisories or Errata Notices will be applied, and a + command line argument of &man.freebsd-update.8; were ones + for 9.0-RELEASE, not for &release.current;. + + + + The list of releases supported by &man.freebsd-update.8; + utility were incorrect. For 9.X, The following versions are + supported: 9.0-RELEASE, + 9.1-BETA1, and + 9.1-RC[123]. + +
From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 10:44:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D23499B5; Tue, 25 Dec 2012 10:44:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 365F58FC0A; Tue, 25 Dec 2012 10:44:30 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qBPAiMUJ057147; Tue, 25 Dec 2012 12:44:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua qBPAiMUJ057147 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qBPAiM7N057146; Tue, 25 Dec 2012 12:44:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 25 Dec 2012 12:44:22 +0200 From: Konstantin Belousov To: Alfred Perlstein Subject: Re: svn commit: r244663 - stable/9 Message-ID: <20121225104422.GB53644@kib.kiev.ua> References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="03sphU6jKm9HdgU1" Content-Disposition: inline In-Reply-To: <50D8B533.8080507@mu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-stable@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 10:44:31 -0000 --03sphU6jKm9HdgU1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 24, 2012 at 12:04:03PM -0800, Alfred Perlstein wrote: > On 12/24/12 11:24 AM, Adrian Chadd wrote: > > ... why'd we break the KBI in a stable branch? > > > I am not sure either. >=20 > I think a single VOP for nullfs (while ugly) would have sufficed. No, it doesn't. Even if it would be sufficient, having a switch right after the vtable call is silly. But, ignoring the sillyness, having a single VOP forces a filesystem, needed to override the single bit of behaviour, to override all behaviours hidden from under the common VOP. Besides the incovenience, it breaks the bypass. This is why I did not went this route in the HEAD commit. Making HEAD and stable diverge for the VOP table is unmaintainable. At least one other change which cannot be covered by the VOP table hacking is the struct vfsops new method. Traditionally (my memory goes back to 6.x branch) we did not maintained VFS KBI stability on the branches. --03sphU6jKm9HdgU1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ2YOFAAoJEJDCuSvBvK1B/ssQAISdLaNUORMPE9M20P0KttJa /myrd3mS4K9RcKqOY3RJ7rrDQwpPie+gS/B/35wYdiREp4oJdCIZRe6qNWm7bzpJ N5Q3uu+WVcOasw4IM9H8CwwNWcZIQJiLh9tm1vMYaoFp8hhUfWp4vvpMelKNR8v0 rztOuF2ql6nj7/RD+cmrODkf4BgAeQq8Sl4zr1HY/Mk0F+O6ik5n3rwTUi+2Uq0f B1j6tW3u8fx8nF1H/kowQ58H6aH+KhcKyvA7oUVYOQK3jLX8tR5KmU10zflOrGn9 yEooI/xJKWFdyZrryiSoF9zcLkjOexlE/4GxgaZuio+CHs0Wn3ZMQAhhCnOiNPCe QE8JOKgPwdOlQAE7q6r8VXNqQylcPZlvbmuhee+rfjx9IXjBi75FAxxuj3PLWyOg RjEHuXGj844rWxGqcsOKwMKMjC2s8KC9J8HcAN8Yz8ogN6sIVflXSra463aEloQP YBnW3j2dkHiYTpuj9v8/DweUzi6C3Bca2Z+wqnedn9UWIRaTccnfcTAtx2EfeLDq mm/c95RL20HzjzLewy8NnlX5rMexJXfs0Y7rKOCd6wigu+HpWDk1IkutczMnwxqg kAFfiJnYnnWqPz+WNiWo7cv0z+t/JJ+LkvTb2D8AZIkwj8Ln0vf6bXoDAaI/RwRc 5jilHzVtYYYz/D37xD4u =/Axn -----END PGP SIGNATURE----- --03sphU6jKm9HdgU1-- From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 11:11:26 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B710DFC5; Tue, 25 Dec 2012 11:11:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 97BF58FC0A; Tue, 25 Dec 2012 11:11:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBPBBQHs043004; Tue, 25 Dec 2012 11:11:26 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBPBBQ7p043002; Tue, 25 Dec 2012 11:11:26 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201212251111.qBPBBQ7p043002@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Dec 2012 11:11:26 +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: r244676 - stable/9/usr.sbin/sysinstall 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 11:11:26 -0000 Author: dteske Date: Tue Dec 25 11:11:26 2012 New Revision: 244676 URL: http://svnweb.freebsd.org/changeset/base/244676 Log: Fix another typo while we're here. Modified: stable/9/usr.sbin/sysinstall/http.c Modified: stable/9/usr.sbin/sysinstall/http.c ============================================================================== --- stable/9/usr.sbin/sysinstall/http.c Tue Dec 25 10:47:45 2012 (r244675) +++ stable/9/usr.sbin/sysinstall/http.c Tue Dec 25 11:11:26 2012 (r244676) @@ -253,7 +253,7 @@ mediaGetHTTP(Device *dev, char *file, Bo msgConfirm("Client error %s, you could try an other server",buf); return NULL; } else if (rv >= 300) { - msgConfirm("Error %s,",buf); + msgConfirm("Error %s",buf); return NULL; } else if (rv != 200) { msgConfirm("Error %s when sending %s, you could try an other server",buf, req); From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 11:28:24 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D0574D3; Tue, 25 Dec 2012 11:28:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id EE3558FC0C; Tue, 25 Dec 2012 11:28:23 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qBPBSKKK061478; Tue, 25 Dec 2012 13:28:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua qBPBSKKK061478 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qBPBSKek061477; Tue, 25 Dec 2012 13:28:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 25 Dec 2012 13:28:20 +0200 From: Konstantin Belousov To: Alfred Perlstein Subject: Re: svn commit: r244663 - stable/9 Message-ID: <20121225112820.GC53644@kib.kiev.ua> References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kJMkLA1uPhjFFA+D" Content-Disposition: inline In-Reply-To: <20121225104422.GB53644@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-stable@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 11:28:24 -0000 --kJMkLA1uPhjFFA+D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 25, 2012 at 12:44:22PM +0200, Konstantin Belousov wrote: > On Mon, Dec 24, 2012 at 12:04:03PM -0800, Alfred Perlstein wrote: > > On 12/24/12 11:24 AM, Adrian Chadd wrote: > > > ... why'd we break the KBI in a stable branch? > > > > > I am not sure either. > >=20 > > I think a single VOP for nullfs (while ugly) would have sufficed. > No, it doesn't. >=20 > Even if it would be sufficient, having a switch right after the > vtable call is silly. But, ignoring the sillyness, having a single > VOP forces a filesystem, needed to override the single bit of behaviour, > to override all behaviours hidden from under the common VOP. Besides > the incovenience, it breaks the bypass. This is why I did not went > this route in the HEAD commit. >=20 > Making HEAD and stable diverge for the VOP table is unmaintainable. >=20 > At least one other change which cannot be covered by the VOP table > hacking is the struct vfsops new method. >=20 > Traditionally (my memory goes back to 6.x branch) we did not maintained > VFS KBI stability on the branches. Forgot to note, you completely ignored the VOP vnode locking protocol in your patch. --kJMkLA1uPhjFFA+D Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ2Y3TAAoJEJDCuSvBvK1BvfUP/Rp2E+p82BtuyLbvSr3cyQ2t ICfwzPODtyhcnhbqkJPRL9zLfxBwSydeudrWdqXvcAXg1YOCHMN4ec3kOeiYkJ23 yxgITuev2qNWB1uX6YCX3SFpEYxOC7/hcnJf36dlkZ5UzgG5uU/Q80EBf3dAbYqj hSqrgx689ueg6xFMFXXL0n3Tn8rzmsIuHK1aB6Z3aiK6wHhkiebJKns6EeK/4DSV E5CPoFSYjx2oEKCV3P4aprzcWyA3Vkhs6nHYSqcEzAaZwstArbO1vGO2cJPQijV6 54XcEPptNG+1WuJWf3I0G4dnp/l9UvMRs5cs8Ro7G7K+VK8UVlw0OvSGmKCP6ASb GMBKiSzKejxeGRRWhlgzM81u05co+NlZb9BsE/g/j3wKCLqNQeOsLirNxmsHGz7E np7l19hxDWI0k/CdN8QgBPD1A6qOdnJo/SPXRgtjOIzhsd/4WyAbuKogjY1/LuHj m5QX6jftSxRAJHJ+uUy5iNe49SoOo0Rj/Tu72vyCz2jTeobCE4XrurZ91WKhJ4YG uxyu2X2qqgZd2jL66krhJ5iT41BctzFuwfQLp0CevzIvcrzX5jXzmpaTtIYqnWBG ciR3v+HoobMV6zSQF3fbdT0yAZke6Zf9+1y0F/SP7i8yjJoKDQh8Ou6MweHbzvzh EGQojKIByGl0DkcgFuoP =0MQN -----END PGP SIGNATURE----- --kJMkLA1uPhjFFA+D-- From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 17:39:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C649739; Tue, 25 Dec 2012 17:39:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 437A18FC12; Tue, 25 Dec 2012 17:39:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBPHdc8I099618; Tue, 25 Dec 2012 17:39:38 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBPHdbwv099614; Tue, 25 Dec 2012 17:39:37 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201212251739.qBPHdbwv099614@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 25 Dec 2012 17:39:37 +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: r244687 - stable/9/sys/fs/ext2fs 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 17:39:38 -0000 Author: pfg Date: Tue Dec 25 17:39:37 2012 New Revision: 244687 URL: http://svnweb.freebsd.org/changeset/base/244687 Log: MFC r244475: More constant renaming in preparation for newer features. We also try to make better use of the fs flags instead of trying adapt the code according to the fs structures. In the case of subsecond timestamps and birthtime we now check that the feature is explicitly enabled: previously we only checked that the reserved space was available and silently wrote them. This approach is much safer, especially if the filesystem happens to use embedded inodes or support EAs. Discussed with: Zheng Liu, bde Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h stable/9/sys/fs/ext2fs/ext2_inode_cnv.c stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/ext2fs/ext2fs.h Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dinode.h Tue Dec 25 17:06:05 2012 (r244686) +++ stable/9/sys/fs/ext2fs/ext2_dinode.h Tue Dec 25 17:39:37 2012 (r244687) @@ -60,15 +60,16 @@ #define EXT2_APPEND 0x00000020 /* writes to file may only append */ #define EXT2_NODUMP 0x00000040 /* do not dump file */ #define EXT2_NOATIME 0x00000080 /* do not update atime */ -#define EXT2_INDEX 0x00001000 /* hash-indexed directory */ -#define EXT2_IMAGIC 0x00002000 /* AFS directory */ -#define EXT2_JOURNAL_DATA 0x00004000 /* file data should be journaled */ -#define EXT2_NOTAIL 0x00008000 /* file tail should not be merged */ -#define EXT2_DIRSYNC 0x00010000 /* dirsync behaviour */ -#define EXT2_TOPDIR 0x00020000 /* Top of directory hierarchies*/ -#define EXT2_HUGE_FILE 0x00040000 /* Set to each huge file */ -#define EXT2_EXTENTS 0x00080000 /* Inode uses extents */ -#define EXT2_EOFBLOCKS 0x00400000 /* Blocks allocated beyond EOF */ + +#define EXT4_INDEX 0x00001000 /* hash-indexed directory */ +#define EXT4_IMAGIC 0x00002000 /* AFS directory */ +#define EXT4_JOURNAL_DATA 0x00004000 /* file data should be journaled */ +#define EXT4_NOTAIL 0x00008000 /* file tail should not be merged */ +#define EXT4_DIRSYNC 0x00010000 /* dirsync behaviour */ +#define EXT4_TOPDIR 0x00020000 /* Top of directory hierarchies*/ +#define EXT4_HUGE_FILE 0x00040000 /* Set to each huge file */ +#define EXT4_EXTENTS 0x00080000 /* Inode uses extents */ +#define EXT4_EOFBLOCKS 0x00400000 /* Blocks allocated beyond EOF */ /* * Definitions for nanosecond timestamps. @@ -78,8 +79,7 @@ #define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1) #define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS) -#define E2DI_HAS_XTIME(ip) (EXT2_INODE_SIZE((ip)->i_e2fs) > \ - E2FS_REV0_INODE_SIZE) +#define E2DI_HAS_XTIME(ip) (EXT2_HAS_RO_COMPAT_FEATURE(ip->i_e2fs, EXT2F_ROCOMPAT_EXTRA_ISIZE)) /* * Structure of an inode on the disk Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Tue Dec 25 17:06:05 2012 (r244686) +++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Tue Dec 25 17:39:37 2012 (r244687) @@ -27,17 +27,18 @@ */ #include #include +#include #include #include #include #include #include -#include #include +#include #define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2) -#define NSEC_TO_XTIME(t) ((t << 2) & EXT3_NSEC_MASK) +#define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK) void ext2_print_inode( in ) Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Tue Dec 25 17:06:05 2012 (r244686) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Tue Dec 25 17:39:37 2012 (r244687) @@ -349,7 +349,7 @@ compute_sb_data(struct vnode *devvp, str } } /* Check for extra isize in big inodes. */ - if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT4F_ROCOMPAT_EXTRA_ISIZE) && + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_EXTRA_ISIZE) && EXT2_INODE_SIZE(fs) < sizeof(struct ext2fs_dinode)) { printf("ext2fs: no space for extra inode timestamps\n"); return (EINVAL); Modified: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Tue Dec 25 17:06:05 2012 (r244686) +++ stable/9/sys/fs/ext2fs/ext2fs.h Tue Dec 25 17:39:37 2012 (r244687) @@ -215,18 +215,18 @@ struct m_ext2fs { #define EXT2F_ROCOMPAT_SPARSESUPER 0x0001 #define EXT2F_ROCOMPAT_LARGEFILE 0x0002 #define EXT2F_ROCOMPAT_BTREE_DIR 0x0004 -#define EXT4F_ROCOMPAT_HUGE_FILE 0x0008 -#define EXT4F_ROCOMPAT_GDT_CSUM 0x0010 -#define EXT4F_ROCOMPAT_DIR_NLINK 0x0020 -#define EXT4F_ROCOMPAT_EXTRA_ISIZE 0x0040 +#define EXT2F_ROCOMPAT_HUGE_FILE 0x0008 +#define EXT2F_ROCOMPAT_GDT_CSUM 0x0010 +#define EXT2F_ROCOMPAT_DIR_NLINK 0x0020 +#define EXT2F_ROCOMPAT_EXTRA_ISIZE 0x0040 #define EXT2F_INCOMPAT_COMP 0x0001 #define EXT2F_INCOMPAT_FTYPE 0x0002 -#define EXT4F_INCOMPAT_META_BG 0x0010 -#define EXT4F_INCOMPAT_EXTENTS 0x0040 -#define EXT4F_INCOMPAT_64BIT 0x0080 -#define EXT4F_INCOMPAT_MMP 0x0100 -#define EXT4F_INCOMPAT_FLEX_BG 0x0200 +#define EXT2F_INCOMPAT_META_BG 0x0010 +#define EXT2F_INCOMPAT_EXTENTS 0x0040 +#define EXT2F_INCOMPAT_64BIT 0x0080 +#define EXT2F_INCOMPAT_MMP 0x0100 +#define EXT2F_INCOMPAT_FLEX_BG 0x0200 /* * Features supported in this implementation @@ -239,7 +239,7 @@ struct m_ext2fs { #define EXT2F_COMPAT_SUPP 0x0000 #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ - EXT4F_ROCOMPAT_EXTRA_ISIZE) + EXT2F_ROCOMPAT_EXTRA_ISIZE) #define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE /* Assume that user mode programs are passing in an ext2fs superblock, not From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 19:17:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20B5C283; Tue, 25 Dec 2012 19:17:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E17098FC15; Tue, 25 Dec 2012 19:17:22 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 1A02746B39; Tue, 25 Dec 2012 14:17:22 -0500 (EST) Date: Tue, 25 Dec 2012 19:17:21 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Konstantin Belousov Subject: Re: svn commit: r244663 - stable/9 In-Reply-To: <20121225104422.GB53644@kib.kiev.ua> Message-ID: References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 19:17:23 -0000 On Tue, 25 Dec 2012, Konstantin Belousov wrote: > On Mon, Dec 24, 2012 at 12:04:03PM -0800, Alfred Perlstein wrote: >> On 12/24/12 11:24 AM, Adrian Chadd wrote: >>> ... why'd we break the KBI in a stable branch? >>> >> I am not sure either. >> >> I think a single VOP for nullfs (while ugly) would have sufficed. > No, it doesn't. > > Even if it would be sufficient, having a switch right after the vtable call > is silly. But, ignoring the sillyness, having a single VOP forces a > filesystem, needed to override the single bit of behaviour, to override all > behaviours hidden from under the common VOP. Besides the incovenience, it > breaks the bypass. This is why I did not went this route in the HEAD commit. > > Making HEAD and stable diverge for the VOP table is unmaintainable. > > At least one other change which cannot be covered by the VOP table hacking > is the struct vfsops new method. > > Traditionally (my memory goes back to 6.x branch) we did not maintained VFS > KBI stability on the branches. While I would love to have a stable KBI, or even KPI, for VFS, past experience suggests that we are not prepared to document one, let alone enforce it, and that we frequently experience changes that disrupt both the binary and programming interfaces -- often for very good reasons (e.g., fixing critical bugs, improving performance, etc). And that the notional VFS KPI is extremely promiscuous, being made up of not just the obvious VFS parts, but also VM parts, etc. We've done a bit better with device drivers, where the consensus is that we should Try Fairly Hard, but even there we have only limited documentation of what even constitutes the KPI and KBI. In the end, not all kernel interfaces can be "KPIs" or "KBIs" -- otherwise, we could change almost nothing in -STABLE, causing branches to stagnate rapidly. If you look at Apple's model (for example), they designate certain interfaces as "API" or "KPI" rather than using the terms more casually to refer to any interface in userspace or kernel, and we need to take the same perspective. A few years ago, I took a gander through a number of core network stack data structures used by device drivers, while trying to help resolve how TOE would fit into the network device driver picture, and you can see the results here: http://wiki.freebsd.org/NetKPIKBI However, I didn't attempt to enumerate symbols, just data structures -- that was in large part because the issue we faced at the time was changes disrupting monitoring interfaces used by netstat (etc). If we do want to chase this goal more formally, we should investigate tools to help us do that. Robert From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 25 20:23:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9685DC59; Tue, 25 Dec 2012 20:23:54 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 795B08FC0C; Tue, 25 Dec 2012 20:23:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBPKNs65024064; Tue, 25 Dec 2012 20:23:54 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBPKNsJ5024063; Tue, 25 Dec 2012 20:23:54 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201212252023.qBPKNsJ5024063@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Dec 2012 20:23:54 +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: r244688 - stable/9/usr.sbin/sysinstall 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 20:23:54 -0000 Author: dteske Date: Tue Dec 25 20:23:53 2012 New Revision: 244688 URL: http://svnweb.freebsd.org/changeset/base/244688 Log: Fix error message to be accurate for when ProgName is not "sysinstall" (oops?) Modified: stable/9/usr.sbin/sysinstall/variable.c Modified: stable/9/usr.sbin/sysinstall/variable.c ============================================================================== --- stable/9/usr.sbin/sysinstall/variable.c Tue Dec 25 17:39:37 2012 (r244687) +++ stable/9/usr.sbin/sysinstall/variable.c Tue Dec 25 20:23:53 2012 (r244688) @@ -247,8 +247,8 @@ dump_variables(dialogMenuItem *unused) fp = fopen("/etc/sysinstall.vars", "w"); if (!fp) { - msgConfirm("Unable to write to /etc/%s.vars: %s", - ProgName, strerror(errno)); + msgConfirm("Unable to write to /etc/sysinstall.vars: %s", + strerror(errno)); return DITEM_FAILURE; } From owner-svn-src-stable-9@FreeBSD.ORG Wed Dec 26 18:50:04 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8C8BE4B; Wed, 26 Dec 2012 18:50:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 73CAB8FC12; Wed, 26 Dec 2012 18:50:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBQIo4dN020778; Wed, 26 Dec 2012 18:50:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBQIo4mw020776; Wed, 26 Dec 2012 18:50:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201212261850.qBQIo4mw020776@svn.freebsd.org> From: Alexander Motin Date: Wed, 26 Dec 2012 18:50: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: r244712 - stable/9/sys/dev/sound/pci/hda 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2012 18:50:04 -0000 Author: mav Date: Wed Dec 26 18:50:03 2012 New Revision: 244712 URL: http://svnweb.freebsd.org/changeset/base/244712 Log: MFC r244145: Add quirks for AD1984A codec and Lenovo X300 laptop. PR: kern/148741 Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c stable/9/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Wed Dec 26 18:28:17 2012 (r244711) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Wed Dec 26 18:50:03 2012 (r244712) @@ -271,7 +271,17 @@ hdac_pin_patch(struct hdaa_widget *w) } /* New patches */ - if (id == HDA_CODEC_AD1986A && + if (id == HDA_CODEC_AD1984A && + subid == LENOVO_X300_SUBVENDOR) { + switch (nid) { + case 17: /* Headphones with redirection */ + patch = "as=1 seq=15"; + break; + case 20: /* Two mics together */ + patch = "as=2 seq=15"; + break; + } + } else if (id == HDA_CODEC_AD1986A && (subid == ASUS_M2NPVMX_SUBVENDOR || subid == ASUS_A8NVMCSM_SUBVENDOR || subid == ASUS_P5PL2_SUBVENDOR)) { @@ -372,6 +382,13 @@ hdaa_widget_patch(struct hdaa_widget *w) HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT; w->waspin = 1; } + /* + * Clear "digital" flag from digital mic input, as its signal then goes + * to "analog" mixer and this separation just limits functionaity. + */ + if (hdaa_codec_id(devinfo) == HDA_CODEC_AD1984A && + w->nid == 23) + w->param.widget_cap &= ~HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_MASK; HDA_BOOTVERBOSE( if (w->param.widget_cap != orig) { device_printf(w->devinfo->dev, Modified: stable/9/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.h Wed Dec 26 18:28:17 2012 (r244711) +++ stable/9/sys/dev/sound/pci/hda/hdac.h Wed Dec 26 18:50:03 2012 (r244712) @@ -218,6 +218,7 @@ #define LENOVO_3KN200_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) #define LENOVO_B450_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3a0d) #define LENOVO_TCA55_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x1015) +#define LENOVO_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 27 21:43:22 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5137EF3B; Thu, 27 Dec 2012 21:43:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx1.freebsd.org (Postfix) with ESMTP id 38DB98FC0A; Thu, 27 Dec 2012 21:43:20 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id ei8so4622367wgb.20 for ; Thu, 27 Dec 2012 13:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=yMvDWNQtodhZfjgGOyY1edTFwe1Nrm89s4lRmB8KZEs=; b=Kq9bHVjpEDSS2SbcQJYIVCOJY6nV1MkyCMhWjfuFPtZAk1mpwGw86f2Ru/akcXnMtY EmkMG3Tn016hREJxWbUZE98y2i/iWYlcctTz8P3lOw8Qf6qYy4zFk6mx+/5yHnMZf0KJ tkWIJJsX+4eBaXI14bVnIqZwhGQDB60EN50zwOTQmmxKuOgrkyZT0cR2wJ3JxqomxfcY 32XcUcKEicrNeBzexdxNp3AKJrqb+i9xWXMrJaJJvZTatAH5/GOQipzPbLbPcRLwDPe9 aLwf13HTR/z1YGv4tRUAGbHl0jJYIj9xBQXW4b/4ti0vTWNzMfiZjw3hXIf1LkXD7TkH E9EQ== MIME-Version: 1.0 Received: by 10.194.93.40 with SMTP id cr8mr51131967wjb.16.1356644289074; Thu, 27 Dec 2012 13:38:09 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Thu, 27 Dec 2012 13:38:09 -0800 (PST) In-Reply-To: References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> Date: Thu, 27 Dec 2012 13:38:09 -0800 X-Google-Sender-Auth: D1e-lmgVjpW2V1T8JsNJusRzey0 Message-ID: Subject: Re: svn commit: r244663 - stable/9 From: Adrian Chadd To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-9@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Dec 2012 21:43:22 -0000 It's an interesting discussion to have (after the new year, of course.) I understand that we sometimes have to change ABIs because we can't fix problems otherwise. However, I don't recall seeing much/any discussion about this. If it appeared on a list that I didn't spot then cool. But any kind of ABI change in a stable branch deserves a little more discussion before its done. The reason ath(4) 802.11n support isn't in -9 is because of the ABI changes I'd have to do to net80211 (at least) before I could put it in, and I want to make sure all of my changes are in place before I do (hopefully one, maybe two) large-scale changes. Adrian From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 28 10:58:04 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 701179B0; Fri, 28 Dec 2012 10:58:04 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 548388FC0A; Fri, 28 Dec 2012 10:58:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBSAw4NY009597; Fri, 28 Dec 2012 10:58:04 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBSAw4PZ009596; Fri, 28 Dec 2012 10:58:04 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201212281058.qBSAw4PZ009596@svn.freebsd.org> From: Hajimu UMEMOTO Date: Fri, 28 Dec 2012 10:58: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: r244771 - stable/9/etc/mtree 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2012 10:58:04 -0000 Author: ume Date: Fri Dec 28 10:58:03 2012 New Revision: 244771 URL: http://svnweb.freebsd.org/changeset/base/244771 Log: MFC r244770: Fix location of /var/audit/dist and /var/audit/remote. Note that those who did installworld after r244398 should remove wrongly created /var/dist and /var/remote. Reviewed by: pjd Modified: stable/9/etc/mtree/BSD.var.dist Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/mtree/BSD.var.dist ============================================================================== --- stable/9/etc/mtree/BSD.var.dist Fri Dec 28 10:42:01 2012 (r244770) +++ stable/9/etc/mtree/BSD.var.dist Fri Dec 28 10:58:03 2012 (r244771) @@ -18,11 +18,11 @@ /set mode=0750 /set gname=audit audit - .. dist uname=auditdistd gname=audit mode=0770 .. remote uname=auditdistd gname=wheel mode=0700 .. + .. /set gname=wheel backups .. From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 28 14:06:50 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F26882B2; Fri, 28 Dec 2012 14:06:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D57D58FC08; Fri, 28 Dec 2012 14:06:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBSE6nQ1038454; Fri, 28 Dec 2012 14:06:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBSE6nQ0038453; Fri, 28 Dec 2012 14:06:49 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201212281406.qBSE6nQ0038453@svn.freebsd.org> From: Rick Macklem Date: Fri, 28 Dec 2012 14:06:49 +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: r244772 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2012 14:06:50 -0000 Author: rmacklem Date: Fri Dec 28 14:06:49 2012 New Revision: 244772 URL: http://svnweb.freebsd.org/changeset/base/244772 Log: MFC: r244226 The group list for a non-default export entry (a host/subnet one) was being copied from the wrong place. This patch fixes that. This could cause access failures for mapped users, when the group permissions were needed. PR: 147998 Submitted by: Christopher Key (cjk32@cam.ac.uk) Modified: stable/9/sys/kern/vfs_export.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_export.c ============================================================================== --- stable/9/sys/kern/vfs_export.c Fri Dec 28 10:58:03 2012 (r244771) +++ stable/9/sys/kern/vfs_export.c Fri Dec 28 14:06:49 2012 (r244772) @@ -208,7 +208,7 @@ vfs_hang_addrlist(struct mount *mp, stru np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_anon.cr_uid; crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups, - np->netc_anon->cr_groups); + argp->ex_anon.cr_groups); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 02:13:32 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1228ACA; Sat, 29 Dec 2012 02:13:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EAB778FC08; Sat, 29 Dec 2012 02:13:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBT2DVob051089; Sat, 29 Dec 2012 02:13:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBT2DVQE051088; Sat, 29 Dec 2012 02:13:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212290213.qBT2DVQE051088@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 29 Dec 2012 02:13:31 +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: r244806 - 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 02:13:32 -0000 Author: kib Date: Sat Dec 29 02:13:31 2012 New Revision: 244806 URL: http://svnweb.freebsd.org/changeset/base/244806 Log: MFC r244237: Remove a special case for XEN. Modified: stable/9/sys/kern/kern_fork.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Sat Dec 29 02:10:55 2012 (r244805) +++ stable/9/sys/kern/kern_fork.c Sat Dec 29 02:13:31 2012 (r244806) @@ -150,11 +150,7 @@ sys_vfork(struct thread *td, struct vfor int error, flags; struct proc *p2; -#ifdef XEN - flags = RFFDG | RFPROC; /* validate that this is still an issue */ -#else flags = RFFDG | RFPROC | RFPPWAIT | RFMEM; -#endif error = fork1(td, flags, 0, &p2, NULL, 0); if (error == 0) { td->td_retval[0] = p2->p_pid; From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 04:17:00 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F532E4 for ; Sat, 29 Dec 2012 04:16:58 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx1.freebsd.org (Postfix) with ESMTP id 786E68FC16 for ; Sat, 29 Dec 2012 04:16:58 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id fr13so11423712vbb.9 for ; Fri, 28 Dec 2012 20:16:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Sh1/aevNEsSdqE2sh6DmUt0HHeSm/vfXxow94RQlLWo=; b=jV9wLyy8H7nG/J3Uk7hS5/eTRX9YytAnS0/Ysn8DaYPGYgrWGRfnIlJF3krHyFPiFk mSfnB2ZAlSAKle0zAmSxIu2hjBUYONRIAaasTWl5y2qgrBS8qz0N/Fw3Fi7Zaupmcsrw 0xMGSO2kUy7DCTcvw5Ci6KAZvxN2HEoQrJaMY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=Sh1/aevNEsSdqE2sh6DmUt0HHeSm/vfXxow94RQlLWo=; b=Cg09dC8WCt1wctjRXTiApm869OpJnhYW15B0XVyq2QA8ehL4mdKWRg8OCnwRlvdr0e aoN0h3uPY6LR1/uU6lXAtxVP4VK+FreYVrm0TVXgjts+AUhvj0je96zxZ9c9Ns8MEfp0 x9Fj2zBXtvVacx+B0o8l8XA8fanZGiP6So2PCbgooaJi332cnYSe2lCaq2wafgU+Y4Ng 8cw9Ay3gO1JU5Wa/52mf6KwT1Xtz/srRoJJ0Mv5zrEMKvAkRhrLJkhfWV7hnuXgZqLYH Urlsjsga21V9dmPyGv0+C8RQL+pozAjzNERsBAS+H2hlxTSgdtkhutduzgzXLL5JOH4B pC4g== MIME-Version: 1.0 Received: by 10.52.69.201 with SMTP id g9mr46773171vdu.98.1356754611805; Fri, 28 Dec 2012 20:16:51 -0800 (PST) Received: by 10.220.205.6 with HTTP; Fri, 28 Dec 2012 20:16:51 -0800 (PST) In-Reply-To: References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> Date: Fri, 28 Dec 2012 20:16:51 -0800 Message-ID: Subject: Re: svn commit: r244663 - stable/9 From: Peter Wemm To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlB+2ZzKUf6tS0Gk9YfYK9GB5aXtCS78oBNdc4UuoHDlgBu6UBXHkWMlL6IMhrH5yW+78pV Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-9@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 04:17:00 -0000 On Tue, Dec 25, 2012 at 11:17 AM, Robert Watson wrote: > On Tue, 25 Dec 2012, Konstantin Belousov wrote: > >> On Mon, Dec 24, 2012 at 12:04:03PM -0800, Alfred Perlstein wrote: >>> >>> On 12/24/12 11:24 AM, Adrian Chadd wrote: >>>> >>>> ... why'd we break the KBI in a stable branch? >>>> >>> I am not sure either. >>> >>> I think a single VOP for nullfs (while ugly) would have sufficed. >> >> No, it doesn't. >> >> Even if it would be sufficient, having a switch right after the vtable >> call is silly. But, ignoring the sillyness, having a single VOP forces a >> filesystem, needed to override the single bit of behaviour, to override all >> behaviours hidden from under the common VOP. Besides the incovenience, it >> breaks the bypass. This is why I did not went this route in the HEAD commit. >> >> Making HEAD and stable diverge for the VOP table is unmaintainable. >> >> At least one other change which cannot be covered by the VOP table hacking >> is the struct vfsops new method. >> >> Traditionally (my memory goes back to 6.x branch) we did not maintained >> VFS KBI stability on the branches. > > > While I would love to have a stable KBI, or even KPI, for VFS, past > experience suggests that we are not prepared to document one, let alone > enforce it, and that we frequently experience changes that disrupt both the > binary and programming interfaces -- often for very good reasons (e.g., > fixing critical bugs, improving performance, etc). And that the notional > VFS KPI is extremely promiscuous, being made up of not just the obvious VFS > parts, but also VM parts, etc. For what its worth, we used to have an extensible VOP_* interface that didn't have this sort of problem. It was removed in r140165 (back in 2005) and we gained a whole bunch of extra functionality afterwards including type checking. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV bitcoin:188ZjyYLFJiEheQZw4UtU27e2FMLmuRBUE From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 04:43:27 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F9FA663; Sat, 29 Dec 2012 04:43:27 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id ECEDA8FC12; Sat, 29 Dec 2012 04:43:26 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 492C11A3C1A; Fri, 28 Dec 2012 20:43:26 -0800 (PST) Message-ID: <50DE74F1.70105@mu.org> Date: Fri, 28 Dec 2012 20:43:29 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Peter Wemm Subject: Re: svn commit: r244663 - stable/9 References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org, Robert Watson , Konstantin Belousov X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 04:43:27 -0000 On 12/28/12 8:16 PM, Peter Wemm wrote: > On Tue, Dec 25, 2012 at 11:17 AM, Robert Watson wrote: >> On Tue, 25 Dec 2012, Konstantin Belousov wrote: >> >>> On Mon, Dec 24, 2012 at 12:04:03PM -0800, Alfred Perlstein wrote: >>>> On 12/24/12 11:24 AM, Adrian Chadd wrote: >>>>> ... why'd we break the KBI in a stable branch? >>>>> >>>> I am not sure either. >>>> >>>> I think a single VOP for nullfs (while ugly) would have sufficed. >>> No, it doesn't. >>> >>> Even if it would be sufficient, having a switch right after the vtable >>> call is silly. But, ignoring the sillyness, having a single VOP forces a >>> filesystem, needed to override the single bit of behaviour, to override all >>> behaviours hidden from under the common VOP. Besides the incovenience, it >>> breaks the bypass. This is why I did not went this route in the HEAD commit. >>> >>> Making HEAD and stable diverge for the VOP table is unmaintainable. >>> >>> At least one other change which cannot be covered by the VOP table hacking >>> is the struct vfsops new method. >>> >>> Traditionally (my memory goes back to 6.x branch) we did not maintained >>> VFS KBI stability on the branches. >> >> While I would love to have a stable KBI, or even KPI, for VFS, past >> experience suggests that we are not prepared to document one, let alone >> enforce it, and that we frequently experience changes that disrupt both the >> binary and programming interfaces -- often for very good reasons (e.g., >> fixing critical bugs, improving performance, etc). And that the notional >> VFS KPI is extremely promiscuous, being made up of not just the obvious VFS >> parts, but also VM parts, etc. > For what its worth, we used to have an extensible VOP_* interface that > didn't have this sort of problem. It was removed in r140165 (back in > 2005) and we gained a whole bunch of extra functionality afterwards > including type checking. > Yes. Kib and I chatted offline, it seems that the SOP is really "there is no guarantee about KPI when talking about VFS" so the headache that it would be to write the shim layer and maintain it (particularly considering the 9.x release cycle slowness) was not worth it. In a few days I'm going to blow up the extra entries in VFSOPS and VOPS by some 10 entries to hopefully keep us KPI friendly for the next release. I may also introduce a VFS_KPI version number. Let me know if you have any thoughts on that, my thoughts are basically to make it like FreeBSD_version, and eventually someone can add macros for VFS klds to refuse to load depending on VFS_KPI. -Alfred From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 06:40:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A244ADA1; Sat, 29 Dec 2012 06:40:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx1.freebsd.org (Postfix) with ESMTP id 72B628FC14; Sat, 29 Dec 2012 06:40:16 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id dt10so4957560wgb.15 for ; Fri, 28 Dec 2012 22:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=kZk/x1aY5zUbRqApY5SjG26vmxQPRYVLGTYf3RuR5Zg=; b=TNA7uqvmPM3v3s+qVNmq/QeL4FIFu8N+gepf0atRchWClGBnrZT35023yfId9d7VC0 CcMj0uH4aSeHBKNpwN1k+J2WmgHVQKpO/ZcY5bjV/vvN6ZdErdVJe1pZfcIhSaunS76B XaOl6D3BHn83v46GH8UCuLqVIOv8kKx8uEHFpnnniyqaB5J5kfN7+KB7Qrh9jI0G+CcZ p5LxDna/ucTw+ZfAqCA5h42lnMprRFzJw/+l+H0UH2GvZ2xg9kcfLi6pwSSaLQIveqof ELSxD9wZ0vkmH5cZ1y8OmPEJg+5Xpq9uJ/OQO2sdYBsk9VrwTijzPYgLZfymNwN/ysPn afBA== MIME-Version: 1.0 Received: by 10.180.88.40 with SMTP id bd8mr47040166wib.33.1356763210341; Fri, 28 Dec 2012 22:40:10 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Fri, 28 Dec 2012 22:40:10 -0800 (PST) In-Reply-To: References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> Date: Fri, 28 Dec 2012 22:40:10 -0800 X-Google-Sender-Auth: 0YgNeKrEXfnDH1Ss_HenueyU3x4 Message-ID: Subject: Re: svn commit: r244663 - stable/9 From: Adrian Chadd To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-9@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 06:40:18 -0000 On 25 December 2012 11:17, Robert Watson wrote: > While I would love to have a stable KBI, or even KPI, for VFS, past > experience suggests that we are not prepared to document one, let alone > enforce it, and that we frequently experience changes that disrupt both the > binary and programming interfaces -- often for very good reasons (e.g., > fixing critical bugs, improving performance, etc). And that the notional > VFS KPI is extremely promiscuous, being made up of not just the obvious VFS > parts, but also VM parts, etc. We've done a bit better with device drivers, > where the consensus is that we should Try Fairly Hard, but even there we > have only limited documentation of what even constitutes the KPI and KBI. > In the end, not all kernel interfaces can be "KPIs" or "KBIs" -- otherwise, > we could change almost nothing in -STABLE, causing branches to stagnate > rapidly. If you look at Apple's model (for example), they designate certain > interfaces as "API" or "KPI" rather than using the terms more casually to > refer to any interface in userspace or kernel, and we need to take the same > perspective. A few years ago, I took a gander through a number of core > network stack data structures used by device drivers, while trying to help > resolve how TOE would fit into the network device driver picture, and you > can see the results here: There's likely a bunch of companies/users that would love things to not change during a stable branch and there's likely a bunch of companies/users that would hate things being immutable during a stable branch. There's never been a formal "kernel ABI stuff in stable shouldn't break" or not, but as far as I was aware, the unofficial method was "discuss on -stable or -arch to see whether it's worth the break, then break it if needed, or not-break it and add a dirty hack for that branch" if not. This is why things like vimage/vnet were so dirty in the backports, if you remember. Julian and others made a specific attempt _not_ to break KBI when backporting the feature. So, regardless of whether we should or shouldn't break things, a more thorough discussion would've been nice. Adrian From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 10:44:59 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 938E3C02; Sat, 29 Dec 2012 10:44:59 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5D92E8FC08; Sat, 29 Dec 2012 10:44:59 +0000 (UTC) Received: from [192.168.2.119] (host86-129-88-139.range86-129.btcentralplus.com [86.129.88.139]) by cyrus.watson.org (Postfix) with ESMTPSA id 42E5946B09; Sat, 29 Dec 2012 05:44:51 -0500 (EST) Subject: Re: svn commit: r244663 - stable/9 Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-1 From: "Robert N. M. Watson" In-Reply-To: Date: Sat, 29 Dec 2012 10:44:43 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <00E4FFFA-8ADB-4D43-B977-3834C48133E4@freebsd.org> References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> To: Adrian Chadd X-Mailer: Apple Mail (2.1283) Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-9@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 10:44:59 -0000 On 29 Dec 2012, at 06:40, Adrian Chadd wrote: > There's likely a bunch of companies/users that would love things to > not change during a stable branch and there's likely a bunch of > companies/users that would hate things being immutable during a stable > branch. >=20 > There's never been a formal "kernel ABI stuff in stable shouldn't > break" or not, but as far as I was aware, the unofficial method was > "discuss on -stable or -arch to see whether it's worth the break, then > break it if needed, or not-break it and add a dirty hack for that > branch" if not. >=20 > This is why things like vimage/vnet were so dirty in the backports, if > you remember. Julian and others made a specific attempt _not_ to break > KBI when backporting the feature. >=20 > So, regardless of whether we should or shouldn't break things, a more > thorough discussion would've been nice. Adrian: The standing consensus is that we try not to break certain classes of = device drivers, not that we don't ever change any kernel interfaces. The = reason is that we don't have a formal definition of "public" and do not = wish to use the definition "all definitions in all header files" or "all = symbols ever linked by any module" -- that definition would prevent = almost any change to the kernel in -STABLE branches at all. The reason = VIMAGE/MRT/etc had to be done with great caution is that they directly = affected network device drivers, which are a category of module which we = have decided we do want to try to support in external binary form. The = other major category is binary storage drivers. When we talked to various VFS maintainers, looked at the past change = history there, and looked at the set of third-party file systems = (especially, those we could see in ports), the consensus there was that = it was too difficult to define a stable VFS KPI and KBI for third-party = modules. In particular, there appear to be at most one or two in ports = at any given moment, and quick analyses of them suggested that their = kernel feature dependency footprint was far more than just "vnode = operations". KPIs and KBIs have benefits and downsides: we need to consider them as a = tradeoff space, and not an absolute, and use them where they have = significant payoff. Especially as we don't have formal tools for = reasoning about or testing them. Robert= From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 10:50:04 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABB30D84; Sat, 29 Dec 2012 10:50:04 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 748AD8FC08; Sat, 29 Dec 2012 10:50:04 +0000 (UTC) Received: from [192.168.2.119] (host86-129-88-139.range86-129.btcentralplus.com [86.129.88.139]) by cyrus.watson.org (Postfix) with ESMTPSA id 92B7446B1A; Sat, 29 Dec 2012 05:50:02 -0500 (EST) Subject: Re: svn commit: r244663 - stable/9 Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-1 From: "Robert N. M. Watson" In-Reply-To: <50DE74F1.70105@mu.org> Date: Sat, 29 Dec 2012 10:49:59 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> <50DE74F1.70105@mu.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1283) Cc: Adrian Chadd , src-committers@freebsd.org, Peter Wemm , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 10:50:04 -0000 On 29 Dec 2012, at 04:43, Alfred Perlstein wrote: > Yes. Kib and I chatted offline, it seems that the SOP is really = "there is no guarantee about KPI when talking about VFS" so the headache = that it would be to write the shim layer and maintain it (particularly = considering the 9.x release cycle slowness) was not worth it. >=20 > In a few days I'm going to blow up the extra entries in VFSOPS and = VOPS by some 10 entries to hopefully keep us KPI friendly for the next = release. I may also introduce a VFS_KPI version number. Let me know if = you have any thoughts on that, my thoughts are basically to make it like = FreeBSD_version, and eventually someone can add macros for VFS klds to = refuse to load depending on VFS_KPI. I don't think stub entries hurt. But I think a VFS_KPI version number is premature. Go about this forwards, not backwards: First, select an existing base system VFS module that you think is a = reasonable model for feature dependency footprint -- i.e., one that = doesn't reach into too many ugly things, and "behaves well". Maybe = ext2fs is a reasonable one to use. Then do a binary feature footprint = analysis: run "nm" on the module and see what it actually depends on, = and enumerate those on a wiki page. That becomes the foundation for the KBI. KPI is more tricky, since it = will likely include lots of headers it doesn't need, etc, but you can = start to work back to the KPI from the KBI. Pay particular attention to = key data structures -- in the network stack, this wasn't just = network-related structures like ifnet and mbuf, but also all = newbus-related structures, lock data structures, etc. FWIW, on the device driver side I think we did the casual analysis based = on if_em, which we felt would be "typical". Finally, go to the extant external modules for VFS -- probably limited = to FUSE (which will not matter soon as FUSE will be in the base soon), = and OpenAFS ... perhaps one or two others. Do a similar analysis there = and decide if there are enough external modules that play by the = proposed KPI and KBI to justify enforcing the rules. Along the way, do keep asking yourself "is this worth it" -- if, with = the FUSE import, we're down to one extant open source third-party file = system, then it probably isn't, to be honest. The tradeoff just falls = down on the other side. On the other hand, if there are a half-dozen of = them, and there are lots of companies that have internal modules that = would observe the KPI /KBI, then it may be worth it. Robert= From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 12:10:42 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F29B0B8F; Sat, 29 Dec 2012 12:10:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D7A7B8FC0C; Sat, 29 Dec 2012 12:10:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBTCAfwr019824; Sat, 29 Dec 2012 12:10:41 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBTCAfFU019822; Sat, 29 Dec 2012 12:10:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201212291210.qBTCAfFU019822@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 29 Dec 2012 12:10: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: r244813 - stable/9/sys/dev/usb/serial 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 12:10:42 -0000 Author: hselasky Date: Sat Dec 29 12:10:41 2012 New Revision: 244813 URL: http://svnweb.freebsd.org/changeset/base/244813 Log: MFC r244489: Make sure we block recursion on TTY's inwakeup callback Suggested by: davide Modified: stable/9/sys/dev/usb/serial/usb_serial.c stable/9/sys/dev/usb/serial/usb_serial.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.c Sat Dec 29 08:26:20 2012 (r244812) +++ stable/9/sys/dev/usb/serial/usb_serial.c Sat Dec 29 12:10:41 2012 (r244813) @@ -797,10 +797,14 @@ ucom_inwakeup(struct tty *tp) DPRINTF("tp=%p\n", tp); if (ttydisc_can_bypass(tp) != 0 || - (sc->sc_flag & UCOM_FLAG_HL_READY) == 0) { + (sc->sc_flag & UCOM_FLAG_HL_READY) == 0 || + (sc->sc_flag & UCOM_FLAG_INWAKEUP) != 0) { return; } + /* prevent recursion */ + sc->sc_flag |= UCOM_FLAG_INWAKEUP; + pos = sc->sc_jitterbuf_out; while (sc->sc_jitterbuf_in != pos) { @@ -821,6 +825,8 @@ ucom_inwakeup(struct tty *tp) if ((sc->sc_jitterbuf_in == pos) && (sc->sc_flag & UCOM_FLAG_RTS_IFLOW)) ucom_rts(sc, 0); + + sc->sc_flag &= ~UCOM_FLAG_INWAKEUP; } static int Modified: stable/9/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.h Sat Dec 29 08:26:20 2012 (r244812) +++ stable/9/sys/dev/usb/serial/usb_serial.h Sat Dec 29 12:10:41 2012 (r244813) @@ -183,6 +183,7 @@ struct ucom_softc { #define UCOM_FLAG_CONSOLE 0x80 /* set if device is a console */ #define UCOM_FLAG_WAIT_REFS 0x0100 /* set if we must wait for refs */ #define UCOM_FLAG_FREE_UNIT 0x0200 /* set if we must free the unit */ +#define UCOM_FLAG_INWAKEUP 0x0400 /* set if we are in the tsw_inwakeup callback */ uint8_t sc_lsr; uint8_t sc_msr; uint8_t sc_mcr; From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 12:13:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4F79D06; Sat, 29 Dec 2012 12:13:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8FEB28FC0C; Sat, 29 Dec 2012 12:13:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBTCDdi8020392; Sat, 29 Dec 2012 12:13:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBTCDd0v020391; Sat, 29 Dec 2012 12:13:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201212291213.qBTCDd0v020391@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 29 Dec 2012 12:13:39 +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: r244814 - stable/9/sys/dev/usb/storage 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 12:13:39 -0000 Author: hselasky Date: Sat Dec 29 12:13:38 2012 New Revision: 244814 URL: http://svnweb.freebsd.org/changeset/base/244814 Log: MFC r244491: Add support for throttling UMASS. Mostly useful for debugging purposes. Modified: stable/9/sys/dev/usb/storage/umass.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/storage/umass.c ============================================================================== --- stable/9/sys/dev/usb/storage/umass.c Sat Dec 29 12:10:41 2012 (r244813) +++ stable/9/sys/dev/usb/storage/umass.c Sat Dec 29 12:13:38 2012 (r244814) @@ -163,12 +163,16 @@ __FBSDID("$FreeBSD$"); #define UDMASS_CBI 0x00400000 /* CBI transfers */ #define UDMASS_WIRE (UDMASS_BBB|UDMASS_CBI) #define UDMASS_ALL 0xffff0000 /* all of the above */ -static int umass_debug = 0; +static int umass_debug; +static int umass_throttle; SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass"); SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &umass_debug, 0, "umass debug level"); TUNABLE_INT("hw.usb.umass.debug", &umass_debug); +SYSCTL_INT(_hw_usb_umass, OID_AUTO, throttle, CTLFLAG_RW | CTLFLAG_TUN, + &umass_throttle, 0, "Forced delay between commands in milliseconds"); +TUNABLE_INT("hw.usb.umass.throttle", &umass_throttle); #else #define DIF(...) do { } while (0) #define DPRINTF(...) do { } while (0) @@ -881,7 +885,7 @@ umass_attach(device_t dev) struct usb_attach_arg *uaa = device_get_ivars(dev); struct umass_probe_proto temp = umass_probe_proto(dev, uaa); struct usb_interface_descriptor *id; - int32_t err; + int err; /* * NOTE: the softc struct is cleared in device_set_driver. @@ -994,6 +998,24 @@ umass_attach(device_t dev) "transfers, %s\n", usbd_errstr(err)); goto detach; } +#ifdef USB_DEBUG + if (umass_throttle > 0) { + uint8_t x; + int iv; + + iv = umass_throttle; + + if (iv < 1) + iv = 1; + else if (iv > 8000) + iv = 8000; + + for (x = 0; x != UMASS_T_MAX; x++) { + if (sc->sc_xfer[x] != NULL) + usbd_xfer_set_interval(sc->sc_xfer[x], iv); + } + } +#endif sc->sc_transform = (sc->sc_proto & UMASS_PROTO_SCSI) ? &umass_scsi_transform : (sc->sc_proto & UMASS_PROTO_UFI) ? &umass_ufi_transform : From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 12:16:59 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AA66F8F; Sat, 29 Dec 2012 12:16:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3D86E8FC0A; Sat, 29 Dec 2012 12:16:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBTCGxgi020878; Sat, 29 Dec 2012 12:16:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBTCGxdt020877; Sat, 29 Dec 2012 12:16:59 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201212291216.qBTCGxdt020877@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 29 Dec 2012 12:16:59 +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: r244815 - stable/9/sys/dev/sound/usb 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 12:16:59 -0000 Author: hselasky Date: Sat Dec 29 12:16:58 2012 New Revision: 244815 URL: http://svnweb.freebsd.org/changeset/base/244815 Log: MFC r244567: Reduce stack usage in the USB audio driver by moving some large stack elements to the USB audio softc structure. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Sat Dec 29 12:13:38 2012 (r244814) +++ stable/9/sys/dev/sound/usb/uaudio.c Sat Dec 29 12:16:58 2012 (r244815) @@ -122,6 +122,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def #define MAKE_WORD(h,l) (((h) << 8) | (l)) #define BIT_TEST(bm,bno) (((bm)[(bno) / 8] >> (7 - ((bno) % 8))) & 1) #define UAUDIO_MAX_CHAN(x) (x) +#define MIX(sc) ((sc)->sc_mixer_node) union uaudio_asid { const struct usb_audio_streaming_interface_descriptor *v1; @@ -283,6 +284,7 @@ struct uaudio_softc { struct uaudio_chan sc_play_chan; struct umidi_chan sc_midi_chan; struct uaudio_search_result sc_mixer_clocks; + struct uaudio_mixer_node sc_mixer_node; struct mtx *sc_mixer_lock; struct usb_device *sc_udev; @@ -2325,149 +2327,148 @@ uaudio_mixer_register_sysctl(struct uaud static void uaudio_mixer_controls_create_ftu(struct uaudio_softc *sc) { - struct uaudio_mixer_node mix; int chx; int chy; - memset(&mix, 0, sizeof(mix)); - mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); - mix.wValue[0] = MAKE_WORD(8, 0); - mix.class = UAC_OUTPUT; - mix.type = MIX_UNSIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "effect"; - mix.minval = 0; - mix.maxval = 7; - mix.mul = 7; - mix.nchan = 1; - mix.update[0] = 1; - strlcpy(mix.desc, "Room1,2,3,Hall1,2,Plate,Delay,Echo", sizeof(mix.desc)); - uaudio_mixer_add_ctl_sub(sc, &mix); + memset(&MIX(sc), 0, sizeof(MIX(sc))); + MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); + MIX(sc).wValue[0] = MAKE_WORD(8, 0); + MIX(sc).class = UAC_OUTPUT; + MIX(sc).type = MIX_UNSIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "effect"; + MIX(sc).minval = 0; + MIX(sc).maxval = 7; + MIX(sc).mul = 7; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + strlcpy(MIX(sc).desc, "Room1,2,3,Hall1,2,Plate,Delay,Echo", sizeof(MIX(sc).desc)); + uaudio_mixer_add_ctl_sub(sc, &MIX(sc)); - memset(&mix, 0, sizeof(mix)); - mix.wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no); + memset(&MIX(sc), 0, sizeof(MIX(sc))); + MIX(sc).wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no); for (chx = 0; chx != 8; chx++) { for (chy = 0; chy != 8; chy++) { - mix.wValue[0] = MAKE_WORD(chx + 1, chy + 1); - mix.type = MIX_SIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "mix_rec"; - mix.nchan = 1; - mix.update[0] = 1; - mix.val_default = 0; - snprintf(mix.desc, sizeof(mix.desc), + MIX(sc).wValue[0] = MAKE_WORD(chx + 1, chy + 1); + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "mix_rec"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + MIX(sc).val_default = 0; + snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), "AIn%d - Out%d Record Volume", chy + 1, chx + 1); - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); - mix.wValue[0] = MAKE_WORD(chx + 1, chy + 1 + 8); - mix.type = MIX_SIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "mix_play"; - mix.nchan = 1; - mix.update[0] = 1; - mix.val_default = (chx == chy) ? 2 : 0; - snprintf(mix.desc, sizeof(mix.desc), + MIX(sc).wValue[0] = MAKE_WORD(chx + 1, chy + 1 + 8); + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "mix_play"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + MIX(sc).val_default = (chx == chy) ? 2 : 0; + snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), "DIn%d - Out%d Playback Volume", chy + 1, chx + 1); - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); } } - memset(&mix, 0, sizeof(mix)); - mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); - mix.wValue[0] = MAKE_WORD(2, 0); - mix.class = UAC_OUTPUT; - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "effect_vol"; - mix.nchan = 1; - mix.update[0] = 1; - mix.minval = 0; - mix.maxval = 0x7f; - mix.mul = 0x7f; - mix.nchan = 1; - mix.update[0] = 1; - strlcpy(mix.desc, "Effect Volume", sizeof(mix.desc)); - uaudio_mixer_add_ctl_sub(sc, &mix); - - memset(&mix, 0, sizeof(mix)); - mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); - mix.wValue[0] = MAKE_WORD(3, 0); - mix.class = UAC_OUTPUT; - mix.type = MIX_SIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "effect_dur"; - mix.nchan = 1; - mix.update[0] = 1; - mix.minval = 0; - mix.maxval = 0x7f00; - mix.mul = 0x7f00; - mix.nchan = 1; - mix.update[0] = 1; - strlcpy(mix.desc, "Effect Duration", sizeof(mix.desc)); - uaudio_mixer_add_ctl_sub(sc, &mix); - - memset(&mix, 0, sizeof(mix)); - mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); - mix.wValue[0] = MAKE_WORD(4, 0); - mix.class = UAC_OUTPUT; - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "effect_fb"; - mix.nchan = 1; - mix.update[0] = 1; - mix.minval = 0; - mix.maxval = 0x7f; - mix.mul = 0x7f; - mix.nchan = 1; - mix.update[0] = 1; - strlcpy(mix.desc, "Effect Feedback Volume", sizeof(mix.desc)); - uaudio_mixer_add_ctl_sub(sc, &mix); + memset(&MIX(sc), 0, sizeof(MIX(sc))); + MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); + MIX(sc).wValue[0] = MAKE_WORD(2, 0); + MIX(sc).class = UAC_OUTPUT; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "effect_vol"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + MIX(sc).minval = 0; + MIX(sc).maxval = 0x7f; + MIX(sc).mul = 0x7f; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + strlcpy(MIX(sc).desc, "Effect Volume", sizeof(MIX(sc).desc)); + uaudio_mixer_add_ctl_sub(sc, &MIX(sc)); + + memset(&MIX(sc), 0, sizeof(MIX(sc))); + MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); + MIX(sc).wValue[0] = MAKE_WORD(3, 0); + MIX(sc).class = UAC_OUTPUT; + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "effect_dur"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + MIX(sc).minval = 0; + MIX(sc).maxval = 0x7f00; + MIX(sc).mul = 0x7f00; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + strlcpy(MIX(sc).desc, "Effect Duration", sizeof(MIX(sc).desc)); + uaudio_mixer_add_ctl_sub(sc, &MIX(sc)); + + memset(&MIX(sc), 0, sizeof(MIX(sc))); + MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); + MIX(sc).wValue[0] = MAKE_WORD(4, 0); + MIX(sc).class = UAC_OUTPUT; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "effect_fb"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + MIX(sc).minval = 0; + MIX(sc).maxval = 0x7f; + MIX(sc).mul = 0x7f; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + strlcpy(MIX(sc).desc, "Effect Feedback Volume", sizeof(MIX(sc).desc)); + uaudio_mixer_add_ctl_sub(sc, &MIX(sc)); - memset(&mix, 0, sizeof(mix)); - mix.wIndex = MAKE_WORD(7, sc->sc_mixer_iface_no); + memset(&MIX(sc), 0, sizeof(MIX(sc))); + MIX(sc).wIndex = MAKE_WORD(7, sc->sc_mixer_iface_no); for (chy = 0; chy != 4; chy++) { - mix.wValue[0] = MAKE_WORD(7, chy + 1); - mix.type = MIX_SIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "effect_ret"; - mix.nchan = 1; - mix.update[0] = 1; - snprintf(mix.desc, sizeof(mix.desc), + MIX(sc).wValue[0] = MAKE_WORD(7, chy + 1); + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "effect_ret"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), "Effect Return %d Volume", chy + 1); - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); } - memset(&mix, 0, sizeof(mix)); - mix.wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no); + memset(&MIX(sc), 0, sizeof(MIX(sc))); + MIX(sc).wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no); for (chy = 0; chy != 8; chy++) { - mix.wValue[0] = MAKE_WORD(9, chy + 1); - mix.type = MIX_SIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "effect_send"; - mix.nchan = 1; - mix.update[0] = 1; - snprintf(mix.desc, sizeof(mix.desc), + MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1); + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "effect_send"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), "Effect Send AIn%d Volume", chy + 1); - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); - mix.wValue[0] = MAKE_WORD(9, chy + 1); - mix.type = MIX_SIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "effect_send"; - mix.nchan = 1; - mix.update[0] = 1; - snprintf(mix.desc, sizeof(mix.desc), + MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1); + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "effect_send"; + MIX(sc).nchan = 1; + MIX(sc).update[0] = 1; + snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), "Effect Send DIn%d Volume", chy + 1 + 8); - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); } } @@ -2593,8 +2594,6 @@ static void uaudio_mixer_add_mixer(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { - struct uaudio_mixer_node mix; - const struct usb_audio_mixer_unit_0 *d0 = iot[id].u.mu_v1; const struct usb_audio_mixer_unit_1 *d1; @@ -2628,11 +2627,11 @@ uaudio_mixer_add_mixer(struct uaudio_sof DPRINTFN(3, "ichs=%d ochs=%d\n", ichs, ochs); - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); - mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); - uaudio_mixer_determine_class(&iot[id], &mix); - mix.type = MIX_SIGNED_16; + MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); + uaudio_mixer_determine_class(&iot[id], &MIX(sc)); + MIX(sc).type = MIX_SIGNED_16; if (uaudio_mixer_verify_desc(d0, ((ichs * ochs) + 7) / 8) == NULL) return; @@ -2660,11 +2659,11 @@ uaudio_mixer_add_mixer(struct uaudio_sof for (o = 0; o < ochs; o++) { bno = ((p + c) * ochs) + o; if (BIT_TEST(d1->bmControls, bno)) - mix.wValue[mc++] = MAKE_WORD(p + c + 1, o + 1); + MIX(sc).wValue[mc++] = MAKE_WORD(p + c + 1, o + 1); } } - mix.nchan = chs; - uaudio_mixer_add_ctl(sc, &mix); + MIX(sc).nchan = chs; + uaudio_mixer_add_ctl(sc, &MIX(sc)); } p += chs; } @@ -2674,8 +2673,6 @@ static void uaudio20_mixer_add_mixer(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { - struct uaudio_mixer_node mix; - const struct usb_audio20_mixer_unit_0 *d0 = iot[id].u.mu_v2; const struct usb_audio20_mixer_unit_1 *d1; @@ -2709,11 +2706,11 @@ uaudio20_mixer_add_mixer(struct uaudio_s DPRINTFN(3, "ichs=%d ochs=%d\n", ichs, ochs); - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); - mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); - uaudio20_mixer_determine_class(&iot[id], &mix); - mix.type = MIX_SIGNED_16; + MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); + uaudio20_mixer_determine_class(&iot[id], &MIX(sc)); + MIX(sc).type = MIX_SIGNED_16; if (uaudio20_mixer_verify_desc(d0, ((ichs * ochs) + 7) / 8) == NULL) return; @@ -2741,11 +2738,11 @@ uaudio20_mixer_add_mixer(struct uaudio_s for (o = 0; o < ochs; o++) { bno = ((p + c) * ochs) + o; if (BIT_TEST(d1->bmControls, bno)) - mix.wValue[mc++] = MAKE_WORD(p + c + 1, o + 1); + MIX(sc).wValue[mc++] = MAKE_WORD(p + c + 1, o + 1); } } - mix.nchan = chs; - uaudio_mixer_add_ctl(sc, &mix); + MIX(sc).nchan = chs; + uaudio_mixer_add_ctl(sc, &MIX(sc)); } p += chs; } @@ -2756,7 +2753,6 @@ uaudio_mixer_add_selector(struct uaudio_ const struct uaudio_terminal_node *iot, int id) { const struct usb_audio_selector_unit *d = iot[id].u.su_v1; - struct uaudio_mixer_node mix; uint16_t i; DPRINTFN(3, "bUnitId=%d bNrInPins=%d\n", @@ -2765,41 +2761,41 @@ uaudio_mixer_add_selector(struct uaudio_ if (d->bNrInPins == 0) return; - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); - mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); - mix.wValue[0] = MAKE_WORD(0, 0); - uaudio_mixer_determine_class(&iot[id], &mix); - mix.nchan = 1; - mix.type = MIX_SELECTOR; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.minval = 1; - mix.maxval = d->bNrInPins; - mix.name = "selector"; + MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); + MIX(sc).wValue[0] = MAKE_WORD(0, 0); + uaudio_mixer_determine_class(&iot[id], &MIX(sc)); + MIX(sc).nchan = 1; + MIX(sc).type = MIX_SELECTOR; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).minval = 1; + MIX(sc).maxval = d->bNrInPins; + MIX(sc).name = "selector"; i = d->baSourceId[d->bNrInPins]; if (i == 0 || usbd_req_get_string_any(sc->sc_udev, NULL, - mix.desc, sizeof(mix.desc), i) != 0) { - mix.desc[0] = 0; + MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) { + MIX(sc).desc[0] = 0; } - if (mix.maxval > MAX_SELECTOR_INPUT_PIN) { - mix.maxval = MAX_SELECTOR_INPUT_PIN; + if (MIX(sc).maxval > MAX_SELECTOR_INPUT_PIN) { + MIX(sc).maxval = MAX_SELECTOR_INPUT_PIN; } - mix.mul = (mix.maxval - mix.minval); + MIX(sc).mul = (MIX(sc).maxval - MIX(sc).minval); for (i = 0; i < MAX_SELECTOR_INPUT_PIN; i++) { - mix.slctrtype[i] = SOUND_MIXER_NRDEVICES; + MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES; } - for (i = 0; i < mix.maxval; i++) { - mix.slctrtype[i] = uaudio_mixer_feature_name( - &iot[d->baSourceId[i]], &mix); + for (i = 0; i < MIX(sc).maxval; i++) { + MIX(sc).slctrtype[i] = uaudio_mixer_feature_name( + &iot[d->baSourceId[i]], &MIX(sc)); } - mix.class = 0; /* not used */ + MIX(sc).class = 0; /* not used */ - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); } static void @@ -2807,7 +2803,6 @@ uaudio20_mixer_add_selector(struct uaudi const struct uaudio_terminal_node *iot, int id) { const struct usb_audio20_selector_unit *d = iot[id].u.su_v2; - struct uaudio_mixer_node mix; uint16_t i; DPRINTFN(3, "bUnitId=%d bNrInPins=%d\n", @@ -2816,40 +2811,40 @@ uaudio20_mixer_add_selector(struct uaudi if (d->bNrInPins == 0) return; - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); - mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); - mix.wValue[0] = MAKE_WORD(0, 0); - uaudio20_mixer_determine_class(&iot[id], &mix); - mix.nchan = 1; - mix.type = MIX_SELECTOR; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.minval = 1; - mix.maxval = d->bNrInPins; - mix.name = "selector"; + MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); + MIX(sc).wValue[0] = MAKE_WORD(0, 0); + uaudio20_mixer_determine_class(&iot[id], &MIX(sc)); + MIX(sc).nchan = 1; + MIX(sc).type = MIX_SELECTOR; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).minval = 1; + MIX(sc).maxval = d->bNrInPins; + MIX(sc).name = "selector"; i = d->baSourceId[d->bNrInPins]; if (i == 0 || usbd_req_get_string_any(sc->sc_udev, NULL, - mix.desc, sizeof(mix.desc), i) != 0) { - mix.desc[0] = 0; + MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) { + MIX(sc).desc[0] = 0; } - if (mix.maxval > MAX_SELECTOR_INPUT_PIN) - mix.maxval = MAX_SELECTOR_INPUT_PIN; + if (MIX(sc).maxval > MAX_SELECTOR_INPUT_PIN) + MIX(sc).maxval = MAX_SELECTOR_INPUT_PIN; - mix.mul = (mix.maxval - mix.minval); + MIX(sc).mul = (MIX(sc).maxval - MIX(sc).minval); for (i = 0; i < MAX_SELECTOR_INPUT_PIN; i++) - mix.slctrtype[i] = SOUND_MIXER_NRDEVICES; + MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES; - for (i = 0; i < mix.maxval; i++) { - mix.slctrtype[i] = uaudio20_mixer_feature_name( - &iot[d->baSourceId[i]], &mix); + for (i = 0; i < MIX(sc).maxval; i++) { + MIX(sc).slctrtype[i] = uaudio20_mixer_feature_name( + &iot[d->baSourceId[i]], &MIX(sc)); } - mix.class = 0; /* not used */ + MIX(sc).class = 0; /* not used */ - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); } static uint32_t @@ -2879,7 +2874,6 @@ uaudio_mixer_add_feature(struct uaudio_s const struct uaudio_terminal_node *iot, int id) { const struct usb_audio_feature_unit *d = iot[id].u.fu_v1; - struct uaudio_mixer_node mix; uint32_t fumask; uint32_t mmask; uint32_t cmask; @@ -2892,7 +2886,7 @@ uaudio_mixer_add_feature(struct uaudio_s if (d->bControlSize == 0) return; - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); nchan = (d->bLength - 7) / d->bControlSize; mmask = uaudio_mixer_feature_get_bmaControls(d, 0); @@ -2913,13 +2907,13 @@ uaudio_mixer_add_feature(struct uaudio_s if (nchan > MIX_MAX_CHAN) { nchan = MIX_MAX_CHAN; } - mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); + MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); i = d->bmaControls[d->bControlSize]; if (i == 0 || usbd_req_get_string_any(sc->sc_udev, NULL, - mix.desc, sizeof(mix.desc), i) != 0) { - mix.desc[0] = 0; + MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) { + MIX(sc).desc[0] = 0; } for (ctl = 1; ctl <= LOUDNESS_CONTROL; ctl++) { @@ -2930,87 +2924,87 @@ uaudio_mixer_add_feature(struct uaudio_s ctl, fumask); if (mmask & fumask) { - mix.nchan = 1; - mix.wValue[0] = MAKE_WORD(ctl, 0); + MIX(sc).nchan = 1; + MIX(sc).wValue[0] = MAKE_WORD(ctl, 0); } else if (cmask & fumask) { - mix.nchan = nchan - 1; + MIX(sc).nchan = nchan - 1; for (i = 1; i < nchan; i++) { if (uaudio_mixer_feature_get_bmaControls(d, i) & fumask) - mix.wValue[i - 1] = MAKE_WORD(ctl, i); + MIX(sc).wValue[i - 1] = MAKE_WORD(ctl, i); else - mix.wValue[i - 1] = -1; + MIX(sc).wValue[i - 1] = -1; } } else { continue; } - mixernumber = uaudio_mixer_feature_name(&iot[id], &mix); + mixernumber = uaudio_mixer_feature_name(&iot[id], &MIX(sc)); switch (ctl) { case MUTE_CONTROL: - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "mute"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "mute"; break; case VOLUME_CONTROL: - mix.type = MIX_SIGNED_16; - mix.ctl = mixernumber; - mix.name = "vol"; + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = mixernumber; + MIX(sc).name = "vol"; break; case BASS_CONTROL: - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_BASS; - mix.name = "bass"; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_BASS; + MIX(sc).name = "bass"; break; case MID_CONTROL: - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "mid"; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "mid"; break; case TREBLE_CONTROL: - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_TREBLE; - mix.name = "treble"; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_TREBLE; + MIX(sc).name = "treble"; break; case GRAPHIC_EQUALIZER_CONTROL: continue; /* XXX don't add anything */ case AGC_CONTROL: - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "agc"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "agc"; break; case DELAY_CONTROL: - mix.type = MIX_UNSIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "delay"; + MIX(sc).type = MIX_UNSIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "delay"; break; case BASS_BOOST_CONTROL: - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "boost"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "boost"; break; case LOUDNESS_CONTROL: - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_LOUD; /* Is this correct ? */ - mix.name = "loudness"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_LOUD; /* Is this correct ? */ + MIX(sc).name = "loudness"; break; default: - mix.type = MIX_UNKNOWN; + MIX(sc).type = MIX_UNKNOWN; break; } - if (mix.type != MIX_UNKNOWN) - uaudio_mixer_add_ctl(sc, &mix); + if (MIX(sc).type != MIX_UNKNOWN) + uaudio_mixer_add_ctl(sc, &MIX(sc)); } } @@ -3019,7 +3013,6 @@ uaudio20_mixer_add_feature(struct uaudio const struct uaudio_terminal_node *iot, int id) { const struct usb_audio20_feature_unit *d = iot[id].u.fu_v2; - struct uaudio_mixer_node mix; uint32_t ctl; uint32_t mmask; uint32_t cmask; @@ -3032,7 +3025,7 @@ uaudio20_mixer_add_feature(struct uaudio if (UGETDW(d->bmaControls[0]) == 0) return; - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); nchan = (d->bLength - 6) / 4; mmask = UGETDW(d->bmaControls[0]); @@ -3049,84 +3042,84 @@ uaudio20_mixer_add_feature(struct uaudio if (nchan > MIX_MAX_CHAN) nchan = MIX_MAX_CHAN; - mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); + MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); i = d->bmaControls[nchan][0]; if (i == 0 || usbd_req_get_string_any(sc->sc_udev, NULL, - mix.desc, sizeof(mix.desc), i) != 0) { - mix.desc[0] = 0; + MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) { + MIX(sc).desc[0] = 0; } for (ctl = 3; ctl != 0; ctl <<= 2) { - mixernumber = uaudio20_mixer_feature_name(&iot[id], &mix); + mixernumber = uaudio20_mixer_feature_name(&iot[id], &MIX(sc)); switch (ctl) { case (3 << 0): - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_NRDEVICES; - mix.name = "mute"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).name = "mute"; what = MUTE_CONTROL; break; case (3 << 2): - mix.type = MIX_SIGNED_16; - mix.ctl = mixernumber; - mix.name = "vol"; + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = mixernumber; + MIX(sc).name = "vol"; what = VOLUME_CONTROL; break; case (3 << 4): - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_BASS; - mix.name = "bass"; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_BASS; + MIX(sc).name = "bass"; what = BASS_CONTROL; break; case (3 << 6): - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "mid"; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "mid"; what = MID_CONTROL; break; case (3 << 8): - mix.type = MIX_SIGNED_8; - mix.ctl = SOUND_MIXER_TREBLE; - mix.name = "treble"; + MIX(sc).type = MIX_SIGNED_8; + MIX(sc).ctl = SOUND_MIXER_TREBLE; + MIX(sc).name = "treble"; what = TREBLE_CONTROL; break; case (3 << 12): - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "agc"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "agc"; what = AGC_CONTROL; break; case (3 << 14): - mix.type = MIX_UNSIGNED_16; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "delay"; + MIX(sc).type = MIX_UNSIGNED_16; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "delay"; what = DELAY_CONTROL; break; case (3 << 16): - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ - mix.name = "boost"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ + MIX(sc).name = "boost"; what = BASS_BOOST_CONTROL; break; case (3 << 18): - mix.type = MIX_ON_OFF; - mix.ctl = SOUND_MIXER_LOUD; /* Is this correct ? */ - mix.name = "loudness"; + MIX(sc).type = MIX_ON_OFF; + MIX(sc).ctl = SOUND_MIXER_LOUD; /* Is this correct ? */ + MIX(sc).name = "loudness"; what = LOUDNESS_CONTROL; break; case (3 << 20): - mix.type = MIX_SIGNED_16; - mix.ctl = mixernumber; - mix.name = "igain"; + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = mixernumber; + MIX(sc).name = "igain"; what = INPUT_GAIN_CONTROL; break; case (3 << 22): - mix.type = MIX_SIGNED_16; - mix.ctl = mixernumber; - mix.name = "igainpad"; + MIX(sc).type = MIX_SIGNED_16; + MIX(sc).ctl = mixernumber; + MIX(sc).name = "igainpad"; what = INPUT_GAIN_PAD_CONTROL; break; default: @@ -3134,22 +3127,22 @@ uaudio20_mixer_add_feature(struct uaudio } if ((mmask & ctl) == ctl) { - mix.nchan = 1; - mix.wValue[0] = MAKE_WORD(what, 0); + MIX(sc).nchan = 1; + MIX(sc).wValue[0] = MAKE_WORD(what, 0); } else if ((cmask & ctl) == ctl) { - mix.nchan = nchan - 1; + MIX(sc).nchan = nchan - 1; for (i = 1; i < nchan; i++) { if ((UGETDW(d->bmaControls[i]) & ctl) == ctl) - mix.wValue[i - 1] = MAKE_WORD(what, i); + MIX(sc).wValue[i - 1] = MAKE_WORD(what, i); else - mix.wValue[i - 1] = -1; + MIX(sc).wValue[i - 1] = -1; } } else { continue; } - if (mix.type != MIX_UNKNOWN) - uaudio_mixer_add_ctl(sc, &mix); + if (MIX(sc).type != MIX_UNKNOWN) + uaudio_mixer_add_ctl(sc, &MIX(sc)); } } @@ -3159,10 +3152,9 @@ uaudio_mixer_add_processing_updown(struc { const struct usb_audio_processing_unit_0 *d0 = iot[id].u.pu_v1; const struct usb_audio_processing_unit_1 *d1 = - (const void *)(d0->baSourceId + d0->bNrInPins); + (const void *)(d0->baSourceId + d0->bNrInPins); const struct usb_audio_processing_unit_updown *ud = - (const void *)(d1->bmControls + d1->bControlSize); - struct uaudio_mixer_node mix; + (const void *)(d1->bmControls + d1->bControlSize); uint8_t i; if (uaudio_mixer_verify_desc(d0, sizeof(*ud)) == NULL) { @@ -3179,20 +3171,20 @@ uaudio_mixer_add_processing_updown(struc DPRINTF("no mode select\n"); return; } - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); - mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); - mix.nchan = 1; - mix.wValue[0] = MAKE_WORD(UD_MODE_SELECT_CONTROL, 0); - uaudio_mixer_determine_class(&iot[id], &mix); - mix.type = MIX_ON_OFF; /* XXX */ + MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); + MIX(sc).nchan = 1; + MIX(sc).wValue[0] = MAKE_WORD(UD_MODE_SELECT_CONTROL, 0); + uaudio_mixer_determine_class(&iot[id], &MIX(sc)); + MIX(sc).type = MIX_ON_OFF; /* XXX */ for (i = 0; i < ud->bNrModes; i++) { DPRINTFN(3, "i=%d bm=0x%x\n", i, UGETW(ud->waModes[i])); /* XXX */ } - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); } static void @@ -3201,11 +3193,10 @@ uaudio_mixer_add_processing(struct uaudi { const struct usb_audio_processing_unit_0 *d0 = iot[id].u.pu_v1; const struct usb_audio_processing_unit_1 *d1 = - (const void *)(d0->baSourceId + d0->bNrInPins); - struct uaudio_mixer_node mix; + (const void *)(d0->baSourceId + d0->bNrInPins); uint16_t ptype; - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); ptype = UGETW(d0->wProcessType); @@ -3216,12 +3207,12 @@ uaudio_mixer_add_processing(struct uaudi return; } if (d1->bmControls[0] & UA_PROC_ENABLE_MASK) { - mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); - mix.nchan = 1; - mix.wValue[0] = MAKE_WORD(XX_ENABLE_CONTROL, 0); - uaudio_mixer_determine_class(&iot[id], &mix); - mix.type = MIX_ON_OFF; - uaudio_mixer_add_ctl(sc, &mix); + MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); + MIX(sc).nchan = 1; + MIX(sc).wValue[0] = MAKE_WORD(XX_ENABLE_CONTROL, 0); + uaudio_mixer_determine_class(&iot[id], &MIX(sc)); + MIX(sc).type = MIX_ON_OFF; + uaudio_mixer_add_ctl(sc, &MIX(sc)); } switch (ptype) { case UPDOWNMIX_PROCESS: @@ -3246,8 +3237,7 @@ uaudio_mixer_add_extension(struct uaudio { const struct usb_audio_extension_unit_0 *d0 = iot[id].u.eu_v1; const struct usb_audio_extension_unit_1 *d1 = - (const void *)(d0->baSourceId + d0->bNrInPins); - struct uaudio_mixer_node mix; + (const void *)(d0->baSourceId + d0->bNrInPins); DPRINTFN(3, "bUnitId=%d bNrInPins=%d\n", d0->bUnitId, d0->bNrInPins); @@ -3260,15 +3250,15 @@ uaudio_mixer_add_extension(struct uaudio } if (d1->bmControls[0] & UA_EXT_ENABLE_MASK) { - memset(&mix, 0, sizeof(mix)); + memset(&MIX(sc), 0, sizeof(MIX(sc))); - mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); - mix.nchan = 1; - mix.wValue[0] = MAKE_WORD(UA_EXT_ENABLE, 0); - uaudio_mixer_determine_class(&iot[id], &mix); - mix.type = MIX_ON_OFF; + MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); + MIX(sc).nchan = 1; + MIX(sc).wValue[0] = MAKE_WORD(UA_EXT_ENABLE, 0); + uaudio_mixer_determine_class(&iot[id], &MIX(sc)); + MIX(sc).type = MIX_ON_OFF; - uaudio_mixer_add_ctl(sc, &mix); + uaudio_mixer_add_ctl(sc, &MIX(sc)); } } From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 12:29:30 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 581D7469; Sat, 29 Dec 2012 12:29:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3CC138FC0A; Sat, 29 Dec 2012 12:29:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBTCTUJE022838; Sat, 29 Dec 2012 12:29:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBTCTUFk022837; Sat, 29 Dec 2012 12:29:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201212291229.qBTCTUFk022837@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 29 Dec 2012 12:29:30 +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: r244817 - stable/9/etc/devd 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 12:29:30 -0000 Author: hselasky Date: Sat Dec 29 12:29:29 2012 New Revision: 244817 URL: http://svnweb.freebsd.org/changeset/base/244817 Log: MFC r241089, r243661 and r244252: Regenerate usb.conf Modified: stable/9/etc/devd/usb.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devd/usb.conf ============================================================================== --- stable/9/etc/devd/usb.conf Sat Dec 29 12:20:49 2012 (r244816) +++ stable/9/etc/devd/usb.conf Sat Dec 29 12:29:29 2012 (r244817) @@ -52,6 +52,17 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x05ac"; + match "product" "0x12a8"; + match "intclass" "0xff"; + match "intsubclass" "0xfd"; + match "intprotocol" "0x01"; + action "kldload -n if_ipheth"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0104"; match "product" "0x00be"; action "kldload -n uipaq"; @@ -157,7 +168,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeee c|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeee b|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -412,6 +423,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0499"; + match "product" "(0x1000|0x1001|0x1002|0x1003|0x1004|0x1005|0x1006|0x1007|0x1008|0x1009|0x100a|0x100c|0x100d|0x100e|0x100f|0x1010|0x1011|0x1012|0x1013|0x1014|0x1015|0x1016|0x1017|0x1018|0x1019|0x101a|0x101b|0x101c|0x101d|0x101e|0x101f|0x1020|0x1021|0x1022|0x1023|0x1024|0x1025|0x1026|0x1027|0x1028|0x1029|0x102a|0x102b|0x102e|0x1030|0x1031|0x1032|0x1033|0x1034|0x1035|0x1036|0x1037|0x1038|0x1039|0x103a|0x103b|0x103c|0x103d|0x103e|0x103f|0x1040|0x1041|0x1042|0x1043|0x1044|0x1045|0x104e|0x104f|0x1050|0x1051|0x1052|0x1053|0x1054|0x1055|0x1056|0x1057|0x1058|0x1059|0x105a|0x105b|0x105c|0x105d|0x1503|0x2000|0x2001|0x2002|0x2003|0x5000|0x5001|0x5002|0x5003|0x5004|0x5005|0x5006|0x5007|0x5008|0x5009|0x500a|0x500b|0x500c|0x500d|0x500e|0x500f|0x7000|0x7010)"; + action "kldload -n snd_uaudio"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x049f"; match "product" "(0x0003|0x0032)"; action "kldload -n uipaq"; @@ -2061,7 +2080,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784|0x1790)"; + match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784|0x1790|0x179d)"; action "kldload -n if_run"; }; @@ -2636,6 +2655,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0f3d"; + match "product" "0x68aa"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0f4e"; match "product" "0x0200"; action "kldload -n uipaq"; @@ -3069,7 +3096,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1465|0x14ac|0x14fe|0x1505|0x1506|0x1520|0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3861,7 +3888,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1a86"; - match "product" "0x7523"; + match "product" "(0x5523|0x7523)"; action "kldload -n uchcom"; }; @@ -4188,6 +4215,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x22de"; + match "product" "0x6801"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x2478"; match "product" "0x2008"; action "kldload -n uplcom"; @@ -4600,5 +4635,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2271 USB entries processed +# 2386 USB entries processed From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 14:56:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B5F6D60; Sat, 29 Dec 2012 14:56:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 264198FC08; Sat, 29 Dec 2012 14:56:28 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qBTEuOMc019949; Sat, 29 Dec 2012 16:56:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua qBTEuOMc019949 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qBTEuNUh019948; Sat, 29 Dec 2012 16:56:23 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 29 Dec 2012 16:56:23 +0200 From: Konstantin Belousov To: "Robert N. M. Watson" Subject: Re: svn commit: r244663 - stable/9 Message-ID: <20121229145623.GB82219@kib.kiev.ua> References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> <50DE74F1.70105@mu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mBuDz+cd8w/hvK2v" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: Adrian Chadd , src-committers@freebsd.org, Peter Wemm , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 14:56:29 -0000 --mBuDz+cd8w/hvK2v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 29, 2012 at 10:49:59AM +0000, Robert N. M. Watson wrote: >=20 > On 29 Dec 2012, at 04:43, Alfred Perlstein wrote: >=20 > > Yes. Kib and I chatted offline, it seems that the SOP is really "there= is no guarantee about KPI when talking about VFS" so the headache that it = would be to write the shim layer and maintain it (particularly considering = the 9.x release cycle slowness) was not worth it. > >=20 > > In a few days I'm going to blow up the extra entries in VFSOPS and VOPS= by some 10 entries to hopefully keep us KPI friendly for the next release.= I may also introduce a VFS_KPI version number. Let me know if you have a= ny thoughts on that, my thoughts are basically to make it like FreeBSD_vers= ion, and eventually someone can add macros for VFS klds to refuse to load d= epending on VFS_KPI. >=20 > I don't think stub entries hurt. >=20 > But I think a VFS_KPI version number is premature. We have the version number for eons, but it is unusable because there is no defined VFS KPI. See VFS_VERSION in the sys/sys/mount.h and its use for the module loading and filesystem registrations. --mBuDz+cd8w/hvK2v Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ3wSWAAoJEJDCuSvBvK1BRrYP/jQ6Sd+MGwOisM8YotsuIzBR S1keOAc3eKutEYUnSg7d/85AfcvkXe+J60LIIljbTw8S6mL9sDCWM+gQ9R57Gt9N 4alUH59M+YjBNKmbi/kza6vknwHN+Nh5xt42AITuNq856swnwZC7ozxmWaOXPf4i KPnIGgD2xjI+a24jHGnT4TBrDHtYYjQ7hH3L0gJNVUYhjjLkoE9EpPZfQNoOltYH oAaX9eEaCQM5kmOKRXNtOWsAM1JxaWFW6AUvoRSbfWpWK0hSnB5ZBvsuEu634bJS zG+xHC9BV3y+HWmgwuN7wVrFQg8h+TS/f9a9tQ1bjno653hqMr6O7bG5iUpdkaai ffgtZdXHzMetku+/CLph3fAkvA56UIDGWu5OqKfo/oQiTaVqDpShFigVi6DMxZyg LYXwvZZ0exrrIkIWffOvN4bUp2qUz8mppuBiiWhRrf5X5UWIOZQ0LPLbpKcE5kpy AjtjVgnFYAKrlQ8ntsAA0jzDivi/eJCpDusFSAC4TcAsO8pGv1APf0dXdSbZL1o/ V7h1lGPnIbKEf5CQYivzXZaNyiKddkpfVnS3TfcWODwQl5u/QKSG6UEEGiQDI83j osDrCfq3ofMQNaCh/s+2SHrP0RLEKbgaSi9mvifIKtYywEI6CkTBpMFQjkc1Xtv8 wddck44otHEL4YU0f4zv =qk75 -----END PGP SIGNATURE----- --mBuDz+cd8w/hvK2v-- From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 14:58:05 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99D2DEC9; Sat, 29 Dec 2012 14:58:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 512508FC08; Sat, 29 Dec 2012 14:58:04 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id fg15so5079567wgb.21 for ; Sat, 29 Dec 2012 06:57:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ohG/2eRmm3x2jgpTj7MGBBbveOD8RTz+7jj7NNxW3O8=; b=Kb6jv91M2V3gDe3UqJWyWnxDu6atg+KCB3YP87oi9j0vdIKTimXm9tSwVNnLzs91iz +Kq7HHY2a9/j5/6DMHTSmwIpnqJccn5dF/TT4SgRxB7/cxKVpVEo21lWuUZij3z/tec7 PxeUH6dCpUyondW+6JPKkw2TN45n5DKd3lOBBZaXYbSF3CcyTWGb1YZqNWKxNuu07euH fACeNBd9Vvz3mSA4GkG8yCrwJ2yiD2/kT0pCCYoAFu3xFUmb7/VloI886vCb/zBYU5tt 8xBoHbCtEGxbgFUYApxmXfMQG5kmatU71PL/wA02cmMtl7Q3dAfYiw5SCJOc3Yy0zPKO 9Bfw== MIME-Version: 1.0 Received: by 10.180.72.146 with SMTP id d18mr48368754wiv.33.1356792654354; Sat, 29 Dec 2012 06:50:54 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Sat, 29 Dec 2012 06:50:54 -0800 (PST) In-Reply-To: <00E4FFFA-8ADB-4D43-B977-3834C48133E4@freebsd.org> References: <201212241422.qBOEMrcF021632@svn.freebsd.org> <50D8B533.8080507@mu.org> <20121225104422.GB53644@kib.kiev.ua> <00E4FFFA-8ADB-4D43-B977-3834C48133E4@freebsd.org> Date: Sat, 29 Dec 2012 06:50:54 -0800 X-Google-Sender-Auth: yQPqxdeVuxt9H4olrOLWZ3j89kA Message-ID: Subject: Re: svn commit: r244663 - stable/9 From: Adrian Chadd To: "Robert N. M. Watson" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-9@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 14:58:05 -0000 On 29 December 2012 02:44, Robert N. M. Watson wrote: [snip] >> [adrian chadd] >> So, regardless of whether we should or shouldn't break things, a more >> thorough discussion would've been nice. > > Adrian: > > The standing consensus is that we try not to break certain classes of dev= ice drivers, not that we don't ever change any kernel interfaces. The reaso= n is that we don't have a formal definition of "public" and do not wish to = use the definition "all definitions in all header files" or "all symbols ev= er linked by any module" -- that definition would prevent almost any change= to the kernel in -STABLE branches at all. The reason VIMAGE/MRT/etc had to= be done with great caution is that they directly affected network device d= rivers, which are a category of module which we have decided we do want to = try to support in external binary form. The other major category is binary = storage drivers. > > When we talked to various VFS maintainers, looked at the past change hist= ory there, and looked at the set of third-party file systems (especially, t= hose we could see in ports), the consensus there was that it was too diffic= ult to define a stable VFS KPI and KBI for third-party modules. In particul= ar, there appear to be at most one or two in ports at any given moment, and= quick analyses of them suggested that their kernel feature dependency foot= print was far more than just "vnode operations". > > KPIs and KBIs have benefits and downsides: we need to consider them as a = tradeoff space, and not an absolute, and use them where they have significa= nt payoff. Especially as we don't have formal tools for reasoning about or = testing them. Sure, that's a logical, reasoned analysis of what the state of play of the VFS interface and users. But again, it'd have been nice to get some notification before it was pushed to -stable, just as a heads up (and a chance for feedback) for people and companies who aren't on your radar. Adrian From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 29 19:06:04 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDF2D661; Sat, 29 Dec 2012 19:06:04 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D01348FC08; Sat, 29 Dec 2012 19:06:04 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBTJ64fG031084; Sat, 29 Dec 2012 19:06:04 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBTJ6487031082; Sat, 29 Dec 2012 19:06:04 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201212291906.qBTJ6487031082@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sat, 29 Dec 2012 19:06: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: r244827 - stable/9/contrib/sendmail/include/libmilter 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-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 19:06:05 -0000 Author: gshapiro Date: Sat Dec 29 19:06:04 2012 New Revision: 244827 URL: http://svnweb.freebsd.org/changeset/base/244827 Log: MFC: Properly define true/false when defining __bool_true_false_are_defined for filters which pull in mfapi.h before stdbool.h. Issue reported by Petr Rehor, maintainer of amavisd-milter port. Modified: stable/9/contrib/sendmail/include/libmilter/mfapi.h Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/include/libmilter/mfapi.h ============================================================================== --- stable/9/contrib/sendmail/include/libmilter/mfapi.h Sat Dec 29 18:40:47 2012 (r244826) +++ stable/9/contrib/sendmail/include/libmilter/mfapi.h Sat Dec 29 19:06:04 2012 (r244827) @@ -96,6 +96,8 @@ typedef int sfsistat; # ifndef bool # ifndef __bool_true_false_are_defined typedef int bool; +# define false 0 +# define true 1 # define __bool_true_false_are_defined 1 # endif /* ! __bool_true_false_are_defined */ # endif /* bool */