From owner-svn-src-stable@FreeBSD.ORG Sun Jul 29 18:52:02 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30D161065674; Sun, 29 Jul 2012 18:52:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ACFF8FC08; Sun, 29 Jul 2012 18:52:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6TIq1RV086557; Sun, 29 Jul 2012 18:52:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6TIq1DD086556; Sun, 29 Jul 2012 18:52:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201207291852.q6TIq1DD086556@svn.freebsd.org> From: Glen Barber Date: Sun, 29 Jul 2012 18:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238890 - stable/9/share/man/man5 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2012 18:52:02 -0000 Author: gjb (doc,ports committer) Date: Sun Jul 29 18:52:01 2012 New Revision: 238890 URL: http://svn.freebsd.org/changeset/base/238890 Log: MFC r238707: Document the following in rc.conf.5: - rtsold_enable - rtsold_flags - rtsol_flags Approved by: re (kib) Modified: stable/9/share/man/man5/rc.conf.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/rc.conf.5 ============================================================================== --- stable/9/share/man/man5/rc.conf.5 Sun Jul 29 18:20:49 2012 (r238889) +++ stable/9/share/man/man5/rc.conf.5 Sun Jul 29 18:52:01 2012 (r238890) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd July 22, 2012 .Dt RC.CONF 5 .Os .Sh NAME @@ -2911,6 +2911,34 @@ If set to .Dq Li YES this enables IPv4 mapped IPv6 address communication (like .Li ::ffff:a.b.c.d ) . +.It Va rtsold_enable +.Pq Vt bool +Set to +.Dq Li YES +to enable the +.Xr rtsold 8 +daemon to send ICMPv6 Router Solicitation messages. +.It Va rtsold_flags +.Pq Vt str +If +.Va rtsold_enable +is set to +.Dq Li YES , +these are the flags to pass to +.Xr rtsold 8 . +.It Va rtsol_flags +.Pq Vt str +For interfaces configured with the +.Dq Li inet6 accept_rtadv +keyword, these are the flags to pass to +.Xr rtsol 8 . +.Pp +Note that +.Va rtsold_enable +is mutually exclusive to +.Va rtsol_flags ; +.Va rtsold_enable +takes precedence. .It Va atm_enable .Pq Vt bool Set to From owner-svn-src-stable@FreeBSD.ORG Sun Jul 29 18:52:19 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AE001065788; Sun, 29 Jul 2012 18:52:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54D848FC0C; Sun, 29 Jul 2012 18:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6TIqJNM086629; Sun, 29 Jul 2012 18:52:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6TIqJ3Q086627; Sun, 29 Jul 2012 18:52:19 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201207291852.q6TIqJ3Q086627@svn.freebsd.org> From: Glen Barber Date: Sun, 29 Jul 2012 18:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238891 - stable/8/share/man/man5 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2012 18:52:19 -0000 Author: gjb (doc,ports committer) Date: Sun Jul 29 18:52:18 2012 New Revision: 238891 URL: http://svn.freebsd.org/changeset/base/238891 Log: MFC r238707: Document the following in rc.conf.5: - rtsold_enable - rtsold_flags - rtsol_flags Modified: stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Sun Jul 29 18:52:01 2012 (r238890) +++ stable/8/share/man/man5/rc.conf.5 Sun Jul 29 18:52:18 2012 (r238891) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2012 +.Dd July 22, 2012 .Dt RC.CONF 5 .Os .Sh NAME @@ -2622,6 +2622,34 @@ If set to .Dq Li YES this enables IPv4 mapped IPv6 address communication (like .Li ::ffff:a.b.c.d ) . +.It Va rtsold_enable +.Pq Vt bool +Set to +.Dq Li YES +to enable the +.Xr rtsold 8 +daemon to send ICMPv6 Router Solicitation messages. +.It Va rtsold_flags +.Pq Vt str +If +.Va rtsold_enable +is set to +.Dq Li YES , +these are the flags to pass to +.Xr rtsold 8 . +.It Va rtsol_flags +.Pq Vt str +For interfaces configured with the +.Dq Li inet6 accept_rtadv +keyword, these are the flags to pass to +.Xr rtsol 8 . +.Pp +Note that +.Va rtsold_enable +is mutually exclusive to +.Va rtsol_flags ; +.Va rtsold_enable +takes precedence. .It Va atm_enable .Pq Vt bool Set to From owner-svn-src-stable@FreeBSD.ORG Mon Jul 30 11:11:06 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB691106566C; Mon, 30 Jul 2012 11:11:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C3448FC17; Mon, 30 Jul 2012 11:11:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6UBB6J9086263; Mon, 30 Jul 2012 11:11:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6UBB6Vo086260; Mon, 30 Jul 2012 11:11:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207301111.q6UBB6Vo086260@svn.freebsd.org> From: Marius Strobl Date: Mon, 30 Jul 2012 11:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238904 - in stable/9: . sys/boot/sparc64/loader X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 11:11:06 -0000 Author: marius Date: Mon Jul 30 11:11:05 2012 New Revision: 238904 URL: http://svn.freebsd.org/changeset/base/238904 Log: Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe all diskN aliases for providers (which more or less corresponds to how the x86 version behaves) but instead probe only those listed in the boot-device OFW environment variable. This has the following advantages: - avoids otherwise unavoidable OFW warnings about failures to open disks for which aliases exist but no actual hardware is connected - avoids issues due to different diskN naming schemes - aligns us with Solaris Approved by: re (kib) Modified: stable/9/UPDATING (contents, props changed) stable/9/sys/boot/sparc64/loader/main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Mon Jul 30 11:02:22 2012 (r238903) +++ stable/9/UPDATING Mon Jul 30 11:11:05 2012 (r238904) @@ -9,6 +9,11 @@ handbook. Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20120727: + The sparc64 ZFS loader has been changed to no longer try to auto- + detect ZFS providers based on diskN aliases but now requires these + to be explicitly listed in the OFW boot-device environment variable. + 20120422: Now unix domain sockets behave "as expected" on nullfs(5). Previously nullfs(5) did not pass through all behaviours to the underlying layer, Modified: stable/9/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/9/sys/boot/sparc64/loader/main.c Mon Jul 30 11:02:22 2012 (r238903) +++ stable/9/sys/boot/sparc64/loader/main.c Mon Jul 30 11:11:05 2012 (r238904) @@ -7,7 +7,7 @@ * unchanged, you can do what ever you want with this file. */ /*- - * Copyright (c) 2008 Marius Strobl + * Copyright (c) 2008 - 2012 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,8 +75,6 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" -#define MAXDEV 31 - extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; enum { @@ -735,18 +733,52 @@ sparc64_zfs_probe(void) { struct vtoc8 vtoc; struct zfs_devdesc zfs_currdev; - char devname[32]; + char alias[64], devname[sizeof(alias) + sizeof(":x") - 1]; + char type[sizeof("device_type")]; + char *bdev, *dev, *odev; uint64_t guid; - int fd, part, unit; + int fd, len, part; + phandle_t aliases, options; /* Get the GUID of the ZFS pool on the boot device. */ guid = 0; zfs_probe_dev(bootpath, &guid); - for (unit = 0; unit < MAXDEV; unit++) { + /* + * Get the GUIDs of the ZFS pools on any additional disks listed in + * the boot-device environment variable. + */ + if ((aliases = OF_finddevice("/aliases")) == -1) + goto out; + options = OF_finddevice("/options"); + len = OF_getproplen(options, "boot-device"); + if (len <= 0) + goto out; + bdev = odev = malloc(len + 1); + if (bdev == NULL) + goto out; + if (OF_getprop(options, "boot-device", bdev, len) <= 0) + goto out; + bdev[len] = '\0'; + while ((dev = strsep(&bdev, " ")) != NULL) { + if (*dev == '\0') + continue; + strcpy(alias, dev); + (void)OF_getprop(aliases, dev, alias, sizeof(alias)); + /* + * Don't probe the boot disk twice. Note that bootpath + * includes the partition specifier. + */ + if (strncmp(alias, bootpath, strlen(alias)) == 0) + continue; + if (OF_getprop(OF_finddevice(alias), "device_type", type, + sizeof(type)) == -1) + continue; + if (strcmp(type, "block") != 0) + continue; + /* Find freebsd-zfs slices in the VTOC. */ - sprintf(devname, "disk%d:", unit); - fd = open(devname, O_RDONLY); + fd = open(alias, O_RDONLY); if (fd == -1) continue; lseek(fd, 0, SEEK_SET); @@ -760,12 +792,14 @@ sparc64_zfs_probe(void) if (part == 2 || vtoc.part[part].tag != VTOC_TAG_FREEBSD_ZFS) continue; - sprintf(devname, "disk%d:%c", unit, part + 'a'); + (void)sprintf(devname, "%s:%c", alias, part + 'a'); if (zfs_probe_dev(devname, NULL) == ENXIO) break; } } + free(odev); + out: if (guid != 0) { zfs_currdev.pool_guid = guid; zfs_currdev.root_guid = 0; From owner-svn-src-stable@FreeBSD.ORG Mon Jul 30 11:29:06 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D0D1065672; Mon, 30 Jul 2012 11:29:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A5808FC0C; Mon, 30 Jul 2012 11:29:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6UBT6fN087724; Mon, 30 Jul 2012 11:29:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6UBT5H9087721; Mon, 30 Jul 2012 11:29:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207301129.q6UBT5H9087721@svn.freebsd.org> From: Marius Strobl Date: Mon, 30 Jul 2012 11:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238905 - in stable/8: . sys/boot/sparc64/loader X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 11:29:06 -0000 Author: marius Date: Mon Jul 30 11:29:05 2012 New Revision: 238905 URL: http://svn.freebsd.org/changeset/base/238905 Log: Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe all diskN aliases for providers (which more or less corresponds to how the x86 version behaves) but instead probe only those listed in the boot-device OFW environment variable. This has the following advantages: - avoids otherwise unavoidable OFW warnings about failures to open disks for which aliases exist but no actual hardware is connected - avoids issues due to different diskN naming schemes - aligns us with Solaris Modified: stable/8/UPDATING (contents, props changed) stable/8/sys/boot/sparc64/loader/main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Mon Jul 30 11:11:05 2012 (r238904) +++ stable/8/UPDATING Mon Jul 30 11:29:05 2012 (r238905) @@ -15,6 +15,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20120727: + The sparc64 ZFS loader has been changed to no longer try to auto- + detect ZFS providers based on diskN aliases but now requires these + to be explicitly listed in the OFW boot-device environment variable. + 20120411: 8.3-RELEASE. Modified: stable/8/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/8/sys/boot/sparc64/loader/main.c Mon Jul 30 11:11:05 2012 (r238904) +++ stable/8/sys/boot/sparc64/loader/main.c Mon Jul 30 11:29:05 2012 (r238905) @@ -7,7 +7,7 @@ * unchanged, you can do what ever you want with this file. */ /*- - * Copyright (c) 2008 Marius Strobl + * Copyright (c) 2008 - 2012 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,8 +75,6 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" -#define MAXDEV 31 - extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; enum { @@ -842,18 +840,52 @@ sparc64_zfs_probe(void) { struct vtoc8 vtoc; struct zfs_devdesc zfs_currdev; - char devname[32]; + char alias[64], devname[sizeof(alias) + sizeof(":x") - 1]; + char type[sizeof("device_type")]; + char *bdev, *dev, *odev; uint64_t guid; - int fd, part, unit; + int fd, len, part; + phandle_t aliases, options; /* Get the GUID of the ZFS pool on the boot device. */ guid = 0; zfs_probe_dev(bootpath, &guid); - for (unit = 0; unit < MAXDEV; unit++) { + /* + * Get the GUIDs of the ZFS pools on any additional disks listed in + * the boot-device environment variable. + */ + if ((aliases = OF_finddevice("/aliases")) == -1) + goto out; + options = OF_finddevice("/options"); + len = OF_getproplen(options, "boot-device"); + if (len <= 0) + goto out; + bdev = odev = malloc(len + 1); + if (bdev == NULL) + goto out; + if (OF_getprop(options, "boot-device", bdev, len) <= 0) + goto out; + bdev[len] = '\0'; + while ((dev = strsep(&bdev, " ")) != NULL) { + if (*dev == '\0') + continue; + strcpy(alias, dev); + (void)OF_getprop(aliases, dev, alias, sizeof(alias)); + /* + * Don't probe the boot disk twice. Note that bootpath + * includes the partition specifier. + */ + if (strncmp(alias, bootpath, strlen(alias)) == 0) + continue; + if (OF_getprop(OF_finddevice(alias), "device_type", type, + sizeof(type)) == -1) + continue; + if (strcmp(type, "block") != 0) + continue; + /* Find freebsd-zfs slices in the VTOC. */ - sprintf(devname, "disk%d:", unit); - fd = open(devname, O_RDONLY); + fd = open(alias, O_RDONLY); if (fd == -1) continue; lseek(fd, 0, SEEK_SET); @@ -867,12 +899,14 @@ sparc64_zfs_probe(void) if (part == 2 || vtoc.part[part].tag != VTOC_TAG_FREEBSD_ZFS) continue; - sprintf(devname, "disk%d:%c", unit, part + 'a'); + (void)sprintf(devname, "%s:%c", alias, part + 'a'); if (zfs_probe_dev(devname, NULL) == ENXIO) break; } } + free(odev); + out: if (guid != 0) { zfs_currdev.pool_guid = guid; zfs_currdev.root_guid = 0; From owner-svn-src-stable@FreeBSD.ORG Mon Jul 30 12:25:20 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97B1F1065670; Mon, 30 Jul 2012 12:25:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 823018FC1B; Mon, 30 Jul 2012 12:25:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6UCPK0l092237; Mon, 30 Jul 2012 12:25:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6UCPK0o092235; Mon, 30 Jul 2012 12:25:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207301225.q6UCPK0o092235@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 30 Jul 2012 12:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238906 - stable/9/lib/libc/locale X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 12:25:20 -0000 Author: jilles Date: Mon Jul 30 12:25:20 2012 New Revision: 238906 URL: http://svn.freebsd.org/changeset/base/238906 Log: MFC r237939: ctype_l(3): Note that not all these functions are specified by POSIX.1-2008. The function isascii_l() is not in POSIX even though isascii() is, probably because isascii() is marked as obsolete. The other functions, like digittoint_l() and ishexnumber_l(), are FreeBSD-specific just like their non-_l versions. Approved by: re (kib) Modified: stable/9/lib/libc/locale/ctype_l.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/locale/ctype_l.3 ============================================================================== --- stable/9/lib/libc/locale/ctype_l.3 Mon Jul 30 11:29:05 2012 (r238905) +++ stable/9/lib/libc/locale/ctype_l.3 Mon Jul 30 12:25:20 2012 (r238906) @@ -135,4 +135,17 @@ See the specific manual pages for more i .Xr xlocale 3 .Sh STANDARDS These functions conform to -.St -p1003.1-2008 . +.St -p1003.1-2008 , +except for +.Fn digittoint_l , +.Fn isascii_l , +.Fn ishexnumber_l , +.Fn isideogram_l , +.Fn isnumber_l , +.Fn isphonogram_l , +.Fn isrune_l +and +.Fn isspecial_l +which are +.Fx +extensions. From owner-svn-src-stable@FreeBSD.ORG Mon Jul 30 15:30:43 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1FAA1065734; Mon, 30 Jul 2012 15:30:42 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DABC18FC0A; Mon, 30 Jul 2012 15:30:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6UFUgTX007348; Mon, 30 Jul 2012 15:30:42 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6UFUgkb007346; Mon, 30 Jul 2012 15:30:42 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201207301530.q6UFUgkb007346@svn.freebsd.org> From: Jim Harris Date: Mon, 30 Jul 2012 15:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238910 - stable/9/sys/x86/x86 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 15:30:43 -0000 Author: jimharris Date: Mon Jul 30 15:30:42 2012 New Revision: 238910 URL: http://svn.freebsd.org/changeset/base/238910 Log: MFC r238755: Add rmb() to tsc_read_##x to enforce serialization of rdtsc captures. Intel Architecture Manual specifies that rdtsc instruction is not serialized, so without this change, TSC synchronization test would periodically fail, resulting in use of HPET timecounter instead of TSC-low. This caused severe performance degradation (40-50%) when running high IO/s workloads due to HPET MMIO reads and GEOM stat collection. Tests on Xeon E5-2600 (Sandy Bridge) 8C systems were seeing TSC synchronization fail approximately 20% of the time. Sponsored by: Intel Approved by: re (kib) Modified: stable/9/sys/x86/x86/tsc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/x86/tsc.c ============================================================================== --- stable/9/sys/x86/x86/tsc.c Mon Jul 30 14:47:35 2012 (r238909) +++ stable/9/sys/x86/x86/tsc.c Mon Jul 30 15:30:42 2012 (r238910) @@ -326,6 +326,7 @@ init_TSC(void) #ifdef SMP +/* rmb is required here because rdtsc is not a serializing instruction. */ #define TSC_READ(x) \ static void \ tsc_read_##x(void *arg) \ @@ -333,6 +334,7 @@ tsc_read_##x(void *arg) \ uint32_t *tsc = arg; \ u_int cpu = PCPU_GET(cpuid); \ \ + rmb(); \ tsc[cpu * 3 + x] = rdtsc32(); \ } TSC_READ(0) From owner-svn-src-stable@FreeBSD.ORG Mon Jul 30 18:04:41 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D81501065674; Mon, 30 Jul 2012 18:04:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 87F9D8FC1A; Mon, 30 Jul 2012 18:04:41 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DA3B3B984; Mon, 30 Jul 2012 14:04:40 -0400 (EDT) From: John Baldwin To: Max Khon Date: Mon, 30 Jul 2012 11:32:34 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207251742.q6PHgvDj083177@svn.freebsd.org> In-Reply-To: <201207251742.q6PHgvDj083177@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201207301132.34524.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 30 Jul 2012 14:04:40 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r238775 - stable/8/sys/dev/puc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 18:04:42 -0000 On Wednesday, July 25, 2012 1:42:57 pm Max Khon wrote: > Author: fjoe > Date: Wed Jul 25 17:42:57 2012 > New Revision: 238775 > URL: http://svn.freebsd.org/changeset/base/238775 > > Log: > MFC: r227457, r237350, r237357 > > Add support for the following Moxa PCIe multiport serial boards: > - CP102E > - CP102EL > - CP104EL-A > - CP104JU > - CP114EL > - CP118EL-A > - CP168EL-A You ignored the comments from Marcel when you committed this to HEAD it seems. You need to revert d_ofs back to a int8_t and add a config_function for these adapters instead that use an offset of 0x200. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Mon Jul 30 19:05:42 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1380D1065670; Mon, 30 Jul 2012 19:05:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F07CA8FC08; Mon, 30 Jul 2012 19:05:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6UJ5f40027698; Mon, 30 Jul 2012 19:05:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6UJ5flk027689; Mon, 30 Jul 2012 19:05:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207301905.q6UJ5flk027689@svn.freebsd.org> From: John Baldwin Date: Mon, 30 Jul 2012 19:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238913 - in stable/7/sys: kern nfsclient sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 19:05:42 -0000 Author: jhb Date: Mon Jul 30 19:05:41 2012 New Revision: 238913 URL: http://svn.freebsd.org/changeset/base/238913 Log: MFC 194358,230394,230441,230489,230552,232116,232420: - For dotdot lookup in nfs_lookup, inline the vn_vget_ino() to prevent operating on the unmounted mount point and freed mount data in case of forced unmount performed while dvp is unlocked to nget the target vnode. - Close a race in NFS lookup processing that could result in stale name cache entries on one client when a directory was renamed on another client. The root cause for the stale entry being trusted is that each per-vnode nfsnode structure has a single 'n_ctime' timestamp used to validate positive name cache entries. However, if there are multiple entries for a single vnode, they all share a single timestamp. To fix this, extend the name cache to allow filesystems to optionally store a timestamp value in each name cache entry. The NFS clients now fetch the timestamp associated with each name cache entry and use that to validate cache hits instead of the timestamps previously stored in the nfsnode. Another part of the fix is that the NFS clients now use timestamps from the post-op attributes of RPCs when adding name cache entries rather than pulling the timestamps out of the file's attribute cache. The latter is subject to races with other lookups updating the attribute cache concurrently. - Adjust the nfs_skip_wcc_data_onerr setting so that it does not block post-op attributes for ENOENT errors now that the name caching logic depends on working post-op attributes. Tested by: Mark Saad nonesuch longcount org Modified: stable/7/sys/kern/vfs_cache.c stable/7/sys/nfsclient/nfs_socket.c stable/7/sys/nfsclient/nfs_subs.c stable/7/sys/nfsclient/nfs_vnops.c stable/7/sys/nfsclient/nfsm_subs.h stable/7/sys/nfsclient/nfsnode.h stable/7/sys/sys/vnode.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Mon Jul 30 18:21:48 2012 (r238912) +++ stable/7/sys/kern/vfs_cache.c Mon Jul 30 19:05:41 2012 (r238913) @@ -75,6 +75,36 @@ struct namecache { }; /* + * struct namecache_ts repeats struct namecache layout up to the + * nc_nlen member. + * struct namecache_ts is used in place of struct namecache when time(s) need + * to be stored. The nc_dotdottime field is used when a cache entry is mapping + * both a non-dotdot directory name plus dotdot for the directory's + * parent. + */ +struct namecache_ts { + LIST_ENTRY(namecache) nc_hash; /* hash chain */ + LIST_ENTRY(namecache) nc_src; /* source vnode list */ + TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */ + struct vnode *nc_dvp; /* vnode of parent of name */ + struct vnode *nc_vp; /* vnode the name refers to */ + u_char nc_flag; /* flag bits */ + u_char nc_nlen; /* length of name */ + struct timespec nc_time; /* timespec provided by fs */ + struct timespec nc_dotdottime; /* dotdot timespec provided by fs */ + int nc_ticks; /* ticks value when entry was added */ + char nc_name[0]; /* segment name + nul */ +}; + +/* + * Flags in namecache.nc_flag + */ +#define NCF_WHITE 0x01 +#define NCF_ISDOTDOT 0x02 +#define NCF_TS 0x04 +#define NCF_DTS 0x08 + +/* * Name caching works as follows: * * Names found by directory scans are retained in a cache @@ -128,19 +158,71 @@ MTX_SYSINIT(vfscache, &cache_lock, "Name * fit in the small cache. */ static uma_zone_t cache_zone_small; +static uma_zone_t cache_zone_small_ts; static uma_zone_t cache_zone_large; +static uma_zone_t cache_zone_large_ts; #define CACHE_PATH_CUTOFF 32 -#define CACHE_ZONE_SMALL (sizeof(struct namecache) + CACHE_PATH_CUTOFF) -#define CACHE_ZONE_LARGE (sizeof(struct namecache) + NAME_MAX) -#define cache_alloc(len) uma_zalloc(((len) <= CACHE_PATH_CUTOFF) ? \ - cache_zone_small : cache_zone_large, M_WAITOK) -#define cache_free(ncp) do { \ - if (ncp != NULL) \ - uma_zfree(((ncp)->nc_nlen <= CACHE_PATH_CUTOFF) ? \ - cache_zone_small : cache_zone_large, (ncp)); \ -} while (0) +static struct namecache * +cache_alloc(int len, int ts) +{ + + if (len > CACHE_PATH_CUTOFF) { + if (ts) + return (uma_zalloc(cache_zone_large_ts, M_WAITOK)); + else + return (uma_zalloc(cache_zone_large, M_WAITOK)); + } + if (ts) + return (uma_zalloc(cache_zone_small_ts, M_WAITOK)); + else + return (uma_zalloc(cache_zone_small, M_WAITOK)); +} + +static void +cache_free(struct namecache *ncp) +{ + int ts; + + if (ncp == NULL) + return; + ts = ncp->nc_flag & NCF_TS; + if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) { + if (ts) + uma_zfree(cache_zone_small_ts, ncp); + else + uma_zfree(cache_zone_small, ncp); + } else if (ts) + uma_zfree(cache_zone_large_ts, ncp); + else + uma_zfree(cache_zone_large, ncp); +} + +static char * +nc_get_name(struct namecache *ncp) +{ + struct namecache_ts *ncp_ts; + + if ((ncp->nc_flag & NCF_TS) == 0) + return (ncp->nc_name); + ncp_ts = (struct namecache_ts *)ncp; + return (ncp_ts->nc_name); +} + +static void +cache_out_ts(struct namecache *ncp, struct timespec *tsp, int *ticksp) +{ + + KASSERT((ncp->nc_flag & NCF_TS) != 0 || + (tsp == NULL && ticksp == NULL), + ("No NCF_TS")); + + if (tsp != NULL) + *tsp = ((struct namecache_ts *)ncp)->nc_time; + if (ticksp != NULL) + *ticksp = ((struct namecache_ts *)ncp)->nc_ticks; +} static int doingcache = 1; /* 1 => enable the cache */ SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, ""); @@ -179,12 +261,6 @@ static int vn_fullpath1(struct thread *t static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); -/* - * Flags in namecache.nc_flag - */ -#define NCF_WHITE 0x01 -#define NCF_ISDOTDOT 0x02 - #ifdef DIAGNOSTIC /* * Grab an atomic snapshot of the name cache hash chain lengths @@ -326,10 +402,12 @@ cache_zap(ncp) */ int -cache_lookup(dvp, vpp, cnp) +cache_lookup_times(dvp, vpp, cnp, tsp, ticksp) struct vnode *dvp; struct vnode **vpp; struct componentname *cnp; + struct timespec *tsp; + int *ticksp; { struct namecache *ncp; struct thread *td; @@ -351,6 +429,10 @@ retry: CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .", dvp, cnp->cn_nameptr); dothits++; + if (tsp != NULL) + timespecclear(tsp); + if (ticksp != NULL) + *ticksp = ticks; goto success; } if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { @@ -366,17 +448,21 @@ retry: CACHE_UNLOCK(); return (0); } - if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) - *vpp = dvp->v_cache_dd->nc_vp; + ncp = dvp->v_cache_dd; + if (ncp->nc_flag & NCF_ISDOTDOT) + *vpp = ncp->nc_vp; else - *vpp = dvp->v_cache_dd->nc_dvp; + *vpp = ncp->nc_dvp; /* Return failure if negative entry was found. */ - if (*vpp == NULL) { - ncp = dvp->v_cache_dd; + if (*vpp == NULL) goto negative_success; - } CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", dvp, cnp->cn_nameptr, *vpp); + cache_out_ts(ncp, tsp, ticksp); + if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == + NCF_DTS && tsp != NULL) + *tsp = ((struct namecache_ts *)ncp)-> + nc_dotdottime; goto success; } } @@ -386,7 +472,7 @@ retry: LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { numchecks++; if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && - !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) + !bcmp(nc_get_name(ncp), cnp->cn_nameptr, ncp->nc_nlen)) break; } @@ -418,6 +504,7 @@ retry: *vpp = ncp->nc_vp; CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", dvp, cnp->cn_nameptr, *vpp, ncp); + cache_out_ts(ncp, tsp, ticksp); goto success; } @@ -498,12 +585,15 @@ success: * Add an entry to the cache. */ void -cache_enter(dvp, vp, cnp) +cache_enter_time(dvp, vp, cnp, tsp, dtsp) struct vnode *dvp; struct vnode *vp; struct componentname *cnp; + struct timespec *tsp; + struct timespec *dtsp; { struct namecache *ncp, *n2; + struct namecache_ts *n3; struct nchashhead *ncpp; u_int32_t hash; int flag; @@ -566,13 +656,23 @@ cache_enter(dvp, vp, cnp) * Calculate the hash key and setup as much of the new * namecache entry as possible before acquiring the lock. */ - ncp = cache_alloc(cnp->cn_namelen); + ncp = cache_alloc(cnp->cn_namelen, tsp != NULL); ncp->nc_vp = vp; ncp->nc_dvp = dvp; ncp->nc_flag = flag; + if (tsp != NULL) { + n3 = (struct namecache_ts *)ncp; + n3->nc_time = *tsp; + n3->nc_ticks = ticks; + n3->nc_flag |= NCF_TS; + if (dtsp != NULL) { + n3->nc_dotdottime = *dtsp; + n3->nc_flag |= NCF_DTS; + } + } len = ncp->nc_nlen = cnp->cn_namelen; hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); - bcopy(cnp->cn_nameptr, ncp->nc_name, len); + bcopy(cnp->cn_nameptr, nc_get_name(ncp), len); hash = fnv_32_buf(&dvp, sizeof(dvp), hash); CACHE_LOCK(); @@ -585,7 +685,22 @@ cache_enter(dvp, vp, cnp) LIST_FOREACH(n2, ncpp, nc_hash) { if (n2->nc_dvp == dvp && n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + !bcmp(nc_get_name(n2), cnp->cn_nameptr, n2->nc_nlen)) { + if (tsp != NULL) { + KASSERT((n2->nc_flag & NCF_TS) != 0, + ("no NCF_TS")); + n3 = (struct namecache_ts *)n2; + n3->nc_time = + ((struct namecache_ts *)ncp)->nc_time; + n3->nc_ticks = + ((struct namecache_ts *)ncp)->nc_ticks; + if (dtsp != NULL) { + n3->nc_dotdottime = + ((struct namecache_ts *)ncp)-> + nc_dotdottime; + n3->nc_flag |= NCF_DTS; + } + } CACHE_UNLOCK(); cache_free(ncp); return; @@ -614,6 +729,11 @@ cache_enter(dvp, vp, cnp) ncp->nc_flag |= NCF_WHITE; } else if (vp->v_type == VDIR) { if (flag != NCF_ISDOTDOT) { + /* + * For this case, the cache entry maps both the + * directory name in it and the name ".." for the + * directory's parent. + */ if ((n2 = vp->v_cache_dd) != NULL && (n2->nc_flag & NCF_ISDOTDOT) != 0) cache_zap(n2); @@ -666,10 +786,18 @@ nchinit(void *dummy __unused) TAILQ_INIT(&ncneg); - cache_zone_small = uma_zcreate("S VFS Cache", CACHE_ZONE_SMALL, NULL, - NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); - cache_zone_large = uma_zcreate("L VFS Cache", CACHE_ZONE_LARGE, NULL, - NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); + cache_zone_small = uma_zcreate("S VFS Cache", + sizeof(struct namecache) + CACHE_PATH_CUTOFF, + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); + cache_zone_small_ts = uma_zcreate("STS VFS Cache", + sizeof(struct namecache_ts) + CACHE_PATH_CUTOFF, + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); + cache_zone_large = uma_zcreate("L VFS Cache", + sizeof(struct namecache) + NAME_MAX, + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); + cache_zone_large_ts = uma_zcreate("LTS VFS Cache", + sizeof(struct namecache_ts) + NAME_MAX, + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); nchashtbl = hashinit(desiredvnodes * 2, M_VFSCACHE, &nchash); } @@ -925,7 +1053,7 @@ static int vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, u_int buflen) { - char *bp; + char *bp, *nc_name; int error, i, slash_prefixed; struct namecache *ncp; @@ -943,8 +1071,9 @@ vn_fullpath1(struct thread *td, struct v CACHE_UNLOCK(); return (ENOENT); } + nc_name = nc_get_name(ncp); for (i = ncp->nc_nlen - 1; i >= 0 && bp > buf; i--) - *--bp = ncp->nc_name[i]; + *--bp = nc_name[i]; if (bp == buf) { numfullpathfail4++; CACHE_UNLOCK(); @@ -976,8 +1105,9 @@ vn_fullpath1(struct thread *td, struct v error = ENOENT; break; } + nc_name = nc_get_name(ncp); for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) - *--bp = ncp->nc_name[i]; + *--bp = nc_name[i]; if (bp == buf) { numfullpathfail4++; error = ENOMEM; @@ -1006,3 +1136,26 @@ vn_fullpath1(struct thread *td, struct v *retbuf = bp; return (0); } + +/* ABI compat shims for old kernel modules. */ +#undef cache_enter +#undef cache_lookup + +void cache_enter(struct vnode *dvp, struct vnode *vp, + struct componentname *cnp); +int cache_lookup(struct vnode *dvp, struct vnode **vpp, + struct componentname *cnp); + +void +cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) +{ + + cache_enter_time(dvp, vp, cnp, NULL, NULL); +} + +int +cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) +{ + + return (cache_lookup_times(dvp, vpp, cnp, NULL, NULL)); +} Modified: stable/7/sys/nfsclient/nfs_socket.c ============================================================================== --- stable/7/sys/nfsclient/nfs_socket.c Mon Jul 30 18:21:48 2012 (r238912) +++ stable/7/sys/nfsclient/nfs_socket.c Mon Jul 30 19:05:41 2012 (r238913) @@ -1365,11 +1365,16 @@ wait_for_pinned_req: if (error == ESTALE) cache_purge(vp); /* - * Skip wcc data on NFS errors for now. NetApp filers return corrupt - * postop attrs in the wcc data for NFS err EROFS. Not sure if they - * could return corrupt postop attrs for others errors. + * Skip wcc data on non-ENOENT NFS errors for + * now. NetApp filers return corrupt postop + * attrs in the wcc data for NFS err EROFS. + * Not sure if they could return corrupt + * postop attrs for others errors. Blocking + * ENOENT post-op attributes breaks negative + * name caching, so always allow it through. */ - if ((nmp->nm_flag & NFSMNT_NFSV3) && !nfs_skip_wcc_data_onerr) { + if ((nmp->nm_flag & NFSMNT_NFSV3) && + (!nfs_skip_wcc_data_onerr || error == ENOENT)) { *mrp = mrep; *mdp = md; *dposp = dpos; Modified: stable/7/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/7/sys/nfsclient/nfs_subs.c Mon Jul 30 18:21:48 2012 (r238912) +++ stable/7/sys/nfsclient/nfs_subs.c Mon Jul 30 19:05:41 2012 (r238913) @@ -1025,8 +1025,8 @@ nfsm_loadattr_xx(struct vnode **v, struc } int -nfsm_postop_attr_xx(struct vnode **v, int *f, struct mbuf **md, - caddr_t *dpos) +nfsm_postop_attr_xx(struct vnode **v, int *f, struct vattr *va, + struct mbuf **md, caddr_t *dpos) { u_int32_t *tl; int t1; @@ -1037,7 +1037,7 @@ nfsm_postop_attr_xx(struct vnode **v, in return EBADRPC; *f = fxdr_unsigned(int, *tl); if (*f != 0) { - t1 = nfs_loadattrcache(&ttvp, md, dpos, NULL, 1); + t1 = nfs_loadattrcache(&ttvp, md, dpos, va, 1); if (t1 != 0) { *f = 0; return t1; @@ -1067,7 +1067,7 @@ nfsm_wcc_data_xx(struct vnode **v, int * VTONFS(*v)->n_mtime.tv_nsec == fxdr_unsigned(u_int32_t, *(tl + 3))); mtx_unlock(&(VTONFS(*v))->n_mtx); } - t1 = nfsm_postop_attr_xx(v, &ttattrf, md, dpos); + t1 = nfsm_postop_attr_xx(v, &ttattrf, NULL, md, dpos); if (t1) return t1; if (*f) Modified: stable/7/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vnops.c Mon Jul 30 18:21:48 2012 (r238912) +++ stable/7/sys/nfsclient/nfs_vnops.c Mon Jul 30 19:05:41 2012 (r238913) @@ -860,8 +860,9 @@ nfs_lookup(struct vop_lookup_args *ap) struct componentname *cnp = ap->a_cnp; struct vnode *dvp = ap->a_dvp; struct vnode **vpp = ap->a_vpp; - struct vattr vattr; - struct timespec dmtime; + struct mount *mp = dvp->v_mount; + struct vattr dvattr, vattr; + struct timespec nctime; int flags = cnp->cn_flags; struct vnode *newvp; struct nfsmount *nmp; @@ -870,27 +871,40 @@ nfs_lookup(struct vop_lookup_args *ap) long len; nfsfh_t *fhp; struct nfsnode *np, *newnp; - int error = 0, attrflag, fhsize; + int error = 0, attrflag, dattrflag, fhsize, ltype, ncticks; int v3 = NFS_ISV3(dvp); struct thread *td = cnp->cn_thread; *vpp = NULLVP; - if ((flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) && + if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); if (dvp->v_type != VDIR) return (ENOTDIR); - nmp = VFSTONFS(dvp->v_mount); + nmp = VFSTONFS(mp); np = VTONFS(dvp); if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) { *vpp = NULLVP; return (error); } - error = cache_lookup(dvp, vpp, cnp); + error = cache_lookup_times(dvp, vpp, cnp, &nctime, &ncticks); if (error > 0 && error != ENOENT) return (error); if (error == -1) { /* + * Lookups of "." are special and always return the + * current directory. cache_lookup() already handles + * associated locking bookkeeping, etc. + */ + if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { + /* XXX: Is this really correct? */ + if (cnp->cn_nameiop != LOOKUP && + (flags & ISLASTCN)) + cnp->cn_flags |= SAVENAME; + return (0); + } + + /* * We only accept a positive hit in the cache if the * change time of the file matches our cached copy. * Otherwise, we discard the cache entry and fallback @@ -914,7 +928,7 @@ nfs_lookup(struct vop_lookup_args *ap) mtx_unlock(&newnp->n_mtx); } if (VOP_GETATTR(newvp, &vattr, cnp->cn_cred, td) == 0 && - timespeccmp(&vattr.va_ctime, &newnp->n_ctime, ==)) { + timespeccmp(&vattr.va_ctime, &nctime, ==)) { nfsstats.lookupcache_hits++; if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) @@ -931,35 +945,22 @@ nfs_lookup(struct vop_lookup_args *ap) /* * We only accept a negative hit in the cache if the * modification time of the parent directory matches - * our cached copy. Otherwise, we discard all of the - * negative cache entries for this directory. We also - * only trust -ve cache entries for less than - * negnametimeo seconds. + * the cached copy in the name cache entry. + * Otherwise, we discard all of the negative cache + * entries for this directory. We also only trust + * negative cache entries for up to negnametimeo + * seconds. */ - if ((u_int)(ticks - np->n_dmtime_ticks) < (negnametimeo * hz) && + if ((u_int)(ticks - ncticks) < (negnametimeo * hz) && VOP_GETATTR(dvp, &vattr, cnp->cn_cred, td) == 0 && - timespeccmp(&vattr.va_mtime, &np->n_dmtime, ==)) { + timespeccmp(&vattr.va_mtime, &nctime, ==)) { nfsstats.lookupcache_hits++; return (ENOENT); } cache_purge_negative(dvp); - mtx_lock(&np->n_mtx); - timespecclear(&np->n_dmtime); - mtx_unlock(&np->n_mtx); } - /* - * Cache the modification time of the parent directory in case - * the lookup fails and results in adding the first negative - * name cache entry for the directory. Since this is reading - * a single time_t, don't bother with locking. The - * modification time may be a bit stale, but it must be read - * before performing the lookup RPC to prevent a race where - * another lookup updates the timestamp on the directory after - * the lookup RPC has been performed on the server but before - * n_dmtime is set at the end of this function. - */ - dmtime = np->n_vattr.va_mtime; + attrflag = dattrflag = 0; error = 0; newvp = NULLVP; nfsstats.lookupcache_misses++; @@ -974,7 +975,7 @@ nfs_lookup(struct vop_lookup_args *ap) nfsm_request(dvp, NFSPROC_LOOKUP, cnp->cn_thread, cnp->cn_cred); if (error) { if (v3) { - nfsm_postop_attr(dvp, attrflag); + nfsm_postop_attr_va(dvp, dattrflag, &vattr); m_freem(mrep); } goto nfsmout; @@ -989,7 +990,7 @@ nfs_lookup(struct vop_lookup_args *ap) m_freem(mrep); return (EISDIR); } - error = nfs_nget(dvp->v_mount, fhp, fhsize, &np, LK_EXCLUSIVE); + error = nfs_nget(mp, fhp, fhsize, &np, LK_EXCLUSIVE); if (error) { m_freem(mrep); return (error); @@ -1007,17 +1008,45 @@ nfs_lookup(struct vop_lookup_args *ap) } if (flags & ISDOTDOT) { + ltype = VOP_ISLOCKED(dvp, td); + error = vfs_busy(mp, LK_NOWAIT, NULL, td); + if (error != 0) { + VOP_UNLOCK(dvp, 0, td); + error = vfs_busy(mp, 0, NULL, td); + vn_lock(dvp, ltype | LK_RETRY, td); + if (error == 0 && (dvp->v_iflag & VI_DOOMED)) { + vfs_unbusy(mp, td); + error = ENOENT; + } + if (error != 0) { + m_freem(mrep); + return (error); + } + } VOP_UNLOCK(dvp, 0, td); - error = nfs_nget(dvp->v_mount, fhp, fhsize, &np, cnp->cn_lkflags); - vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td); - if (error) + error = nfs_nget(mp, fhp, fhsize, &np, cnp->cn_lkflags); + if (error == 0) + newvp = NFSTOV(np); + vfs_unbusy(mp, td); + vn_lock(dvp, ltype | LK_RETRY, td); + if (dvp->v_iflag & VI_DOOMED) { + if (error == 0) { + if (newvp == dvp) + vrele(newvp); + else + vput(newvp); + } + error = ENOENT; + } + if (error) { + m_freem(mrep); return (error); - newvp = NFSTOV(np); + } } else if (NFS_CMPFH(np, fhp, fhsize)) { VREF(dvp); newvp = dvp; } else { - error = nfs_nget(dvp->v_mount, fhp, fhsize, &np, cnp->cn_lkflags); + error = nfs_nget(mp, fhp, fhsize, &np, cnp->cn_lkflags); if (error) { m_freem(mrep); return (error); @@ -1038,17 +1067,19 @@ nfs_lookup(struct vop_lookup_args *ap) } } if (v3) { - nfsm_postop_attr(newvp, attrflag); - nfsm_postop_attr(dvp, attrflag); - } else - nfsm_loadattr(newvp, NULL); + nfsm_postop_attr_va(newvp, attrflag, &vattr); + nfsm_postop_attr_va(dvp, dattrflag, &dvattr); + } else { + nfsm_loadattr(newvp, &vattr); + attrflag = 1; + } if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; if ((cnp->cn_flags & MAKEENTRY) && - (cnp->cn_nameiop != DELETE || !(flags & ISLASTCN))) { - np->n_ctime = np->n_vattr.va_ctime; - cache_enter(dvp, newvp, cnp); - } + (cnp->cn_nameiop != DELETE || !(flags & ISLASTCN)) && + attrflag != 0 && (newvp->v_type != VDIR || dattrflag != 0)) + cache_enter_time(dvp, newvp, cnp, &vattr.va_ctime, + newvp->v_type != VDIR ? NULL : &dvattr.va_ctime); *vpp = newvp; m_freem(mrep); nfsmout: @@ -1069,36 +1100,28 @@ nfsmout: * VWRITE) here instead of just checking * MNT_RDONLY. */ - if (dvp->v_mount->mnt_flag & MNT_RDONLY) + if (mp->mnt_flag & MNT_RDONLY) return (EROFS); cnp->cn_flags |= SAVENAME; return (EJUSTRETURN); } - if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE) { + if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE && + dattrflag) { /* - * Maintain n_dmtime as the modification time - * of the parent directory when the oldest -ve - * name cache entry for this directory was - * added. If a -ve cache entry has already - * been added with a newer modification time - * by a concurrent lookup, then don't bother - * adding a cache entry. The modification - * time of the directory might have changed - * due to the file this lookup failed to find - * being created. In that case a subsequent - * lookup would incorrectly use the entry - * added here instead of doing an extra - * lookup. + * Cache the modification time of the parent + * directory from the post-op attributes in + * the name cache entry. The negative cache + * entry will be ignored once the directory + * has changed. Don't bother adding the entry + * if the directory has already changed. */ mtx_lock(&np->n_mtx); - if (timespeccmp(&np->n_dmtime, &dmtime, <=)) { - if (!timespecisset(&np->n_dmtime)) { - np->n_dmtime = dmtime; - np->n_dmtime_ticks = ticks; - } + if (timespeccmp(&np->n_vattr.va_mtime, + &vattr.va_mtime, ==)) { mtx_unlock(&np->n_mtx); - cache_enter(dvp, NULL, cnp); + cache_enter_time(dvp, NULL, cnp, + &vattr.va_mtime, NULL); } else mtx_unlock(&np->n_mtx); } @@ -1449,8 +1472,6 @@ nfsmout: if (newvp) vput(newvp); } else { - if (cnp->cn_flags & MAKEENTRY) - cache_enter(dvp, newvp, cnp); *vpp = newvp; } mtx_lock(&(VTONFS(dvp))->n_mtx); @@ -1579,8 +1600,6 @@ nfsmout: vput(newvp); } if (!error) { - if (cnp->cn_flags & MAKEENTRY) - cache_enter(dvp, newvp, cnp); *ap->a_vpp = newvp; } mtx_lock(&(VTONFS(dvp))->n_mtx); @@ -2363,10 +2382,11 @@ nfs_readdirplusrpc(struct vnode *vp, str nfsuint64 cookie; struct nfsmount *nmp = VFSTONFS(vp->v_mount); struct nfsnode *dnp = VTONFS(vp), *np; + struct vattr vattr, dvattr; nfsfh_t *fhp; u_quad_t fileno; int error = 0, tlen, more_dirs = 1, blksiz = 0, doit, bigenough = 1, i; - int attrflag, fhsize; + int attrflag, dattrflag, fhsize; #ifndef nolint dp = NULL; @@ -2413,7 +2433,7 @@ nfs_readdirplusrpc(struct vnode *vp, str *tl++ = txdr_unsigned(nmp->nm_readdirsize); *tl = txdr_unsigned(nmp->nm_rsize); nfsm_request(vp, NFSPROC_READDIRPLUS, uiop->uio_td, cred); - nfsm_postop_attr(vp, attrflag); + nfsm_postop_attr_va(vp, dattrflag, &dvattr); if (error) { m_freem(mrep); goto nfsmout; @@ -2544,18 +2564,16 @@ nfs_readdirplusrpc(struct vnode *vp, str dpos = dpossav1; mdsav2 = md; md = mdsav1; - nfsm_loadattr(newvp, NULL); + nfsm_loadattr(newvp, &vattr); dpos = dpossav2; md = mdsav2; - dp->d_type = - IFTODT(VTTOIF(np->n_vattr.va_type)); + dp->d_type = IFTODT(VTTOIF(vattr.va_type)); ndp->ni_vp = newvp; - /* - * Update n_ctime so subsequent lookup - * doesn't purge entry. - */ - np->n_ctime = np->n_vattr.va_ctime; - cache_enter(ndp->ni_dvp, ndp->ni_vp, cnp); + if (newvp->v_type != VDIR || dattrflag != 0) + cache_enter_time(ndp->ni_dvp, ndp->ni_vp, + cnp, &vattr.va_ctime, + newvp->v_type != VDIR ? NULL : + &dvattr.va_ctime); } } else { /* Just skip over the file handle */ Modified: stable/7/sys/nfsclient/nfsm_subs.h ============================================================================== --- stable/7/sys/nfsclient/nfsm_subs.h Mon Jul 30 18:21:48 2012 (r238912) +++ stable/7/sys/nfsclient/nfsm_subs.h Mon Jul 30 19:05:41 2012 (r238913) @@ -167,8 +167,8 @@ int nfsm_getfh_xx(nfsfh_t **f, int *s, i caddr_t *dpos); int nfsm_loadattr_xx(struct vnode **v, struct vattr *va, struct mbuf **md, caddr_t *dpos); -int nfsm_postop_attr_xx(struct vnode **v, int *f, struct mbuf **md, - caddr_t *dpos); +int nfsm_postop_attr_xx(struct vnode **v, int *f, struct vattr *va, + struct mbuf **md, caddr_t *dpos); int nfsm_wcc_data_xx(struct vnode **v, int *f, struct mbuf **md, caddr_t *dpos); @@ -196,7 +196,14 @@ do { \ #define nfsm_postop_attr(v, f) \ do { \ int32_t t1; \ - t1 = nfsm_postop_attr_xx(&v, &f, &md, &dpos); \ + t1 = nfsm_postop_attr_xx(&v, &f, NULL, &md, &dpos); \ + nfsm_dcheck(t1, mrep); \ +} while (0) + +#define nfsm_postop_attr_va(v, f, va) \ +do { \ + int32_t t1; \ + t1 = nfsm_postop_attr_xx(&v, &f, va, &md, &dpos); \ nfsm_dcheck(t1, mrep); \ } while (0) Modified: stable/7/sys/nfsclient/nfsnode.h ============================================================================== --- stable/7/sys/nfsclient/nfsnode.h Mon Jul 30 18:21:48 2012 (r238912) +++ stable/7/sys/nfsclient/nfsnode.h Mon Jul 30 19:05:41 2012 (r238913) @@ -108,7 +108,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_unused0; time_t n_unused1; - int n_dmtime_ticks; /* Tick of -ve cache entry */ + int n_unused3; time_t n_unused2; nfsfh_t *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ @@ -137,8 +137,8 @@ struct nfsnode { int n_directio_opens; int n_directio_asyncwr; struct nfs_attrcache_timestamp n_unused; - struct timespec n_ctime; /* Prev create time. */ - struct timespec n_dmtime; /* Prev dir modify time. */ + struct timespec n_ctime; /* NFSv4 only */ + struct timespec n_unused5; }; #define n_atim n_un1.nf_atim Modified: stable/7/sys/sys/vnode.h ============================================================================== --- stable/7/sys/sys/vnode.h Mon Jul 30 18:21:48 2012 (r238912) +++ stable/7/sys/sys/vnode.h Mon Jul 30 19:05:41 2012 (r238913) @@ -560,10 +560,15 @@ struct vnode; extern int (*lease_check_hook)(struct vop_lease_args *); /* cache_* may belong in namei.h. */ -void cache_enter(struct vnode *dvp, struct vnode *vp, - struct componentname *cnp); -int cache_lookup(struct vnode *dvp, struct vnode **vpp, - struct componentname *cnp); +#define cache_enter(dvp, vp, cnp) \ + cache_enter_time(dvp, vp, cnp, NULL, NULL) +void cache_enter_time(struct vnode *dvp, struct vnode *vp, + struct componentname *cnp, struct timespec *tsp, + struct timespec *dtsp); +#define cache_lookup(dvp, vpp, cnp) \ + cache_lookup_times(dvp, vpp, cnp, NULL, NULL) +int cache_lookup_times(struct vnode *dvp, struct vnode **vpp, + struct componentname *cnp, struct timespec *tsp, int *ticksp); void cache_purge(struct vnode *vp); void cache_purge_negative(struct vnode *vp); void cache_purgevfs(struct mount *mp); From owner-svn-src-stable@FreeBSD.ORG Mon Jul 30 20:40:15 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E3181065675; Mon, 30 Jul 2012 20:40:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3DB8FC1E; Mon, 30 Jul 2012 20:40:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6UKeFtP040680; Mon, 30 Jul 2012 20:40:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6UKeFW7040678; Mon, 30 Jul 2012 20:40:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207302040.q6UKeFW7040678@svn.freebsd.org> From: John Baldwin Date: Mon, 30 Jul 2012 20:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238916 - stable/9/sys/dev/atkbdc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 20:40:15 -0000 Author: jhb Date: Mon Jul 30 20:40:14 2012 New Revision: 238916 URL: http://svn.freebsd.org/changeset/base/238916 Log: MFC 238164: Add another PS/2 keyboard PNP ID. This ID is listed as "Reserved by Microsoft" in the standard PNP ID table, but has been seen in the wild on at least one laptop. Approved by: re (kib) Modified: stable/9/sys/dev/atkbdc/atkbdc_isa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/atkbdc/atkbdc_isa.c ============================================================================== --- stable/9/sys/dev/atkbdc/atkbdc_isa.c Mon Jul 30 20:38:37 2012 (r238915) +++ stable/9/sys/dev/atkbdc/atkbdc_isa.c Mon Jul 30 20:40:14 2012 (r238916) @@ -87,6 +87,7 @@ static driver_t atkbdc_isa_driver = { static struct isa_pnp_id atkbdc_ids[] = { { 0x0303d041, "Keyboard controller (i8042)" }, /* PNP0303 */ + { 0x0b03d041, "Keyboard controller (i8042)" }, /* PNP030B */ { 0x2003d041, "Keyboard controller (i8042)" }, /* PNP0320 */ { 0 } }; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 31 05:39:08 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FB75106566B for ; Tue, 31 Jul 2012 05:39:08 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1518FC12 for ; Tue, 31 Jul 2012 05:39:08 +0000 (UTC) Received: by obbun3 with SMTP id un3so12970593obb.13 for ; Mon, 30 Jul 2012 22:39:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=M00B8Um8C+YCZM5RXHYFkwIhAW5uVVQ9xwsIvcGJa3M=; b=h7eDr1xzYV3xfma7iWH7UzRP45hoW7woFZsNwIz4cq5yvpTDq6dpXz0wpWPBApT+4I lvQg37uFislJtd9xaYl5T+CNWW3q8ANPkGIoeSTeH7QM3pIBKTXPQl6iVCUn9Ovcsd3X ypJhOW61vxSNljh1RVNptbTBSo3lxzzaEH/4Qg5Z4Jh0CCxjk1a/fLrs/oUUtTEBcZJo P8u8bzzOuKbSkcSeZpBXl5w3d3b6b4kD4Egn5r+dd+SPCI+ArJye5uwLz1DZtMwb+M5U rPk2QN3liLiBJ74bA0Ac4uy3EMHE4QvEAbZsZ7FGV54b4misU+QkfPI+Rk8CXRi1Su/H gMaQ== MIME-Version: 1.0 Received: by 10.182.14.36 with SMTP id m4mr21273754obc.71.1343713147693; Mon, 30 Jul 2012 22:39:07 -0700 (PDT) Sender: fjoe@samodelkin.net Received: by 10.182.240.49 with HTTP; Mon, 30 Jul 2012 22:39:07 -0700 (PDT) X-Originating-IP: [93.92.220.179] In-Reply-To: <201207301132.34524.jhb@freebsd.org> References: <201207251742.q6PHgvDj083177@svn.freebsd.org> <201207301132.34524.jhb@freebsd.org> Date: Tue, 31 Jul 2012 12:39:07 +0700 X-Google-Sender-Auth: xRh4sdD3vzeKIMoexCFKE_0ZXoM Message-ID: From: Max Khon To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQl0GTAg1B479v8nsBZY9qmL4RgNhtz0DwjAM5pPJn6X7HcAn4ro0qhKkwQ4NYC/dCrLQdr4 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r238775 - stable/8/sys/dev/puc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 05:39:08 -0000 John, On Mon, Jul 30, 2012 at 10:32 PM, John Baldwin wrote: > On Wednesday, July 25, 2012 1:42:57 pm Max Khon wrote: >> Author: fjoe >> Date: Wed Jul 25 17:42:57 2012 >> New Revision: 238775 >> URL: http://svn.freebsd.org/changeset/base/238775 >> >> Log: >> MFC: r227457, r237350, r237357 >> >> Add support for the following Moxa PCIe multiport serial boards: >> - CP102E >> - CP102EL >> - CP104EL-A >> - CP104JU >> - CP114EL >> - CP118EL-A >> - CP168EL-A > > You ignored the comments from Marcel when you committed this to HEAD it seems. > You need to revert d_ofs back to a int8_t and add a config_function for these > adapters instead that use an offset of 0x200. Well, I did not ignore comments from Marcel - his e-mail got lost in my inbox. Sorry about that. I was notified about the issue off the list several days ago and fixed it today. Max From owner-svn-src-stable@FreeBSD.ORG Thu Aug 2 15:13:13 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04FC81065687; Thu, 2 Aug 2012 15:13:13 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B64B08FC16; Thu, 2 Aug 2012 15:13:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q72FDCoL094567; Thu, 2 Aug 2012 15:13:12 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q72FDCIa094564; Thu, 2 Aug 2012 15:13:12 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201208021513.q72FDCIa094564@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 2 Aug 2012 15:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238992 - in stable/9/sys/boot: ficl zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 15:13:13 -0000 Author: ache Date: Thu Aug 2 15:13:12 2012 New Revision: 238992 URL: http://svn.freebsd.org/changeset/base/238992 Log: MFC r238795 Try to avoid all files dependence on the modification time of the large and often modified directory created symbolic links points to - it cause unnecessary full rebuilds each time make runs when directory is changed. So do it only if symbolic link does not exists, which usually means that objdir is clean anyway. Approved by: re (kib) Modified: stable/9/sys/boot/ficl/Makefile stable/9/sys/boot/zfs/Makefile Directory Properties: stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/ficl/Makefile ============================================================================== --- stable/9/sys/boot/ficl/Makefile Thu Aug 2 15:05:34 2012 (r238991) +++ stable/9/sys/boot/ficl/Makefile Thu Aug 2 15:13:12 2012 (r238992) @@ -54,9 +54,11 @@ softcore.c: ${SOFTWORDS} softcore.awk | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET} .if ${MACHINE_CPUARCH} == "amd64" +.if !exists(machine) ${SRCS:M*.c:R:S/$/.o/g}: machine beforedepend ${OBJS}: machine +.endif machine: ln -sf ${.CURDIR}/../../i386/include machine Modified: stable/9/sys/boot/zfs/Makefile ============================================================================== --- stable/9/sys/boot/zfs/Makefile Thu Aug 2 15:05:34 2012 (r238991) +++ stable/9/sys/boot/zfs/Makefile Thu Aug 2 15:13:12 2012 (r238992) @@ -33,5 +33,7 @@ machine: .include .if ${MACHINE_CPUARCH} == "amd64" +.if !exists(machine) beforedepend ${OBJS}: machine .endif +.endif From owner-svn-src-stable@FreeBSD.ORG Thu Aug 2 20:48:23 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7B8106566C; Thu, 2 Aug 2012 20:48:23 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 978E08FC0C; Thu, 2 Aug 2012 20:48:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q72KmNRO023943; Thu, 2 Aug 2012 20:48:23 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q72KmN5k023941; Thu, 2 Aug 2012 20:48:23 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201208022048.q72KmN5k023941@svn.freebsd.org> From: Maksim Yevmenkin Date: Thu, 2 Aug 2012 20:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238994 - stable/9/lib/libc/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 20:48:23 -0000 Author: emax Date: Thu Aug 2 20:48:22 2012 New Revision: 238994 URL: http://svn.freebsd.org/changeset/base/238994 Log: MFC r238599 Return zero from get_addrselectpolicy() when no source-address-selection policy is installed. Approved by: re (kib) Modified: stable/9/lib/libc/net/getaddrinfo.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/9/lib/libc/net/getaddrinfo.c Thu Aug 2 20:14:45 2012 (r238993) +++ stable/9/lib/libc/net/getaddrinfo.c Thu Aug 2 20:48:22 2012 (r238994) @@ -693,6 +693,8 @@ get_addrselectpolicy(struct policyhead * if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) return (0); + if (l == 0) + return (0); if ((buf = malloc(l)) == NULL) return (0); if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, &l, NULL, 0) < 0) { From owner-svn-src-stable@FreeBSD.ORG Thu Aug 2 20:49:12 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49CF3106566C; Thu, 2 Aug 2012 20:49:12 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3459A8FC15; Thu, 2 Aug 2012 20:49:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q72KnCWY024046; Thu, 2 Aug 2012 20:49:12 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q72KnBNc024044; Thu, 2 Aug 2012 20:49:11 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201208022049.q72KnBNc024044@svn.freebsd.org> From: Maksim Yevmenkin Date: Thu, 2 Aug 2012 20:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238995 - stable/9/etc/rc.d X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 20:49:12 -0000 Author: emax Date: Thu Aug 2 20:49:11 2012 New Revision: 238995 URL: http://svn.freebsd.org/changeset/base/238995 Log: MFC r238622 Allow to specify no source-address-selection policy Approved by: re (kib) Modified: stable/9/etc/rc.d/ip6addrctl Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/ip6addrctl ============================================================================== --- stable/9/etc/rc.d/ip6addrctl Thu Aug 2 20:48:22 2012 (r238994) +++ stable/9/etc/rc.d/ip6addrctl Thu Aug 2 20:49:11 2012 (r238995) @@ -83,6 +83,9 @@ ip6addrctl_start() # Backward compatibility when ipv6_prefer=NO ip6addrctl_prefer_ipv4 ;; + [Nn][Oo][Nn][Ee]) + ip6addrctl flush >/dev/null 2>&1 + ;; *) warn "\$ip6addrctl_policy is invalid: ${ip6addrctl_policy}. " \ " \"ipv4_prefer\" is used instead." From owner-svn-src-stable@FreeBSD.ORG Fri Aug 3 11:22:09 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3E5B106568C; Fri, 3 Aug 2012 11:22:09 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4CB88FC1E; Fri, 3 Aug 2012 11:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q73BM9m7014116; Fri, 3 Aug 2012 11:22:09 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q73BM911014113; Fri, 3 Aug 2012 11:22:09 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201208031122.q73BM911014113@svn.freebsd.org> From: Max Khon Date: Fri, 3 Aug 2012 11:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239006 - stable/8/sys/dev/puc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 11:22:10 -0000 Author: fjoe Date: Fri Aug 3 11:22:09 2012 New Revision: 239006 URL: http://svn.freebsd.org/changeset/base/239006 Log: MFC: r238933 - Change back "d_ofs" to int8_t to not pessimize padding and size of "struct puc_cfg" - Use "puc_config_moxa" for Moxa boards that need d_ofs greater than 0x7f Modified: stable/8/sys/dev/puc/puc_cfg.h stable/8/sys/dev/puc/pucdata.c Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/puc/puc_cfg.h ============================================================================== --- stable/8/sys/dev/puc/puc_cfg.h Fri Aug 3 09:08:20 2012 (r239005) +++ stable/8/sys/dev/puc/puc_cfg.h Fri Aug 3 11:22:09 2012 (r239006) @@ -79,7 +79,7 @@ struct puc_cfg { int8_t ports; int8_t rid; /* Rid of first port */ int8_t d_rid; /* Delta rid of next ports */ - int16_t d_ofs; /* Delta offset of next ports */ + int8_t d_ofs; /* Delta offset of next ports */ puc_config_f *config_function; }; Modified: stable/8/sys/dev/puc/pucdata.c ============================================================================== --- stable/8/sys/dev/puc/pucdata.c Fri Aug 3 09:08:20 2012 (r239005) +++ stable/8/sys/dev/puc/pucdata.c Fri Aug 3 11:22:09 2012 (r239006) @@ -510,13 +510,15 @@ const struct puc_cfg puc_pci_devices[] = { 0x1393, 0x1024, 0xffff, 0, "Moxa Technologies, Smartio CP-102E/PCIe", DEFAULT_RCLK * 8, - PUC_PORT_2S, 0x14, 0, 0x200 + PUC_PORT_2S, 0x14, 0, -1, + .config_function = puc_config_moxa }, { 0x1393, 0x1025, 0xffff, 0, "Moxa Technologies, Smartio CP-102EL/PCIe", DEFAULT_RCLK * 8, - PUC_PORT_2S, 0x14, 0, 0x200, + PUC_PORT_2S, 0x14, 0, -1, + .config_function = puc_config_moxa }, { 0x1393, 0x1040, 0xffff, 0, @@ -572,7 +574,8 @@ const struct puc_cfg puc_pci_devices[] = { 0x1393, 0x1182, 0xffff, 0, "Moxa Technologies, Smartio CP-118EL-A/PCIe", DEFAULT_RCLK * 8, - PUC_PORT_8S, 0x14, 0, 0x200, + PUC_PORT_8S, 0x14, 0, -1, + .config_function = puc_config_moxa }, { 0x1393, 0x1680, 0xffff, 0, @@ -596,7 +599,8 @@ const struct puc_cfg puc_pci_devices[] = { 0x1393, 0x1683, 0xffff, 0, "Moxa Technologies, Smartio CP-168EL-A/PCIe", DEFAULT_RCLK * 8, - PUC_PORT_8S, 0x14, 0, 0x200, + PUC_PORT_8S, 0x14, 0, -1, + .config_function = puc_config_moxa }, { 0x13a8, 0x0152, 0xffff, 0, @@ -1153,7 +1157,12 @@ puc_config_moxa(struct puc_softc *sc, en intptr_t *res) { if (cmd == PUC_CFG_GET_OFS) { - *res = ((port == 3) ? 7 : port) * 0x200; + const struct puc_cfg *cfg = sc->sc_cfg; + + if (port == 3 && (cfg->device == 0x1045 || cfg->device == 0x1144)) + port = 7; + *res = port * 0x200; + return 0; } return (ENXIO);